Skip to content

Suffix interfaces with Interface and traits with Trait - #554

Merged
Firehed merged 35 commits into
mainfrom
552/interface-trait-naming
Sep 13, 2026
Merged

Firehed merged 35 commits into
mainfrom
552/interface-trait-naming

Conversation

@Firehed

@Firehed Firehed commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Closes #552.

Every interface under src/ and tests/ now ends in Interface, and every trait in Trait. A PHPCS rule pins the convention so future additions cannot skip the suffix.

Layout

  • First commit turns on Generic.NamingConventions.InterfaceNameSuffix and Generic.NamingConventions.TraitNameSuffix in phpcs.xml.dist.
  • Each following commit does one rename: interface or trait declaration, defining file, and every consumer (source, tests, deptrac, phpstan, docs, CLAUDE.md).
  • Two follow-ups fix wrapping and prose the mechanical Type pass over-reached on.

Notes

  • tests/Fixtures/* is out of scope (already excluded from PHPCS) so PSR examples stay intact.
  • OneRoutePerFactTest composite and layout checks now strip the Interface suffix before comparing, so SyntaxSourceInterface and its CompositeSyntaxSource still satisfy the same-family-namespace rule.
  • The phpstan baseline picked up the new TypeSourceInterface deprecation text; no baseline entries were added.

🤖 Generated with Claude Code

Firehed and others added 30 commits September 12, 2026 21:22
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rface

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Strip "Interface" suffix in OneRoutePerFactTest composite and layout
checks so the family naming convention still holds when interfaces
carry the suffix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Update the phpstan baseline's ignored deprecation messages to match
TypeFactory's renamed target.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Firehed and others added 3 commits September 12, 2026 21:57
The wider suffixes pushed a handful of lines past 120 characters and
changed the alphabetical order of a few use blocks; wrap the lines and
let phpcbf re-sort the imports.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The bulk perl pass rewrote every bare "Type" — including RFC section
titles and general prose about the type concept. Undo those so the
docs describe types, not the TypeInterface interface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (f2bbffc) to head (54bdcd8).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #554   +/-   ##
=========================================
  Coverage     99.72%   99.72%           
  Complexity     1909     1909           
=========================================
  Files           134      134           
  Lines          5005     5005           
=========================================
  Hits           4991     4991           
  Misses           14       14           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

* Context-specific type validity:
*
* | Type | Property | Parameter | Return |
* | TypeInterface | Property | Parameter | Return |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Overreach

Firehed and others added 2 commits September 12, 2026 22:26
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Firehed
Firehed enabled auto-merge (squash) September 13, 2026 05:29
@Firehed
Firehed merged commit 6018509 into main Sep 13, 2026
9 checks passed
@Firehed
Firehed deleted the 552/interface-trait-naming branch September 13, 2026 05:30
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.

Update codebase to follow XInterface and XTrait naming conventions

1 participant