-
-
Notifications
You must be signed in to change notification settings - Fork 65
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: add support for PHP8.4 #151
Conversation
Thanks for the PR. I need to set up a PHP8.4 environment and will test this along with the Laravel OCI8 package. |
I had the same issue on PHP 8.4.1 with pdo-via-oci 3.5.0. ⬢ [Docker] ❯ php -v
PHP 8.4.1 (cli) (built: Nov 21 2024 17:57:55) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies
> DB::connection('oracle')
{
"message": "Cannot make static method PDO::connect() non static in class Yajra\\Pdo\\Oci8",
"context": {
"exception": {
"class": "Symfony\\Component\\ErrorHandler\\Error\\FatalError",
"message": "Cannot make static method PDO::connect() non static in class Yajra\\Pdo\\Oci8",
"code": 0,
"file": "/app/vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8.php:136"
}
},
"level": 400,
"level_name": "ERROR",
"channel": "local",
"datetime": "2024-12-14T05:29:25.054917+09:00",
"extra": {}
} Works perfectly by this PR's fix. > DB::connection('oracle')->table('emp')->get()
= Illuminate\Support\Collection {#6560
all: [
{#6548
+"empno": "aaa",
+"empname": "test",
+"gender_f": "0",
},
],
} Also this fix works on php 8.3. ⬢ [Docker] ❯ php -v
PHP 8.3.1 (cli) (built: Jan 11 2024 06:55:06) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.1, Copyright (c) Zend Technologies
with Zend OPcache v8.3.1, Copyright (c), by Zend Technologies
root in app on main [#!?⇣] via v22.4.1 via 🐘 v8.3.1
⬢ [Docker] ❯ php artisan tinker
Psy Shell v0.12.4 (PHP 8.3.1 — cli) by Justin Hileman
> DB::connection('oracle')->table('emp')->get()
= Illuminate\Support\Collection {#6560
all: [
{#6548
+"empno": "aaa",
+"empname": "test",
+"gender_f": "0",
},
],
} |
@danielrona |
Unfortunately, I am not yet able to set up a php8.4 due to some constraints. Given @shufo's review, I think this is good for a release. But it would be nice if we could include php8.3 and 8.4 in the CI matrix. Can we try and add it in the matrix @danielrona? Thanks! |
@yajra this should do the trick i guess. |
Released on https://github.com/yajra/pdo-via-oci8/releases/tag/v3.6.0 🚀 Thanks! |
With PHP 8.4 introducing PDO Subclasses and a new connect function.
I had to rename this to not crash on 8.4
[11.x] Add PDO subclass support for PHP 8.4 #52538