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

Merged
merged 2 commits into from
Nov 11, 2024
Merged

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.

@W0rma W0rma force-pushed the dbal2 branch 2 times, most recently from d86e9ca to 97d2570 Compare July 29, 2024 04:58
aanieves

This comment was marked as duplicate.

Copy link
Member

@TavoNiievez TavoNiievez left a comment

Choose a reason for hiding this comment

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

LGTM

@TavoNiievez TavoNiievez merged commit db8866b into Codeception:main Nov 11, 2024
6 checks passed
@W0rma W0rma deleted the dbal2 branch November 11, 2024 16:57
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"
3 participants