Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for doctrine/dbal v2 #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

W0rma
Copy link
Contributor

@W0rma W0rma commented Jul 29, 2024

Fixes #30

@@ -71,7 +71,12 @@ protected function _setUp()
require_once $dir . "/CircularRelations/C.php";
require_once $dir . '/EntityWithUuid.php';

$connection = DriverManager::getConnection(['driver' => 'sqlite3', 'memory' => true]);
$sqliteDriver = 'sqlite3';
if (version_compare(InstalledVersions::getVersion('doctrine/orm'), '3.5', '<')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The driver "sqlite3" was added in https://github.com/doctrine/dbal/releases/tag/3.5.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change really related to the issue?
Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is related since without this change tests would fail if DBAL < 3.5 is installed because the "sqlite3" driver was added in DBAL v3.5.

However, I noticed that I mixed up the package names.
I fixed the version check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined method "getNativeConnection" of class "Doctrine\DBAL\Connection"
2 participants