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

added DBAL3 class for using with doctrine/dbal 3 version #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmnbars
Copy link

@dmnbars dmnbars commented Nov 1, 2021

adapter for doctrine dbal version 3.0 and above.
this adapter is copy of Phpmig\Adapter\Doctrine\DBAL with fixed Connection methods calls.
more info about changes in version 3 here: https://www.doctrine-project.org/2020/11/17/dbal-3.0.0.html

@dmnbars
Copy link
Author

dmnbars commented Nov 2, 2021

or we can use one class (Phpmig\Adapter\Doctrine\DBAL) and statements like this:

if (\method_exists($this->connection, 'fetchAllAssociative')) {
    $all = $this->connection->fetchAllAssociative($sql);
} else {
    $all = $this->connection->fetchAll($sql);
}

and

if (\method_exists($this->connection, 'executeQuery')) {
    $this->connection->executeQuery($sql);
} else {
    $this->connection->query($sql);
}

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.

1 participant