Skip to content

Conversation

@JanTvrdik
Copy link
Member

@JanTvrdik JanTvrdik commented Nov 25, 2025

Summary

  • Drop support for PHP versions below 8.1
  • Refactor UsedSymbolExtractor to use the native PhpToken class instead of token_get_all()
  • Remove all PHP 7.x compatibility code paths
  • Replace slevomat/coding-standard with shipmonk/coding-standard ^0.2.0
  • Update phpunit/phpunit to ^10.5
  • Update phpstan/phpstan to ^2.1
  • Update phpstan/phpstan-phpunit to ^2.0
  • Update phpstan/phpstan-strict-rules to ^2.0
  • Simplify phpcs.xml.dist to use ShipMonkCodingStandard ruleset
  • Use constructor property promotion where possible
  • Update CI to run checks on PHP 8.5

Test plan

  • All existing tests pass (116 tests, 688 assertions)
  • PHPStan analysis passes with no errors
  • PHP_CodeSniffer passes with no errors
  • Self-analysis passes with no composer issues

- Update composer.json to require PHP ^8.0
- Refactor UsedSymbolExtractor to use PhpToken::tokenize() instead of token_get_all()
- Remove all PHP_VERSION_ID < 80000 compatibility code paths
- Update phpstan.neon.dist and phpcs.xml.dist to target PHP 8.0
- Remove unnecessary (string) casts since substr() always returns string in PHP 8.0+
- Remove PHP 8.0 version guard from attribute test case
- Replace slevomat/coding-standard with shipmonk/coding-standard ^0.2.0
- Update phpunit/phpunit to ^10.5
- Update phpstan/phpstan to ^2.1
- Update phpstan/phpstan-phpunit to ^2.0
- Update phpstan/phpstan-strict-rules to ^2.0
- Simplify phpcs.xml.dist to use ShipMonkCodingStandard ruleset
- Update phpstan.neon.dist phpVersion to 80100
- Apply code style fixes from new coding standard
@JanTvrdik JanTvrdik changed the title Drop PHP < 8.0 support and switch to PhpToken class Drop PHP < 8.1 support, switch to PhpToken, and update dependencies Nov 26, 2025
- Update CI to run checks on PHP 8.5 instead of 8.3
- Fix phpunit command (remove -vvv which is unsupported in PHPUnit 10)
- Use constructor property promotion in:
  - PathToScan
  - SymbolUsage
  - UnusedSymbolIgnore
  - UnusedErrorIgnore
  - Printer
  - ConsoleFormatter
  - JunitFormatter
  - Initializer
@JanTvrdik JanTvrdik marked this pull request as ready for review November 26, 2025 14:52
@JanTvrdik JanTvrdik requested a review from janedbal November 26, 2025 14:55
@JanTvrdik JanTvrdik requested a review from janedbal November 27, 2025 09:42
@janedbal janedbal merged commit e66f493 into master Nov 27, 2025
96 checks passed
@janedbal janedbal deleted the php80only branch November 27, 2025 10:01
@janedbal
Copy link
Member

image

@JanTvrdik
Copy link
Member Author

I completely forgot about this one =)

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.

3 participants