You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when trying to instantiate the Enforcer class using this adapter:
TypeError:
Argument 1 passed to CasbinAdapter\DBAL\Adapter::fetch() must be an instance of Doctrine\DBAL\Result, instance of Doctrine\DBAL\Driver\PDOStatement given, called in /<redacted>/vendor/casbin/dbal-adapter/src/Adapter.php on line 153
at /<redacted>/vendor/casbin/dbal-adapter/src/Adapter.php:495
at CasbinAdapter\DBAL\Adapter->fetch(object(PDOStatement))
(/<redacted>/vendor/casbin/dbal-adapter/src/Adapter.php:153)
at CasbinAdapter\DBAL\Adapter->loadPolicy(object(Model))
(/<redacted>/vendor/casbin/casbin/src/CoreEnforcer.php:363)
at Casbin\CoreEnforcer->loadPolicy()
(/<redacted>/vendor/casbin/casbin/src/CoreEnforcer.php:223)
at Casbin\CoreEnforcer->initWithModelAndAdapter(object(Model), object(Adapter))
(/<redacted>/vendor/casbin/casbin/src/CoreEnforcer.php:198)
at Casbin\CoreEnforcer->initWithAdapter('/<redacted>/permission_model.conf', object(Adapter))
(/<redacted>/vendor/casbin/casbin/src/CoreEnforcer.php:150)
at Casbin\CoreEnforcer->__construct('/<redacted>/resources/permission_model.conf', object(Adapter))
(/<redacted>/src/Utilities/Permission.php:52)
From the composer.json file in this library, Doctrine 2.9 and 3.0 are supported. I am using Doctrine 2.9.3.
Digging through the source code, it looks like the execute method from DBAL Query Builder (called on line 151 in Adapter.php) returns a ResultStatement rather than the expected Result object.
Passing an array of parameters instead of a Connection object in the constructor produces the same result. Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
I get this error when trying to instantiate the Enforcer class using this adapter:
From the composer.json file in this library, Doctrine 2.9 and 3.0 are supported. I am using Doctrine 2.9.3.
Digging through the source code, it looks like the execute method from DBAL Query Builder (called on line 151 in Adapter.php) returns a
ResultStatement
rather than the expectedResult
object.Passing an array of parameters instead of a Connection object in the constructor produces the same result. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: