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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

daffie’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@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.

  • catch committed ec81251 on 10.0.x
    Issue #3293446 by alexpott, daffie: Create less static cache in...
  • catch committed 06d6ed5 on 9.5.x
    Issue #3293446 by alexpott, daffie: Create less static cache in...
catch’s picture

Version: 9.4.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/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.

  • catch committed 3ddfcf5 on 10.1.x
    Issue #3293446 by alexpott, daffie: Create less static cache in...
drumm’s picture

(Updating to resolve Drupal.org issue indexing issue. Please disregard.)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

quietone’s picture

I updated the branch/version in the CR and published it.