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

Added support for PHP 8.1 (currently in RC1) to the C extension #8964

Merged
merged 1 commit into from Sep 10, 2021

Conversation

haberman
Copy link
Member

@haberman haberman commented Sep 10, 2021

This switches to new interfaces for spl_ce_ArrayAccess and spl_ce_Countable (zend_ce_arrayaccess and zend_ce_countable, respectively). It polyfills zend_ce_countable for old versions of PHP.

There is also a small fix for the tests to fix the following error:

1) GeneratedClassTest::testMapFieldViaArray
Implicit conversion from float 6.1 to int loses precision

In PHP float array keys are truncated to integer, and this has nothing to do with protobuf.

The pure PHP library may require further fixes to support 8.1. I was not able to resolve those issues at this time.

Fixes: #8711

@haberman haberman merged commit 605ab95 into protocolbuffers:3.18.x Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants