Skip to content

[Java] Remove php_generic_services usage for protobuf 4.x compatibility#502

Open
jvdadda wants to merge 1 commit intoawslabs:masterfrom
mobsuccess-devops:fix/remove-php-generic-services-protobuf4-compat
Open

[Java] Remove php_generic_services usage for protobuf 4.x compatibility#502
jvdadda wants to merge 1 commit intoawslabs:masterfrom
mobsuccess-devops:fix/remove-php-generic-services-protobuf4-compat

Conversation

@jvdadda
Copy link
Copy Markdown

@jvdadda jvdadda commented Mar 9, 2026

Issue #, if available: Fixes #491

Description of changes:

Removes all references to php_generic_services from FileDescriptorUtils.java and test proto files.

This option was removed from protobuf's FileOptions in protobuf 4.x (field 42 is now reserved), causing UnresolvedMethod errors 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.

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
Copilot AI review requested due to automatic review settings March 9, 2026 08:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_OPTION constant and its usage in both the proto→FileDescriptor and FileDescriptor→proto conversion paths in FileDescriptorUtils.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.

@jvdadda jvdadda changed the title Remove php_generic_services usage for protobuf 4.x compatibility [Java] Remove php_generic_services usage for protobuf 4.x compatibility Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with protobuf-java >= 4.x when building Quarkus app (3.29+)

3 participants