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

PHP Fatal error: Uncaught Declaration of PDOCrateDB::prepare should be compatible with PDO::prepare #128

Closed
amotl opened this issue Jan 29, 2024 · 2 comments · Fixed by #129
Labels

Comments

@amotl
Copy link
Member

amotl commented Jan 29, 2024

Problem

GH-127 tripped CI with an error unrelated to the change at hand. It looks serious, something may be broken.

There was 1 error:

1) Crate\Test\DBAL\Functional\BindingTestCase::testBindPositionalParam
Doctrine\DBAL\Exception: An exception occurred while executing 'SELECT * FROM sys.cluster WHERE name = ?':

Declaration of Crate\PDO\PDOCrateDB::prepare(string $statement, array $options = Array) should be compatible with PDO::prepare($statement, $options = NULL)

-- https://github.com/crate/crate-dbal/actions/runs/7694875283/job/20966570450?pr=127#step:8:37

@amotl
Copy link
Member Author

amotl commented Jan 29, 2024

> XDEBUG_MODE=coverage phpunit --coverage-clover build/logs/clover.xml
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.33 with PCOV 1.0.11
Configuration: /home/runner/work/crate-dbal/crate-dbal/phpunit.xml.dist
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

PHP Fatal error:  During class fetch: Uncaught Declaration of Crate\PDO\PDOCrateDB::prepare(string $statement, array $options = Array) should be compatible with PDO::prepare($statement, $options = NULL)

/home/runner/work/crate-dbal/crate-dbal/vendor/crate/crate-pdo/src/Crate/PDO/PDOCrateDB.php:210
/home/runner/work/crate-dbal/crate-dbal/vendor/crate/crate-pdo/src/Crate/PDO/PDOCrateDB.php:36
/home/runner/work/crate-dbal/crate-dbal/vendor/crate/crate-pdo/src/Crate/PDO/PDO.php:31
/home/runner/work/crate-dbal/crate-dbal/src/Crate/DBAL/Driver/PDOCrate/PDOConnection.php:28
/home/runner/work/crate-dbal/crate-dbal/src/Crate/DBAL/Driver/PDOCrate/Driver.php:45
/home/runner/work/crate-dbal/crate-dbal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412
/home/runner/work/crate-dbal/crate-dbal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952
/home/runner/work/crate-dbal/crate-dbal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:84
/home/runner/work/crate-dbal/crate-dbal/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection in /home/runner/work/crate-dbal/crate-dbal/vendor/crate/crate-pdo/src/Crate/PDO/PDOCrateDB.php on line 36

-- https://github.com/crate/crate-dbal/actions/runs/7694875283/job/20982059100?pr=127#step:8:18

@amotl amotl changed the title Exception: testBindPositionalParam is failing PHP Fatal error: Uncaught Declaration of PDOCrateDB::prepare should be compatible with PDO::prepare Jan 29, 2024
@amotl amotl added the bug label Jan 29, 2024
This was referenced Jan 29, 2024
@amotl amotl closed this as completed in #129 Feb 1, 2024
@amotl
Copy link
Member Author

amotl commented Feb 2, 2024

PHP 7.x is EOL anyway, so removing corresponding support was easy. Indeed, it was all that was needed to resolve the situation. I don't know about the root cause why the test run on PHP 7.x started failing, but currently, I'd say c'est la vie, fare well PHP 7.

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 a pull request may close this issue.

1 participant