Load all enabled apps in test bootstrap #18882
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A possible solution to the chaos caused by #18839. We should load all apps that have been enabled, so that autoloader valid roots are properly registered (and so that all
app.php
is correctly run in case there's special initialization logic). Previously, we only loaded 'minimal' apps.Reasoning:
In autotest.sh, we enable the apps we want to test. The same happens with autotest-external.sh. The autotest executor looks at all enabled apps and runs their tests, so if an app isn't loaded it will break at this point, as the paths are not valid.
When running tests manually for individual apps (aka outside of autotest), the dev must make sure that the app is enabled in the running instance before attempting to run tests against it, OR the app test bootstrap explicitly loads the app. I don't see any situations where it is desired that an app isn't loaded, but still has tests run against it.
Please state if this is an acceptable solution @nickvergessen @oparoz @ChristophWurst
cc @MorrisJobke @LukasReschke