-
Notifications
You must be signed in to change notification settings - Fork 199
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
PHP8 extension support? #1161
Comments
Support for PHP 8 is currently being tracked in PHPC-1631. It currently doesn't have an estimated completion date, but we definitely plan to release a version of the driver with PHP 8 compatibility before PHP 8.0 itself is tagged. |
thanks for the update! for some reason I could not access Jira without login yesterday. |
I make the same with pecl php 8-beta 3 with the same results |
@nlared we will post an update once we've got a working version. Future beta or RC releases of PHP 8 won't make this extension work. Due to internal API changes in PHP, we need to update significant portions of the driver, which takes time to ensure that the extension will still compile in all versions of PHP we want to support (most likely PHP 7.0 and newer). |
The config.w32 needs some changes as well at https://github.com/mongodb/mongo-php-driver/blob/master/config.w32#L70 because JSON is enabled by default now. See php/php-src#5495 (comment) for a possible fix.
applies to json in PHP 8 as well. |
The fix mentioned by @Jan-E is only necessary before php/php-src@5609701 (available as of PHP 8.0.0RC3, scheduled for Oct, 29th). |
I've also submitted php/php-src#6383. |
Confirmed. But beware: the fix for ext/standard and ext/date will only be available in PHP 7.3+ |
@Jan-E: is there a way to properly handle this in PHP 7 all the way to PHP 8, or should we leave this as is for the time being? |
I think you can use any of the PHP_VERSION variables in config.w32 to conditionally add the dependencies. |
I've created PHPC-1704 to track the improvements to the Windows build scripts. I'll close out this issue as master compiles against PHP 8. We'll be releasing a beta for 1.9.0 in the coming days, with a stable release coming before the release of PHP 8 later this month. Until the releases happen, people can follow the instructions on building the driver from source to test on PHP 8. |
Bug Report
Out of curiosity I wanted to try running the test pipeline (Docker), mainly phpunit tests of one of our projects on PHP8 beta2 to see if there are any code errors, when I discovered that the MongoDB extension cannot be built in php8 because of some C errors (apparently... I don't really understand those C exceptions).
Environment
I used the Docker image
php:8.0.0beta2
with pickle as replacement for pecl (pecl isn't available anymore in php8).That's the Dockerfile
Expected and Actual Behavior
Well, the expected behavior is the extension being built successfully. Instead some exceptions are thrown.
To rule out pickle as source of error I tried the same Dockerfile with
php:7.4-cli
without error.Debug Log
The Docker image build process errors on
pickle install --defaults --no-interaction mongodb
with the following error:Is there something missing on my side or needs the extension some work to run on PHP8?
Thanks for your help!
The text was updated successfully, but these errors were encountered: