Skip to content

[PHP] add support for field option "[deprecated=true]" #8211

@cawolf

Description

@cawolf

What language does this apply to?
PHP (using proto3 with protoc-gen-php)

Describe the problem you are trying to solve.
As a developer of a service client, I would like to be able to identify deprecated message fields instantly in order to not use them anymore and replace them correctly.

Describe the solution you'd like
This could be implemented by adding a @deprecated annotation to the field accessors of the generated code, as already stated in the documentation.

Describe alternatives you've considered
Alternatively, triggering error_log() with a $message_type = E_USER_DEPRECATED would have a similar effect.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions