10000 Update excluded_ajax_paths for sf4 by jenaye · Pull Request #26177 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Update excluded_ajax_paths for sf4 #26177

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 5 commits into from

Conversation

jenaye
Copy link
Contributor
@jenaye jenaye commented Feb 14, 2018
Q A
Branch? 4.0
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25941
License MIT
Doc PR https://github.com/symfony/symfony-docs/pull/9267/files

This PR update excluded_ajax_paths from vendor/symfony/web-profiler-bundle/DependencyInjection/Configuration.php because
there is no neither app.php nor app_dev.php in symfony 4
We also need update this Documentation

@@ -38,7 +38,7 @@ public function getConfigTreeBuilder()
->children()
->booleanNode('toolbar')->defaultFalse()->end()
->booleanNode('intercept_redirects')->defaultFalse()->end()
->scalarNode('excluded_ajax_paths')->defaultValue('^/(app(_[\\w]+)?\\.php/)?_wdt')->end()
->scalarNode('excluded_ajax_paths')->defaultValue('index.php?_wdt')->end()
Copy link
Member

Choose a reason for hiding this comment

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

that's not the right update. It will now match index.php_wdt and index.ph_wdt (and anywhere in the URL, not only at the start), while it should be matching /_wdt and /index.php/_wdt

@stof
Copy link
Member
stof commented Feb 14, 2018

and we should actually change it in 3.4, supporting both app.php and index.php, as 3.4 supports both Flex and the standard-edition

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Feb 16, 2018
@jenaye
Copy link
Contributor Author
jenaye commented Feb 21, 2018

hi @stof thanks for u're review, you want something like this ?
/((app.php)|(index|app?(_dev)?)?\.php)?.(_wdt)/

capture d ecran 2018-02-21 a 12 30 33

@ro0NL
Copy link
Contributor
ro0NL commented Feb 21, 2018

it matches appxphpx_wdt as well :)

try something like

^/((?:index|app(_[\w]+)?)\.php/)?_wdt

image

@jenaye
Copy link
Contributor Author
jenaye commented Feb 21, 2018

@ro0NL thanks, i tried with app_dev.php index.php and app.phpand it works fine
i'll update documentation PR and unit test soon

@jenaye jenaye force-pushed the feature/issue-25941 branch from 5445c10 to 423abe9 Compare February 21, 2018 13:53
@@ -38,7 +38,7 @@ public function getConfigTreeBuilder()
->children()
->booleanNode('toolbar')->defaultFalse()->end()
->booleanNode('intercept_redirects')->defaultFalse()->end()
->scalarNode('excluded_ajax_paths')->defaultValue('^/(app(_[\\w]+)?\\.php/)?_wdt')->end()
->scalarNode('excluded_ajax_paths')->defaultValue('^/((?:index|app(_[\w]+)?)\.php/)?_wdt')->end()
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps to fully clarify the regex remove ?: as well.. (it's not really needed) since you removed escaped \ also (before \\, but also not really needed).

@jenaye jenaye force-pushed the feature/issue-25941 branch from 15b44bd to 869b81d Compare February 21, 2018 15:11
@@ -38,7 +38,7 @@ public function getConfigTreeBuilder()
->children()
->booleanNode('toolbar')->defaultFalse()->end()
->booleanNode('intercept_redirects')->defaultFalse()->end()
->scalarNode('excluded_ajax_paths')->defaultValue('^/(app(_[\\w]+)?\\.php/)?_wdt')->end()
->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?).php/)?_wdt')->end()
Copy link
Contributor

Choose a reason for hiding this comment

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

The dot . still needs escaping ;) (\. that is)

@ro0NL
Copy link
Contributor
ro0NL commented Feb 24, 2018

For 3.4 i guess

8000

@fabpot
Copy link
Member
fabpot commented Feb 24, 2018

Thank you @jenaye.

@fabpot fabpot closed this Feb 24, 2018
fabpot added a commit that referenced this pull request Feb 24, 2018
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #26177).

Discussion
----------

Update excluded_ajax_paths for sf4

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25941
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9267/files

This PR update `excluded_ajax_paths` from `vendor/symfony/web-profiler-bundle/DependencyInjection/Configuration.php` because
there is no  neither `app.php` nor `app_dev.php` in symfony 4
We also need update this [Documentation](https://symfony.com/doc/current/reference/configuration/web_profiler.html)

Commits
-------

ce01097 Update excluded_ajax_paths for sf4
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Feb 27, 2018
This PR was merged into the master branch.

Discussion
----------

Update Documentation excluded_ajax_paths sf4

Linked with this PR : symfony/symfony#26177

Commits
-------

31f75d3 update doc sf4 for excluded_ajax_paths
This was referenced Mar 1, 2018
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.

8 participants
0