Skip to content
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

Updated PHPStan to v1 + PHPUnit to v9. #52

Merged
merged 4 commits into from
Nov 2, 2021
Merged

Updated PHPStan to v1 + PHPUnit to v9. #52

merged 4 commits into from
Nov 2, 2021

Conversation

raing3
Copy link
Contributor

@raing3 raing3 commented Nov 1, 2021

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:

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Please let me know if any changes are required to get these changes merged and released.

composer.json Show resolved Hide resolved
@mremi mremi merged commit 6897fd1 into ekino:master Nov 2, 2021
@mremi
Copy link
Member

mremi commented Nov 2, 2021

Thanks a lot for this update

@raing3
Copy link
Contributor Author

raing3 commented Nov 2, 2021

Thanks for reviewing and merging so promptly. :)

@mremi
Copy link
Member

mremi commented Nov 2, 2021

And a new tag is available https://github.com/ekino/phpstan-banned-code/releases/tag/v1.0.0

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.

2 participants