Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize EntrypointProvider to MemberUsageProvider to allow constants & AST-based decision #117

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

janedbal
Copy link
Member

@janedbal janedbal commented Dec 6, 2024

Renames (BC break):

# classes & methods
- `ShipMonk\PHPStan\DeadCode\Provider\MethodEntrypointProvider::getEntrypoints(): list<ReflectionMethod>` 
+ `ShipMonk\PHPStan\DeadCode\Provider\MemberUsageProvider::getUsages(): list<ClassMemberUsage>`

- `ShipMonk\PHPStan\DeadCode\Provider\SimpleMethodEntrypointProvider::isEntrypointMethod(): bool`
+ `ShipMonk\PHPStan\DeadCode\Provider\ReflectionBasedMemberUsageProvider::shouldMarkMethodAsUsed(): bool`

# neon config param
- `parameters.shipmonkDeadCode.entrypoints` 
+ `parameters.shipmonkDeadCode.usageProviders`

# neon service tag 
- `shipmonk.deadCode.entrypointProvider`
+ `shipmonk.deadCode.memberUsageProvider`

@janedbal janedbal changed the title Generatelize EntrypointProviders to UsageProviders; add ConstantUsage… Generatelize EntrypointProviders to UsageProviders; add ConstantUsageProvider Dec 6, 2024
@janedbal janedbal changed the title Generatelize EntrypointProviders to UsageProviders; add ConstantUsageProvider Generatelize EntrypointProviders to UsageProviders; add ConstantUsageProvider Dec 6, 2024
@janedbal janedbal changed the title Generatelize EntrypointProviders to UsageProviders; add ConstantUsageProvider Generalize EntrypointProviders to UsageProviders; add ConstantUsageProvider Dec 6, 2024
@janedbal janedbal changed the title Generalize EntrypointProviders to UsageProviders; add ConstantUsageProvider Generalize EntrypointProvider to MemberUsageProvider to allow constants & AST-based decision Dec 9, 2024
@janedbal janedbal mentioned this pull request Dec 9, 2024
@janedbal janedbal force-pushed the usage-providers branch 3 times, most recently from 21e22c9 to 81251b9 Compare December 20, 2024 10:48
@janedbal janedbal merged commit 3fc2bdf into master Dec 20, 2024
14 checks passed
@janedbal janedbal deleted the usage-providers branch December 20, 2024 12:47
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.

1 participant