Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[WebProfilerBundle] use the router to resolve file links#26626
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[WebProfilerBundle] use the router to resolve file links#26626
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedMar 21, 2018
| Q | A |
|---|---|
| Branch? | 3.4 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #22290,#25886 |
| License | MIT |
| Doc PR | - |
| <argument>?file=%%f&line=%%l#line%%l</argument> | ||
| </argument> | ||
| </service> | ||
| </argument> |
nicolas-grekasMar 21, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this generates the following code, which is exactly what we need here:
new \Symfony\Component\HttpKernel\Debug\FileLinkFormatter(NULL, ($this->services['request_stack'] ??$this->services['request_stack'] =new \Symfony\Component\HttpFoundation\RequestStack()),$this->targetDirs[3],\implode(array(0 => ($this->services['router'] ??$this->getRouterService())->generate('_profiler_open_file'),1 =>'?file=%f&line=%l#line%l')));
| <argument>%kernel.project_dir%</argument> | ||
| <argument>/_profiler/open?file=%%f&line=%%l#line%%l</argument> | ||
| <argumenttype="service"> | ||
| <serviceclass="string"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nice hack!
| <argument>/_profiler/open?file=%%f&line=%%l#line%%l</argument> | ||
| <argumenttype="service"> | ||
| <serviceclass="string"> | ||
| <factoryfunction="implode" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
oh, and yet another nice hack!
Well done :)
javiereguiluz commentedMar 22, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas my head exploded when trying to understand this ... but I'm glad this is working 🎉 However, the main concern of Fabien in the other PR (see#24153 (comment)) was the configurability of this. So, can you please paste an example of the config needed if the user wants to customize the URL? We'd need it to update the docs. Thanks! |
nicolas-grekas commentedMar 22, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@javiereguiluz there is no config needed, the URL will be generated based on the path of the |
…nicolas-grekas)This PR was merged into the 3.4 branch.Discussion----------[WebProfilerBundle] use the router to resolve file links| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#22290,#25886| License | MIT| Doc PR | -Commits-------2cfc573 [WebProfilerBundle] use the router to resolve file links
ahilles107 commentedApr 3, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It creates a BC break as router tries to generate route on container dumping. We have routes in database and at the end database is checked on container generation (cache:clear command) |
thijskaspers commentedApr 3, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Same here with The 'ci' environment loads the |
fabpot commentedApr 3, 2018
Shall we revert? |
nicolas-grekas commentedApr 3, 2018
It depends on the time we want, fix in progress, could be ready tomorrow. |
nicolas-grekas commentedApr 3, 2018
Fix in#26758 |