-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Ensure Doctrine DBAL 3 and 4 dual support
* [1] Doctrine DBAL 4 removed `SqliteManager->createDatabase()` and `SqliteManager->dropDatabase()`. The engine is createing the SQLite file on connect, but do not remove it on close. The `Testbase->setUpTestDatabase()` code is modified to delete the sqlite file directly, and let the engine handle the sqlite file creation on connect. * [2] Doctrine DBAL 4 changed the casing of some classes, for exmaple `SqlitePlatform` to `SQLitePlatform`, which is not an issue for code execution due to the case-insensitive nature of PHP - but static code analyser tools like PHPStan fall on their feed. Therefore, we use minor wrapping methods instead of php interfaceof checks directly to mitigate this and avoid jumping PHPStan baseline entry until Doctrine DBAL 4 is the minimal to support version. Note: The Doctrine DBAL 4 namespace casing is used. [1] https://github.com/doctrine/dbal/blob/3.7.x/UPGRADE.md#deprecated-sqliteschemamanagercreatedatabase-and-dropdatabase-methods [2] https://github.com/doctrine/dbal/blob/4.0.x/UPGRADE.md#bc-break-renamed-sqlite-platform-classes Releases: main
- Loading branch information
Showing
2 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters