Skip to content

Enforce safe constructor overrides with @phpstan-consistent-constructor #3687

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

Merged

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Nov 28, 2024

Closes phpstan/phpstan#12137

very much analogue to how it works for constructor parameters.

small docs changes: phpstan/phpstan#12138

@herndlm herndlm changed the base branch from 2.0.x to 1.12.x November 28, 2024 09:57
@herndlm herndlm force-pushed the consistent-constructor-visibility branch 2 times, most recently from 92d4494 to d70249b Compare November 28, 2024 09:57
@herndlm herndlm changed the base branch from 1.12.x to 2.1.x December 24, 2024 18:31
@herndlm herndlm force-pushed the consistent-constructor-visibility branch 4 times, most recently from e8e5d0a to 06d9e9a Compare December 30, 2024 09:15
@herndlm herndlm force-pushed the consistent-constructor-visibility branch from 06d9e9a to 401e135 Compare January 4, 2025 13:11
@ondrejmirtes ondrejmirtes merged commit 17d6b29 into phpstan:2.1.x Jan 4, 2025
426 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@herndlm herndlm deleted the consistent-constructor-visibility branch January 4, 2025 13:34
@herndlm
Copy link
Contributor Author

herndlm commented Jan 4, 2025

Thank you! I hope I didn't cause too much noise, sorry.. Just wanted to get the ci green and then leave PRs as they are :)

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.

@phpstan-consistent-constructor is still unsafe if child class has a private constructor
2 participants