This PR modifies `php_generator.cc` to:
- Add PHP typehints to setter method signatures for all types (for 64-bit integers, the type hint is `int|string` to maintain compatibility with 32-bit systems)
- Remove redundant `GPBUtil::check...` for primitive types and messages (the PHP type hint provides sufficient validation)
- Retain `GPBUtil::check...` for 32 and 64-bit integers, strings (for UTF-8 validation), enums, maps, and repeated fields
Additionally makes the following changes:
- Updates descriptor protos with generator changes
- Suppresses float to int "loss of precision" warnings in tests which expect it
- Removes compatibility in tests with PHPUnit 6, which is no longer needed
- Proper casing in gencode for `true` and `false` (instead of `True` and `False`)
Closes#25296
PiperOrigin-RevId: 856990912
* [PHP] Fixed $msg->setMessage(null) to properly clear the message.
Fixes: https://github.com/protocolbuffers/protobuf/issues/8457
* Changed pure PHP to throw TypeError, and added a test for null.
* Added more tests and fixed null in setter for oneof.
* Fixed a bunch of incorrect arginfo and a few incorrect error messages.
* Passes mem check test with no leaks!
* WIP.
* Fix build warning that was causing Bazel build to fail.
* Added compatibility code for PHP <8.0.
* Added test_valgrind target and made tests Valgrind-clean.
* Updated Valgrind test to fail if memory leaks are detected.
* Removed intermediate shell script so commands are easier to cut, paste, and modify.
* Passing all Valgrind tests!
* Hoist addref into ObjCache_Get().
* Removed special case of map descriptors by keying object map on upb_msgdef.
* Removed all remaining RETURN_ZVAL() macros.
* Removed all explicit reference add/del operations.
* Added REFCOUNTING.md to Makefile.am.
Also updated the code to use a TypeInfo struct for convenient
passing of type and desc together. This simplified a lot of code
and made this change easier to write.
* Port for php8
* Port php c extension for php8
* Update composer.json
* Drop php7.0 support
* Update phpunit for php7.1 in c extension test
* Add back support for php7.0
* Add badge for php8 continuous build
* 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)