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

Port php c extension to php8 #7793

Merged
merged 2 commits into from Aug 12, 2020
Merged

Conversation

TeBoring
Copy link
Contributor

  • Only ported c extension to php8.
  • Didn't fixed the issue of throwing warnings for missing arginfo in bundled files.
  • Tests not fixed, because syntax of phpunit (<7 vs >9.3) are not compatible.
  • In next release, needs to drop php5 and php7.0 support (in order to use phpunit > 7)

@TeBoring
Copy link
Contributor Author

Fixed #7720, hasn't fully fixed #7721

tests.sh Outdated
popd
}

build_php8.0_zts_c() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to test the ZTS build separately? I thought that the API changes for ZTS had disappeared as of PHP 7 (the TSRM stuff) and a ZTS build won't actually exercise any parallelism I don't think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

}

upb_msg_set(intern->msg, f, msgval, arena);
#if PHP_VERSION_ID < 80000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be a PHP 7.4 change, not 8.0:
https://github.com/php/php-src/blob/PHP-7.4.0/UPGRADING.INTERNALS#L171-L173

Do we have any tests for 7.4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have tests https://github.com/protocolbuffers/protobuf/blob/master/tests.sh#L665
This change just causes warning so far

#define PROTO_MSG_P(obj) (Message*)Z_OBJ_P(obj)
#define PROTO_STRVAL_P(obj) Z_STRVAL_P(obj)
#define PROTO_STRLEN_P(obj) Z_STRLEN_P(obj)
#define PROTO_RETURN_VAL void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -43,6 +43,24 @@ const zval *get_generated_pool();
#define GC_DELREF(h) --GC_REFCOUNT(h)
#endif

#if PHP_VERSION_ID < 80000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@TeBoring TeBoring merged commit d4ca929 into protocolbuffers:3.13.x Aug 12, 2020
vesavlad pushed a commit to vesavlad/protobuf that referenced this pull request Sep 22, 2020
* Only ported c extension to php8.
* Didn't fixed the issue of throwing warnings for missing arginfo in bundled files.
* Tests not fixed, because syntax of phpunit (<7 vs >9.3) are not compatible.
* In next release, needs to drop php5 and php7.0 support (in order to use phpunit > 7)
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

4 participants