Problem/Motivation
Since moving databases to modules we need to do extension discovery to find the module directory for autoloading. This results in additional entries in \Drupal\Core\Extension\ExtensionDiscovery::$files because we call it without the setting the include tests flag when processing the SimpletestDB url.
Proposed resolution
Pass a flag along. We could also set the extension_discovery_scan_tests setting somehow but this is tricky because we're super early in KTB processing.
Remaining tasks
User interface changes
API changes
The static methods Drupal\Core\Database\Database::convertDbUrlToConnectionInfo()
and Drupal\Core\Database\Database::findDriverAutoloadDirectory()
have now an extra parameter called $include_test_drivers
. The new paramter is used to scan for database driver directories in test locations. It is only used in the tests, the parameter is optional and the default value of the parameter is NULL. The parameter is added to make the testbot run a little bit faster.
Data model changes
None
Release notes snippet
N/a
Comment | File | Size | Author |
---|---|---|---|
#2 | 3293446-2.patch | 16.08 KB | alexpott |
Comments
Comment #2
alexpottComment #3
daffie CreditAttribution: daffie commented@alexpott: Good idea.
All the code changes look good to me.
I have updated the IS and have added a CR.
The tests are using the new parameter.
For me it is RTBC.
Comment #5
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x since the extra default NULL paramater shouldn't be an issue for anyone.
Comment #7
drumm(Updating to resolve Drupal.org issue indexing issue. Please disregard.)
Comment #9
quietone CreditAttribution: quietone at PreviousNext commentedI updated the branch/version in the CR and published it.