mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #8532] All CI runs are using the sqlite fallback connection instead of the expected driver #11046
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/8532
State: closed
Merged: Yes
While writing a test for an unrelated issue, I noticed that the unit tests are not loading the expected database connection details. Regardless of the config file provided, the
TestUtilclass is providing the fallback sqlite driver.As a result a) none of the code is being tested against other platforms and b) tests that rely on platform-specific features (e.g. pessimistic locking) are being skipped on all builds.
It looks like this has been the case ever since the migration from Travis CI. Therefore some of the consistently-skipped tests are also not valid with phpunit 9 - e.g.
Doctrine\Tests\ORM\Functional\Locking\LockTesthas two tests that fail due to using->assertContainswith a string argument, which need to be upgraded to->assertStringContainsString.The root cause is that when the driver-specific phpunit.xml files were updated for github actions, the various
tmpdb_type/tmpdb_usernameetc with the config for the privileged temporary connection were removed. It looks like this might be valid for doctrine/dbal because it falls back to using the main db params however the TestUtil class in doctrine/orm does not and it has a much stricter list of required parameters before it will use the specified driver.I can finish this off, but could you advise whether you'd prefer me to add the missing vars to the phpunit.xml or update TestUtil to work as expected with the current configs?