Skip to content

Allow @api annotation#44

Merged
rieschl merged 1 commit into
masterfrom
allow-api-annotation
May 27, 2026
Merged

Allow @api annotation#44
rieschl merged 1 commit into
masterfrom
allow-api-annotation

Conversation

@MidnightDesign
Copy link
Copy Markdown
Contributor

Summary

  • @api is meaningful (used by PHPStan, Psalm, IDEs to mark public API surface), unlike the other forbidden tags (@author, @version, etc.) which Git/LICENSE already cover.
  • Removed @api from SlevomatCodingStandard.Commenting.ForbiddenAnnotations in Eventjet/ruleset.xml.
  • Removed 'api' from general_phpdoc_annotation_remove in php-cs-fixer-rules.php.
  • Added tests/fixtures/valid/api-annotation.php so a future re-add fails the test suite.

Test plan

  • vendor/bin/phpunit — 208 tests pass (phpcs + php-cs-fixer both accept the new fixture)

🤖 Generated with Claude Code

Why: @api is a meaningful annotation for marking public API surface
(used by PHPStan, Psalm, IDEs), not a useless metadata tag like
@author/@Version.

Remove it from both the phpcs ForbiddenAnnotations list and the
php-cs-fixer general_phpdoc_annotation_remove list, and add a valid
fixture so a future re-add would fail the test suite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MidnightDesign MidnightDesign requested a review from rieschl May 27, 2026 10:02
@rieschl rieschl merged commit 994f60f into master May 27, 2026
8 checks passed
@rieschl rieschl deleted the allow-api-annotation branch May 27, 2026 10:21
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.

2 participants