Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result #13034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

xelaris
Copy link
Contributor

@xelaris xelaris commented Dec 19, 2014

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #12944
License MIT
Doc PR

With this PR HTTP status codes are provided in the search results to simplify identification of particular requests.
For the schema-less storage implementations (memcache(d), redis, mongodb) and the default file storage, it should work without purging existing profiles. But the code could be simplified, if it is an option to expect old profiles to be purged. For database driven storages (mysql, sqlite), the sf_profiler_data table must be dropped anyway (if the table isn't altered manually by adding the status_code column). Thus the changes are not fully BC.

profiler-search-results

@hhamon
Copy link
Contributor

hhamon commented Dec 21, 2014

Nice one!

@fabpot
Copy link
Member

fabpot commented Dec 21, 2014

@xelaris The format of the storage has changed in almost all minor versions of Symfony, so I think it's safe to assume the same for 2.7.

@fabpot
Copy link
Member

fabpot commented Dec 21, 2014

👍

@elementaire
Copy link
Contributor

👍

@@ -32,6 +33,7 @@ public function getFunctions()
{
return array(
new \Twig_SimpleFunction('profiler_dump', array($this, 'dumpValue')),
new \Twig_SimpleFunction('http_status_text', array($this, 'httpStatusText')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your function depends only on HttpFoundation, so it should go in the HttpFoundationExtension of the bridge IMO

@xelaris
Copy link
Contributor Author

xelaris commented Jan 18, 2015

@fabpot @stof I removed the presentation of the http status text.

@stof
Copy link
Member

stof commented Jan 18, 2015

👍 (the failing tests are because the Form changes of 2.7 have not yet been merged into the master branch)

@fabpot
Copy link
Member

fabpot commented Jan 25, 2015

Thank you @xelaris.

@rvanlaak
Copy link
Contributor

Would be great if this could be added to the search form too. I'd like to be able to easily identify and filter on requests with exceptions.

fabpot added a commit that referenced this pull request Feb 9, 2016
This PR was submitted for the 3.0 branch but it was merged into the 3.1-dev branch instead (closes #17125).

Discussion
----------

Webprofiler add status code to search form

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13034
| License       | MIT

With this PR, in the web profiler, you can filter by HTTP status codes.

*Before filter*
![image](https://i.gyazo.com/8cb99295b12489cc9024ccc07fabf805.png)

*After filter*
![image](https://i.gyazo.com/4caaf032b56ccfe84198a230dbb211a2.png)

Commits
-------

7d3700a Webprofiler add status code to search form
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
…tus to profiler search result (xelaris)

This PR was squashed before being merged into the 2.7 branch (closes symfony#13034).

Discussion
----------

[HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#12944
| License       | MIT
| Doc PR        |

With this PR HTTP status codes are provided in the search results to simplify identification of particular requests.
For the schema-less storage implementations (memcache(d), redis, mongodb) and the default file storage, it should work without purging existing profiles. But the code could be simplified, if it is an option to expect old profiles to be purged. For database driven storages (mysql, sqlite), the `sf_profiler_data` table must be dropped anyway (if the table isn't altered manually by adding the `status_code` column). Thus the changes are not fully BC.

![profiler-search-results](https://cloud.githubusercontent.com/assets/2466932/5499453/3cc6ad70-8730-11e4-81e5-13bfd1140d00.png)

Commits
-------

34ecda5 [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants