Commit graph

9 commits

Author SHA1 Message Date
Protobuf Team Bot
4208121992 Breaking Change: Remove deprecated PHP APIs FieldDescriptor getLabel, use IsRepeated or isRequired instead.
https://protobuf.dev/news/2025-09-19/#php-remove-apis

PiperOrigin-RevId: 845456074
2025-12-16 15:26:03 -08:00
Mike Kruskal
69efbc67c5 Implement hasPresence helper in PHP, remove broken hasOptionalKeyword.
hasOptionalKeyword has been broken for 3 years since b27dd18676 deleted the internal implementation.  hasPresence uses the better semantics we've rolled out in other languages, which will work well under editions.

PiperOrigin-RevId: 820920132
2025-10-17 19:59:45 -07:00
Protobuf Team Bot
d82de8f147 Deprecate Descriptor Label. As an alternative, add helper methods for checking whether a field is required or repeated.
This is for PHP and Ruby.

PiperOrigin-RevId: 743308499
2025-04-02 15:49:47 -07:00
Joshua Haberman
a8c600f900 Updated oneof count. 2022-08-03 19:35:39 +00:00
Joshua Haberman
763f08c620 [PHP] Added getContainingOneof and getRealContainingOneof to descriptor. 2022-08-03 19:04:39 +00:00
Joshua Haberman
8b87075924
Updated and simplified PHP testing structure (#8558)
* Simplified PHP testing setup.

- Consolidated on a single autoloader, created by composer.
- Consolidated on a single phpunit invocation strategy: we run
  phpunit on a directory, which will run all tests matching *Test.php
  in that directory.
- We now rely on autoloading to import all test protos. require_once()
  calls for test protos are removed.
- For now the valgrind tests are removed. A follow-up PR will re-enable
  them in a more robust way.

* More improvements to PHP testing.

1. Replace custom PHPUnit-selection logic in test.sh with generic
   composer version selection.
2. Optimized both test proto generation and the custom extension
   build to avoid unnecessary work when the files are already up
   to date.

* Added assertions to verify that the C test doesn't use PHP sources.

* Updated tests.sh for the new PHP testing commands.

* Removed obsolete rules from tests.sh.

* Fixed generate_test_protos.sh for when tmp does not exist.

Also removed undefined_test.php and fixed Makefile.am.

* Added php8.0_all again which is still used.

* Added missing file to Makefile.am.

* Re-added php_all_32 rule which is also still used.

* Updated testing commands for macOS and download composer.

* Use /usr/local/bin on mac instead of /usr/bin, since the latter is not writable.
2021-05-04 10:19:22 -07:00
Paul Yang
823f351448
Port for php8 (#8105)
* 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
2020-12-04 13:46:34 -08:00
Adam Cozzette
58f4260e8e Merged 3.13.x into master 2020-08-17 11:06:11 -07:00
Paul Yang
d4ca92962c
Port php c extension to php8 (#7793)
* 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)
2020-08-11 19:30:46 -07:00
Renamed from php/tests/descriptors_test.php (Browse further)