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

feat: Added doctrine/dbal v4.0. #7

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

tasselchof
Copy link
Contributor

@tasselchof tasselchof commented Apr 11, 2024

fix: #6

@leeqvip
Copy link
Member

leeqvip commented Apr 12, 2024

@tasselchof Please make it compatible with PHP7.1, it's not very complicated.

@tasselchof
Copy link
Contributor Author

@tasselchof Please make it compatible with PHP7.1, it's not very complicated.

Except doctrine/dbal:^3.8 requires at least PHP 7.4, so it is impossible to do this. I think PHP 7 should be dropped from supported versions.

src/Adapter.php Outdated
@@ -97,7 +97,7 @@ public static function newAdapter($connection): Adapter
*/
public function initTable()
{
$sm = $this->connection->getSchemaManager();
$sm = $this->connection->createSchemaManager();
Copy link
Member

Choose a reason for hiding this comment

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

You can make some assertions here to ensure compatibility with lower versions.

src/Adapter.php Outdated
@@ -147,7 +147,7 @@ public function savePolicyLine($pType, array $rule)
public function loadPolicy(Model $model): void
{
$queryBuilder = $this->connection->createQueryBuilder();
$stmt = $queryBuilder->select('p_type', 'v0', 'v1', 'v2', 'v3', 'v4', 'v5')->from($this->policyTableName)->execute();
$stmt = $queryBuilder->select('p_type', 'v0', 'v1', 'v2', 'v3', 'v4', 'v5')->from($this->policyTableName)->executeQuery();
Copy link
Member

Choose a reason for hiding this comment

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

And here

@hsluoyz
Copy link
Member

hsluoyz commented May 29, 2024

Fix: #6

composer.json Outdated Show resolved Hide resolved
src/Adapter.php Outdated Show resolved Hide resolved
src/Adapter.php Outdated Show resolved Hide resolved
@leeqvip leeqvip changed the title #6 Added doctrine/dbal v4.0. feat: Added doctrine/dbal v4.0. Jun 10, 2024
@leeqvip leeqvip merged commit 0ef3ce0 into php-casbin:master Jun 10, 2024
11 checks passed
@leeqvip
Copy link
Member

leeqvip commented Jun 10, 2024

🎉 This PR is included in version 2.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

dbal v4.0 update
3 participants