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

[3.0]: Calling pg_version() with default connection is depracated as of PHP 8.1 #8199

Closed
Oldiesmann opened this issue May 5, 2024 · 0 comments · Fixed by #8204
Closed

[3.0]: Calling pg_version() with default connection is depracated as of PHP 8.1 #8199

Oldiesmann opened this issue May 5, 2024 · 0 comments · Fixed by #8204
Assignees
Milestone

Comments

@Oldiesmann
Copy link
Contributor

Basic Information

Found this while going through my error log to debug the PostgreSQL upgrade:

AH01071: Got error 'PHP message: PHP Deprecated: pg_version(): Automatic fetching of PostgreSQL connection is deprecated in /.../upgrade.php on line 75

Per the PHP manual, in 8.1 and up, you should pass an explicit instance of the PgSql\Connection class instead of using the default connection. It could be a while before this functionality is completely removed but now is the time to fix it

Steps to reproduce

  1. Connect to a PostgreSQL database
  2. Call pg_version() with no arguments

Expected result

No response

Actual result

No response

Version/Git revision

76f5ccf

Database Engine

PostgreSQL

Database Version

14.11

PHP Version

8.3.6

Logs

No response

Additional Information

PHP: pg_version - Manual

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

Successfully merging a pull request may close this issue.

2 participants