Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Fall back to default configuration in debug:config and consistently resolve parameter values#42368
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
7c4add2 to60bb74fCompare089b5f0 tob1f46bcCompareherndlm commentedAug 4, 2021 • 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.
The failing test should be unrelated. |
86c4586 tocb5e728Comparesrc/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ro0NL left a comment
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.
looks generally OK to me
previously we resolved values (resolveValue) after processing =>https://github.com/symfony/symfony/pull/30648/files#diff-6f37907eb60dac18aec41358f427dab3c34f1c3d6d71247506ee52a856a05a2dL91, but im not sure it's still applicable for just default config now.
...Bundle/Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/Configuration.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
herndlm commentedAug 5, 2021
Good catch! This is about env vars, right? I'll try to add a test and adapt that. |
ro0NL commentedAug 5, 2021
yes :D another node with default env would be nice i guess, but AFAIK that's already taken care of due the outer |
cb5e728 toceb02ccCompareherndlm commentedAug 5, 2021
I added another node to check that and yes you're right - it's already taken care of |
b80de04 to8f85856CompareUh oh!
There was an error while loading.Please reload this page.
8f85856 to2affabeCompareec2b218 to7f82294Compareherndlm commentedAug 11, 2021
@ro0NL sorry to bother you again, 3 questions, no worries if you can't answer all of them
|
ro0NL commentedAug 11, 2021
|
herndlm commentedAug 11, 2021 • 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.
Grr, so apparently one of the values to check has single ticks on Windows but not on Linux xD I started to ignore appveyor already because it randomly failed.. ➜ symfony git:(bugfix/fallback-to-default-config) ✗ php ./phpunit src/Symfony/Bundle/FrameworkBundle#!/usr/bin/env phpPHPUnit 9.5.7 by Sebastian Bergmann and contributors.Warning: Your XML configuration validates against a deprecated schema.Suggestion: Migrate your XML configuration using"--migrate-configuration"!Testing /Users/herndlm/Development/source/git-forks/symfony/src/Symfony/Bundle/FrameworkBundle............................................................. 61 / 1427 ( 4%)............................................................. 122 / 1427 ( 8%)............................................................. 183 / 1427 ( 12%)............................................................. 244 / 1427 ( 17%)............................................................. 305 / 1427 ( 21%)............................................................. 366 / 1427 ( 25%)............................................................. 427 / 1427 ( 29%)............................................................. 488 / 1427 ( 34%)............................................................. 549 / 1427 ( 38%)......................................................SS..... 610 / 1427 ( 42%)............................................................. 671 / 1427 ( 47%)............................................................. 732 / 1427 ( 51%)............................................................. 793 / 1427 ( 55%)............................................................. 854 / 1427 ( 59%)............................................................. 915 / 1427 ( 64%)............................................................. 976 / 1427 ( 68%)............................................................. 1037 / 1427 ( 72%)............................................................. 1098 / 1427 ( 76%)............................................................. 1159 / 1427 ( 81%)............................................................. 1220 / 1427 ( 85%)............................................................. 1281 / 1427 ( 89%)............................................................. 1342 / 1427 ( 94%)............................................................. 1403 / 1427 ( 98%)........................ 1427 / 1427 (100%)Time: 00:54.738, Memory: 240.50 MBOK, but incomplete, skipped, or risky tests!Tests: 1427, Assertions: 3427, Skipped: 2.Legacy deprecation notices (156)➜ symfony git:(bugfix/fallback-to-default-config) ✗ php -vPHP 7.4.22 (cli) (built: Jul 29 2021 18:27:37) ( NTS )Copyright (c) The PHP GroupZend Engine v3.4.0, Copyright (c) Zend Technologies with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies➜ symfony git:(bugfix/fallback-to-default-config) ✗ git rev-parse HEAD0939cdc44eeff42d04b4817f876494585cbecd87➜ symfony git:(bugfix/fallback-to-default-config) ✗ should be all good then |
7f82294 to0939cdcComparesrc/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
0939cdc toaa12784Compareherndlm commentedAug 13, 2021
@lyrixx what do you think? |
aa12784 to82873f3Comparelyrixx commentedAug 17, 2021
If it works as expected, let's ship it |
4afcb30 to6be6168Compareherndlm commentedAug 25, 2021
…and consistently resolve parameter values
6be6168 to9b6110bComparefabpot commentedAug 26, 2021
Thank you@herndlm. |
Uh oh!
There was an error while loading.Please reload this page.
Brings back determining the default configuration from pull request#30648. Refactors determining the extension config into a helper method to keep cognitive load low with early exits instead of nested ifs.
Additionaly, while reviewing, we noticed that entries with parameters are not resolved correctly if they come from the default config and an application config is existing but they are not overriden. E.g. the session config for the framework would output
save_path: %kernel.cache_dir%/sessionsinstead of the resolved value.Tested via unit test (obviously) and by manually removing bundle configuration in a Symfony project.
Beware that I do not know much about bundles and internals, I looked that up while implementing this and might have missed better/simpler solutions or edge cases. Please somebody also do another functional test to ensure this is really working as it should.