Skip to content

[PHP] option exclude backwards compatible proto files #9593

@bshaffer

Description

@bshaffer

For PHP all nested messages generate two classes, the current namespaced class and a file to support backwards compatibility with the previous non-namespaced files. There's also a class_alias call at the bottom of every nested message. See this PR from almost 4 years ago.

As been almost 4 years, these files are now more of a nuisance. I see three potential options here, ranked from least to most risky:

  • Add a flag to tell protoc to not generate these files for PHP (opt-out, most conservative)
  • Add a flag to tell protoc to generate these files for PHP (opt-in, could potentially break some very slow to upgrade users)
  • Remove the backwards compatibility logic all together (as it's been throwing deprecation errors for almost four years, I feel comfortable with this solution)

I'm happy to give a PR a try any of these options are possible!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions