Skip to content

feat(docs): add deprecation notice to methods and constants#9245

Merged
bshaffer merged 1 commit into
mainfrom
dev-refdocs-notices
Jun 11, 2026
Merged

feat(docs): add deprecation notice to methods and constants#9245
bshaffer merged 1 commit into
mainfrom
dev-refdocs-notices

Conversation

@bshaffer

Copy link
Copy Markdown
Contributor

fixes #6792

adds deprecated notice to classes, methods, constants, parameters, and nested parameters

  • Classes can now receive this, but we exclude deprecated classes from the reference documentation. This was done because when we first published the reference documentation, there was no need for deprecated classes. Once we release a GAX and Auth library 2.0, it would make sense to add them back. Once we do, the deprecation notices will show up.
  • Parameters and Nested Parameters can now receive this, but it's important to note there's no consistent way in phpdoc to mark a parameter as deprecated. The closest we have is to prefix the description with [DEPRECATED]. In protobuf, sometimes this is after the keyword Optional, so if [DEPRECATED] shows up anywhere in the parameter or nested parameter description, it's considered deprecated.
  • Constants and methods look for @deprecated as expected, but this should be at the END of the constant or method description, otherwise the notice_content will contain the phpdoc content instead of just the deprecation content.

@bshaffer bshaffer merged commit 67c73b3 into main Jun 11, 2026
38 checks passed
@bshaffer bshaffer deleted the dev-refdocs-notices branch June 11, 2026 16:28
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.

feat(docs): add notices for "deprecated" fields and variables

2 participants