Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jul 1, 2025

I've just run this rule on a legacy codebase and it's missing features:

  • when a property is defined in constructor, it should be private by default, as its only missing
  • if it uses PHP 7.4 and type is scalar, it should be added instead of no typed or mixed

@TomasVotruba TomasVotruba force-pushed the tv-complete-ctor-setup-private branch from e2bf67f to 76ccbf9 Compare July 1, 2025 10:08
@TomasVotruba TomasVotruba changed the title tv complete ctor setup private [code-quality] Make ctor defined dynamic properties private, as most probably case Jul 1, 2025
@TomasVotruba TomasVotruba merged commit 251dcf3 into main Jul 1, 2025
46 checks passed
@TomasVotruba TomasVotruba deleted the tv-complete-ctor-setup-private branch July 1, 2025 10:17
@samsonasik
Copy link
Member

I think this should be configurable, while for application, it mostly correct, on framework, it mostly cause bc break, I will create PR for it.

@TomasVotruba
Copy link
Member Author

Let's keep it as it is, untill reported otherwise 👍 I want to test defaults in the wild, before overconfiguring every rule :)

@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants