-
Notifications
You must be signed in to change notification settings - Fork 17
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
[TASK] Add static code analyser PHPStan
as code quality check
#262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mix now again different things, you add phpstan and typo3-rector.
Also import namespaces instead using FQCNs.
As you can read in the description this Depends on #261 |
Then please, set it as draft. |
It is absolutely your right to decide like this |
8203a9d
to
597d215
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on it to make minor adjustments ...
The TYPO3 Core and the Best Practice Team recommends to have a static code analyzer in the defense line, and preferes PHPStan due to experience with that tool. This change now adds the static code analyser `PHPStan` with a first configurattion and a lower level as a start. Levels can be raised step by step in follow-ups. Note: XClass `Classes/Xclass/NewRecordController.php` example does not work anymore, most likely since v12. Added a comment to emphasize this, and that it should be reworked or removed. PHPStan can be run with ```terminal Build/Scripts/runTests.sh -s phpstan ``` Generate baseline with ```terminal Build/Scripts/runTests.sh -s phpstanBaseline ```
PHPStan
as code quality check
The TYPO3 Core and the Best Practice Team recommends to have a static code analyzer in the defense line, and preferes PHPStan due to experience with that tool. This change now adds the static code analyser `PHPStan` with a first configurattion and a lower level as a start. Levels can be raised step by step in follow-ups. Note: XClass `Classes/Xclass/NewRecordController.php` example does not work anymore, most likely since v12. Added a comment to emphasize this, and that it should be reworked or removed. PHPStan can be run with ```terminal Build/Scripts/runTests.sh -s phpstan ``` Generate baseline with ```terminal Build/Scripts/runTests.sh -s phpstanBaseline ``` (cherry picked from commit 8661cfc)
The TYPO3 Core and the Best Practice Team recommends to have a static code analyzer in the defense line, and preferes PHPStan due to experience with that tool. This change now adds the static code analyser `PHPStan` with a first configurattion and a lower level as a start. Levels can be raised step by step in follow-ups. Note: XClass `Classes/Xclass/NewRecordController.php` example does not work anymore, most likely since v12. Added a comment to emphasize this, and that it should be reworked or removed. PHPStan can be run with ```terminal Build/Scripts/runTests.sh -s phpstan ``` Generate baseline with ```terminal Build/Scripts/runTests.sh -s phpstanBaseline ``` (cherry picked from commit 8661cfc)
The TYPO3 Core and the Best Practice Team recommends
to have a static code analyzer in the defense line,
and preferes PHPStan due to experience with that tool.
This change now adds the static code analyser
PHPStan
with a first configurattion and a lower level as a start.
Levels can be raised step by step in follow-ups.
Note: XClass
Classes/Xclass/NewRecordController.php
example does not work anymore, most likely since v12.
Added a comment to emphasize this, and that it should
be reworked or removed.
PHPStan can be run with
Generate baseline with