- Issue created by @raffaelj
- Status changed to Needs review
3 months ago 8:25pm 4 September 2024 - Status changed to Needs work
3 months ago 8:42pm 4 September 2024 - Status changed to Needs review
3 months ago 4:16pm 5 September 2024 I found the root cause of this edge case bug. All existing modules (even if not installed) where already autoloaded in `core/tests/bootstrap.php`. So it was never possible to throw this Exception during unit tests. I reverted the autoloading of core drivers in the responding test. With that change, also all tests of the driver_test module failed during the class_exists call. With my provided fix all tests pass again.
- πΊπΈUnited States smustgrave
Can we get test coverage added for the new exception being introduced.
> Can we get test coverage added for the new exception being introduced.
@smustgrave I don't think, this is needed. And if so, I can't wrap my head around how I could test it. I think, it's a misunderstanding because of my wording in #6 and because I should have commited my changes in a different order.
What I did:
1. moved a view lines of code in `Database.php` to throw an Exception at the right moment (was wrong before)
2. fixed test, that never caught the bug, because the test has a different autoloading mechanism, than a production systemWhat I should have done:
1. Fix `UrlConversionTest` to mimic production system, which now throws Exceptions, that weren't caught before. Of course, this commit wouldn't have passed the CI pipeline.
2. Fix `Database.php`, so no Exceptions are thrown anymore.No new Exception is introduced. An existing Exception is only moved a few lines below to throw at the right moment. But I should have commited (and written) the changes in a different order to complement my thought process.
Because commits are squashed on merge, this can stay in this order.
Hi,
I am able to reproduce the issue. Done manual testing for the Drupa Version 11.x.Steps followed for the Update:
- Install docker image with the php 8.3
- Go inside the docker container
- mkdir drupal11_l10n_test && cd drupal11_l10n_test
- composer create-project drupal/recommended-project .
- # Installing drupal/recommended-project (11.0.1)
- composer require --dev drupal/core-dev
- composer require drush/drush
- composer require 'drupal/sqlite337:^1.0@alpha'
- mkdir -p db
- # triple '../' works in Drupal 11 (single '../' worked in Drupal 10) ./vendor/bin/drush site:install --yes --db-url="sqlite://../../../db/test.sqlite?module=sqlite337" --site-mail noreply@example.com
MR !9431 applied successfully. Changes looking good to me.
Before Patch:
After Patch:
- Status changed to Needs work
12 days ago 11:42am 21 November 2024 - π³π±Netherlands daffie
In π [PP-1] Create the database driver for MySQLi Postponed we shall get testing for this problem. The new MySQLi database driver has the old MySQL database driver as a dependency.