array_values rule (report when a list type is always passed in) (#2917), thanks @kamil-zacek!
If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:
Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more
New PHP_CodeSniffer\Sniffs\DeprecatedSniff interface to allow for marking a sniff as deprecated. #281
If a ruleset uses deprecated sniffs, deprecation notices will be shown to the end-user before the scan starts.
When running in -q (quiet) mode, the deprecation notices will be hidden.
Deprecated sniffs will still run and using them will have no impact on the exit code for a scan.
In ruleset "explain"-mode (-e) an asterix * will show next to deprecated sniffs.
Sniff maintainers are advised to read through the PR description for full details on how to use this feature for their own (deprecated) sniffs.
Squiz.PHP.EmbeddedPhp : the sniff will now also examine the formatting of embedded PHP statements using short open echo tags. #27
Includes a new ShortOpenEchoNoSemicolon errorcode to allow for selectively ignoring missing semicolons in single line embedded PHP snippets within short open echo tags.
The other error codes are the same and do not distinguish between what type of open tag was used.
Sniff tests which extend the PHPCS native AbstractSniffUnitTest class will now show a (non-build-breaking) warning when test case files contain fixable errors/warnings, but there is no corresponding .fixed file available in the test suite to verify the fixes against. #336
The warning is only displayed on PHPUnit 7.3.0 and higher.
The warning will be elevated to a test failure in PHPCS 4.0.
Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches
New PHP_CodeSniffer\Sniffs\DeprecatedSniff interface to allow for marking a sniff as deprecated. #281
If a ruleset uses deprecated sniffs, deprecation notices will be shown to the end-user before the scan starts.
When running in -q (quiet) mode, the deprecation notices will be hidden.
Deprecated sniffs will still run and using them will have no impact on the exit code for a scan.
In ruleset "explain"-mode (-e) an asterix * will show next to deprecated sniffs.
Sniff maintainers are advised to read through the PR description for full details on how to use this feature for their own (deprecated) sniffs.
Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
New Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence sniff. #197
Forbid mixing different binary boolean operators within a single expression without making precedence clear using parentheses
Thanks to [Tim Düsterhus][@TimWolla] for the contribution
Squiz.PHP.EmbeddedPhp : the sniff will now also examine the formatting of embedded PHP statements using short open echo tags. #27
Includes a new ShortOpenEchoNoSemicolon errorcode to allow for selectively ignoring missing semicolons in single line embedded PHP snippets within short open echo tags.
The other error codes are the same and do not distinguish between what type of open tag was used.
Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
The Performance report can now also be used for a phpcbf run. #308
Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
Sniff tests which extend the PHPCS native AbstractSniffUnitTest class will now show a (non-build-breaking) warning when test case files contain fixable errors/warnings, but there is no corresponding .fixed file available in the test suite to verify the fixes against. #336
The warning is only displayed on PHPUnit 7.3.0 and higher.
The warning will be elevated to a test failure in PHPCS 4.0.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dev-dependencies group with 2 updates: phpstan/phpstan and squizlabs/php_codesniffer.
Updates
phpstan/phpstan
from 1.10.57 to 1.10.59Release notes
Sourced from phpstan/phpstan's releases.
... (truncated)
Commits
e607609
PHPStan 1.10.59995eff9
Updated PHPStan to commit 995eff969168ed1d2f291b1d1da8842e7da39f52473df92
Updated PHPStan to commit 473df926b3f687e968e8e519e310882ab72ff4ff299df51
Updated PHPStan to commit 299df5130a14d5a23073edb044b46209ee7b5426d2c30d1
Updated PHPStan to commit d2c30d159f7aabb24f188d7d0a8a1b9ea87f8b61b026126
Updated PHPStan to commit b0261263e2e3a3643a9a89eb0931c07d8e71dc18938321c
Updated PHPStan to commit 938321ce0ebb24da8cd550b525ae50651fffc156cfe839d
Update baselines7a2af63
Updated PHPStan to commit 7a2af631d14529f2c7be95e064fbfef0bedc4b9f37f3c82
Updated PHPStan to commit 37f3c826b18410fbfae33ad2993029b5e8a755b0Updates
squizlabs/php_codesniffer
from 3.8.1 to 3.9.0Release notes
Sourced from squizlabs/php_codesniffer's releases.
... (truncated)
Changelog
Sourced from squizlabs/php_codesniffer's changelog.
... (truncated)
Commits
d63cee4
Merge pull request #341 from PHPCSStandards/feature/changelog-3.9.04a9addc
Changelog for the 3.9.0 release4bbc820
Merge pull request #340 from fredden/missing-fixed-file/Squiz.Commenting.Clos...66e87a1
Avoid adding extra newlines when adding a comment392b2b5
Add auto-generated ".fixed" file3e582fe
Merge pull request #339 from PHPCSStandards/feature/various-minor-cs-cleanup814896b
Merge pull request #338 from PHPCSStandards/feature/various-docs-tweaks479b4dc
CS: various minor fixes8e92de6
Changelog: various tweaks21219d1
README: minor tweakDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show