Updated PHPStan to v1 + PHPUnit to v9. #52
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPStan 1.0 release announcement - https://phpstan.org/blog/phpstan-1-0-released
Breaking changes can be seen here - https://github.com/phpstan/phpstan/releases/tag/1.0.0
The PHP code for the extension seems fairly minimal and can't see any BC breakages myself. Tests/code quality tools passed and the detection of banned PHP functions/statements still worked when used in conjunction with PHPStan 1.0 in a test project.
I removed the ^0.12 constraint entirely since it doesn't seem overly important to me to maintain compatibility with the pre-1.0 PHPStan version. Users who can't upgrade PHPStan can remaing on an older version of this package and avoid having to maintain compatibility/test with multiple versions of PHPStan going forward for any changes made here. Let me know if you want it added back.
.php_cs.cache was renamed to .php-cs-fixer.cache in v3, see - https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/UPGRADE-v3.md#rename-of-files
Also upgraded PHPUnit to the latest version (similar to https://github.com/ekino/phpstan-banned-code/pull/41/files). Used the inbuilt migration feature to upgrade the configuration (
--migrate-configuration
) and updated to match current indentation/ordering as much as possible.Changes to the PHPUnit config structure relate to: https://github.com/sebastianbergmann/phpunit/blob/9.3.11/ChangeLog-9.3.md#configuration-of-code-coverage-and-logging-in-phpunitxml
Without updating the configuration an additional warning is displayed in the output:
Please let me know if any changes are required to get these changes merged and released.