#2241633: Simplify site-specific service overrides broke CLI testing.

PHP Warning:  Invalid argument supplied for foreach() in /var/lib/drupaltestbot/sites/default/files/checkout/core/lib/Drupal/Core/DrupalKernel.php on line 597

Warning: Invalid argument supplied for foreach() in /var/lib/drupaltestbot/sites/default/files/checkout/core/lib/Drupal/Core/DrupalKernel.php on line 597

See the log (at the bottom of the page) for https://qa.drupal.org/8.x-status at the moment.

I guess this is occurring so early in the test run we're not catching this as an error.

Comments

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new769 bytes
alexpott’s picture

Title: TestKernel is not adding it's service provider correctly. » TestKernel is not adding its service provider correctly.
alexpott’s picture

Without this patch you can not use run-tests.sh without a parent site. With it everythign works as expected.

To run run-tests.sh without a parent site you need to add --sqlite and --dburl parameters.

PHP Warning:  Invalid argument supplied for foreach() in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/DrupalKernel.php on line 597

Warning: Invalid argument supplied for foreach() in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/DrupalKernel.php on line 597
PHP Fatal error:  Uncaught exception 'Drupal\Core\Database\ConnectionNotDefinedException' with message 'The specified database connection is not defined: default' in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/Database/Database.php:366

Above are the errors without this patch from running a parentless test.

berdir’s picture

Confirmed, makes the warning go away and fixes it for the no-parent-mode. Need to confirm testbot output but this should be good.

alexpott’s picture

StatusFileSize
new766 bytes

Talked to @sun in IRC the second element of the array is usually the module name - in this case let's use the component name.

sun’s picture

StatusFileSize
new901 bytes

Let's use the component name with its capitalized notion to prevent name clashes; i.e., 'Test'


x-post... yes, that, and also adjusting the method override.

sun’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit a0961ff on 8.x by catch:
    Issue #2266547 by alexpott, sun: TestKernel is not adding its service...

Status: Fixed » Closed (fixed)

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