Skip to content

[removal] Remove @api annotations and dead/deprecated public API - #8794

Merged
TomasVotruba merged 15 commits into
mainfrom
tv-remove-api-annotations
Oct 24, 2026
Merged

TomasVotruba merged 15 commits into
mainfrom
tv-remove-api-annotations

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What

Drops the @api docblock annotations across src/ and rules/, together with the dead public API they used to whitelist.

Removed dead classes:

  • Rector\CodingStyle\ValueObject\ObjectMagicMethods
  • Rector\PhpDocParser\ValueObject\AttributeKey
  • Rector\RuleDoc\CodeSample\ComposerJsonAwareCodeSample
  • Rector\RuleDoc\Contract\Category\CategoryInfererInterface

Removed deprecated classes:

  • Rector\Set\ValueObject\Set
  • Rector\Set\Contract\SetInterface

Removed unused public methods:

  • BetterNodeFinder::findFirstNonAnonymousClass()
  • NodeFactory::createLocalMethodCall()

Removed unused constants on SetList and BridgeItem.

Why

@api only existed to whitelist symbols from the shipmonk dead-code rules. These symbols are no longer used anywhere - core, rules or sibling extension packages - so the annotation hid genuinely dead code. Dropping it together with the dead symbols shrinks the public surface and lets the dead-code analysis cover the rest.

Set and SetInterface were already deprecated in favor of bonding rules via ComposerPackageConstraintInterface, and are no longer consumed anywhere, so they go too.

Kept

A few symbols stay, with @api, because they are consumed outside this repo:

  • FixtureTempFileDumper, TestingParser - used by sibling package tests

Decoupled

Larger removals that touched sibling packages were split into their own PRs and already merged: PhpVersionFeature constants, UseNodesToAddCollector, GenericAnnotationToAttributeConverter, RectifiedAnalyzer + created_by_rule, RuleDefinition rule-class accessors, and the deprecated SetProvider/ComposerTriggeredSet/SetGroup/RuleCodeSamplePrinterInterface set.

@TomasVotruba
TomasVotruba force-pushed the tv-remove-api-annotations branch from a395919 to 4304c03 Compare October 23, 2026 22:08
@TomasVotruba TomasVotruba changed the title Remove @api annotations from classes, methods and constants [removal] Remove @api annotations and dead/deprecated public API Oct 23, 2026
@TomasVotruba
TomasVotruba force-pushed the tv-remove-api-annotations branch 10 times, most recently from 610f4c9 to 500e8c1 Compare October 24, 2026 09:54
@TomasVotruba
TomasVotruba force-pushed the tv-remove-api-annotations branch from 500e8c1 to 00b13e9 Compare October 24, 2026 10:01
@TomasVotruba
TomasVotruba force-pushed the tv-remove-api-annotations branch from 00b13e9 to 103f070 Compare October 24, 2026 10:03
@TomasVotruba
TomasVotruba merged commit 50e653e into main Oct 24, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-remove-api-annotations branch October 24, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant