Problem/Motivation
From #3532930-48: Make Drupal\Core\Database\Database type strict and PHPStan L10 compliant:
Looks like the
assert(isset($connection_info['autoload']));added toDatabase::parseConnectionInfo()in this issue has broken 11.x and 11.5x mysqli tests in migrate_drupal/migrate:
https://git.drupalcode.org/project/drupal/-/jobs/12883913
https://git.drupalcode.org/project/drupal/-/jobs/12883914
https://git.drupalcode.org/project/drupal/-/jobs/12883915
https://git.drupalcode.org/project/drupal/-/jobs/12883916
Example:
Upgrade7With Content Moderation (Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7WithContentModeration)
✘ Upgrade and incremental
┐
├ AssertionError: assert(isset($connection_info['autoload']))
│
│ /builds/project/drupal/core/lib/Drupal/Core/Database/Database.php:307
│ /builds/project/drupal/core/lib/Drupal/Core/Database/Database.php:350
│ /builds/project/drupal/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php:192
│ /builds/project/drupal/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php:158
│ /builds/project/drupal/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php:216
│ /builds/project/drupal/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php:111
│ /builds/project/drupal/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php:81
│ /builds/project/drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php:101
│ /builds/project/drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php:87
│ /builds/project/drupal/core/modules/migrate/src/Plugin/MigrationPluginManager.php:259
│ /builds/project/drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
│ /builds/project/drupal/core/modules/migrate/src/Plugin/MigrationPluginManager.php:138
│ /builds/project/drupal/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php:265
│ /builds/project/drupal/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php:88
│ /builds/project/drupal/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php:236
┴
FAILURES!
Tests: 1, Assertions: 16, Failures: 1.
main and 12.0.x do not seem to be affected because those migrate tests have been removed.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3631193
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3631193-11.x-test-failures
changes, plain diff MR !17469
Comments
Comment #3
godotislateMR: https://git.drupalcode.org/project/drupal/-/merge_requests/17469/
mysqi job passes: https://git.drupalcode.org/project/drupal/-/pipelines/1005313
Maybe we don't need to worry about the test failures since they're in tests removed from core, and the failure is in a BC layer, but the fix is pretty trivial: https://git.drupalcode.org/project/drupal/-/merge_requests/17469
Maybe it makes sense to forward port the changes for consistency, not sure.
Comment #4
mondraketbh, on main I’d rather go for #3533038: Introduce a ConnectionParameters value object to store database connection parameters.
Comment #5
longwaveCommitted and pushed 61f57dd2015 to 11.x and 12caff74819 to 11.5.x. Thanks!