[Java] Remove php_generic_services usage for protobuf 4.x compatibility#502
Open
jvdadda wants to merge 1 commit intoawslabs:masterfrom
Open
Conversation
The php_generic_services option was removed from protobuf's FileOptions in protobuf 4.x (field 42 is now reserved). This causes unresolved method errors at GraalVM native image build time with Quarkus 3.29+ which enforces protobuf-java >= 4.32.1. This option was never functional (PHP protobuf never supported generic services), so removing it has no impact on behavior. Fixes awslabs#491
There was a problem hiding this comment.
Pull request overview
This PR removes all references to the php_generic_services protobuf option, which was removed from protobuf-java 4.x's FileOptions (field 42 is now reserved). This option was never functional in PHP protobuf, so removing it has no behavioral impact but resolves UnresolvedMethod errors when building GraalVM native images with Quarkus 3.29+ and protobuf-java >= 4.32.1.
Changes:
- Removes the
PHP_GENERIC_SERVICES_OPTIONconstant and its usage in both the proto→FileDescriptor and FileDescriptor→proto conversion paths inFileDescriptorUtils.java - Removes the
option php_generic_services = true;line from two test proto files
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
serializer-deserializer/src/main/java/.../FileDescriptorUtils.java |
Removes constant, setter call, and getter call for php_generic_services |
serializer-deserializer/src/test/proto/TestOrderingSyntax3Options.proto |
Removes php_generic_services option from test proto |
multilang-schema-registry/shared/test/protos/TestOrderingSyntax3Options.proto |
Removes php_generic_services option from test proto |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
emilie-deltil
approved these changes
Mar 9, 2026
emilie-deltil
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Fixes #491
Description of changes:
Removes all references to
php_generic_servicesfromFileDescriptorUtils.javaand test proto files.This option was removed from protobuf's
FileOptionsin protobuf 4.x (field 42 is now reserved), causingUnresolvedMethoderrors at GraalVM native image build time with Quarkus 3.29+ which enforces protobuf-java >= 4.32.1.The option was never functional (PHP protobuf never supported generic services), so removing it has no impact on behavior.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.