Closed spaceworkplatform closed 3 years ago
Can you tell me your local PHP version? I'm unable to reproduce this issue.
I have the same issue with php 7.4 on darwin
Same issue with php 7.4 on darwin and laravel version 8.44.0
Same issue here with php 8.0
Can you reproduce this with a new Laravel app?
Same issue here:
OS: darwin Invoker Version: 2.5.0 Laravel Version: 8.44.0 Local project: true PHP Binary: /usr/local/bin/php Route: /project/index?class=App%5CModels%5CEmployee&time=1622465538019&project=local-g6c69Nz45Gq3tiPtt8u2YU
Error:
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of Doctrine\DBAL\Driver\PDOConnection::prepare($sql, $driverOptions = Array) must be compatible with Doctrine\DBAL\Driver\Connection::prepare(string $sql): Doctrine\DBAL\Driver\Statement
at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41
37▕ public function getServerVersion()
38▕ {
39▕ return \PDO::getAttribute(\PDO::ATTR_SERVER_VERSION);
40▕ }
➜ 41▕ public function prepare($sql, $driverOptions = [])
42▕ {
43▕ try {
44▕ $statement = parent::prepare($sql, $driverOptions);
45▕ \assert($statement instanceof \PDOStatement);
[2m+26 vendor frames [22m
27 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:57
Illuminate\Database\Eloquent\Builder::paginate()
28 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:36
_HumbugBoxf6d381edc73c\Invoker\Actions\IndexResourceAction::getEntries()
Whoops\Exception\ErrorException
Declaration of Doctrine\DBAL\Driver\PDOConnection::prepare($sql, $driverOptions = Array) must be compatible with Doctrine\DBAL\Driver\Connection::prepare(string $sql): Doctrine\DBAL\Driver\Statement
at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:41
37▕ public function getServerVersion()
38▕ {
39▕ return \PDO::getAttribute(\PDO::ATTR_SERVER_VERSION);
40▕ }
➜ 41▕ public function prepare($sql, $driverOptions = [])
42▕ {
43▕ try {
44▕ $statement = parent::prepare($sql, $driverOptions);
45▕ \assert($statement instanceof \PDOStatement);
[2m+23 vendor frames [22m
24 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:57
Illuminate\Database\Eloquent\Builder::paginate()
25 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:36
_HumbugBoxf6d381edc73c\Invoker\Actions\IndexResourceAction::getEntries()
Hi! I am having the same issue. This started happening since the last update. Let me know if I can provide more information.
OS: linux Invoker Version: 2.5.0 Laravel Version: 8.37.0 Local project: unknown PHP Binary: /usr/local/bin/php PHP: 8.0.1 Route: /project/index?class=App%5CDomain%5CPayees%5CModels%5COffer&time=1622467816189&project=remote-vpiXJeyXPPUksKdSxbP8QN
Error:
PHP Fatal error: Declaration of Doctrine\DBAL\Driver\PDOConnection::prepare($sql, $driverOptions = []) must be compatible with Doctrine\DBAL\Driver\Connection::prepare(string $sql): Doctrine\DBAL\Driver\Statement in phar:///tmp/forge_invoker.phar/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 41
Can you tell me your local PHP version? I'm unable to reproduce this issue.
PHP 8.0.6 (cli) (built: May 8 2021 02:01:02) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.6, Copyright (c) Zend Technologies with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans with Zend OPcache v8.0.6, Copyright (c), by Zend Technologies
Can you reproduce this with a new Laravel app?
@mpociot Managed to reproduce this on new Laravel app by requiring v3^ doctrine/dbal dependency.
PHP: 8.0.3 Laravel: 8.28.1 doctrine/dbal: 3.1.0
I noticed that one of my project could be loaded just fine and it is using doctrine/dbal 2.13.0 I downgraded the doctrine/dbal on the test laravel app from v3.1 to v2.13 and it immediately works.
Can replicate the findings of @hansensalim - I have apps locally that are using 3.1.0 and 2.13.1 of docrine/dbal. Only the 2.13.1 app is able to connect using Invoker.
Was also getting this problem, managed to fix it by downgrading doctrine/dbal to 2.13.1, it was previously 3.1.0.
downgrading to 2.13.1 also worked for me, for both a current project and new laravel project
Having the same issue after upgrading Invoker.
OS: linux (ubuntu) Invoker Version: 2.5.0 Laravel Version: 8.38 PHP: 8.0.1
OS: linux Invoker Version: 2.5.0 Laravel Version: 8.45.1 **PHP: 8.0.3
Invoker 2.5.1 fixes this issue
Great. When can we update with this version ? At this moment, this version is no available. @mpociot
It is?
Ok sorry. AutoUpdate not find it.
OS: darwin Invoker Version: 2.5.0 Laravel Version: unknown Local project: true PHP Binary: /usr/local/bin/php Route: /home
Error: