packagist icon indicating copy to clipboard operation
packagist copied to clipboard

Add Rector and use PHP 8 attributes

Open IonBazan opened this issue 1 year ago • 1 comments

This PR adds Rector which helps with PHP and libraries/frameworks upgrades. Because the diff would be too large for manual review, I left executing the upgrade to the maintainer.

Changes include:

  • Adding rector/rector dependency and upgrading phpstan/phpstan
  • Adding Symfony 5.4 upgrade list - uses #[Route] and #[Assert\*] attributes instead of annotations
  • Adding Doctrine ORM 2.9 list - uses PHP 8 attributes instead of annotations for entity mapping (a change is needed in config/packages/doctrine.yaml)
  • Adding PHPUnit 9.x list - uses $this->createMock() where applicable
  • Converting App\Validator\* constraints to PHP 8 attributes

Unfortunately, adding PHP 8 upgrade rules list causes Rector to crash on my machine so I didn't add it this time.

IonBazan avatar Aug 03 '22 02:08 IonBazan

composer.lock

Dev Package changes

Package Operation From To Changes
rector/rector add - 0.13.9 view code
phpstan/phpstan upgrade 1.7.2 1.8.2 diff

Settings · Docs · Powered by Private Packagist

private-packagist[bot] avatar Aug 03 '22 02:08 private-packagist[bot]

Closing as https://github.com/composer/packagist/pull/1329 includes the commit here. Thanks for just sending the config and not doing all the changes :)

Seldaek avatar Sep 02 '22 15:09 Seldaek