brick / date-time

Date and time library for PHP
MIT License
337 stars 30 forks source link

Install Rector and apply ClassPropertyAssignToConstructorPromotionRector #99

Closed gnutix closed 8 months ago

gnutix commented 8 months ago

Hello there! I've noticed that the project was not using promoted properties, even though its minimum PHP version supports them. Yet it's using readonly properties already. So I thought it would be a good idea to add Rector in the project to allow doing automated refactorings to keep the codebase up-to-date.

With the current config file, if you bump the minimum PHP version in composer.json, it will apply the refactorings that can be done in the new PHP version, making sure the code is always the latest and brightest.

cf. https://getrector.com/documentation/integration-to-new-project

Let me know what you think.

TODO

gnutix commented 8 months ago

Coverage decreased (-0.01%) to 99.363%

@BenMorel This PR is ready to be reviewed, the failed CI is not a problem.

gnutix commented 8 months ago

I think we're all good here. Would you mind creating a release once this PR is merged (and maybe #98 I guess) ? :pray:

BenMorel commented 8 months ago

Thank you, @gnutix!

BenMorel commented 8 months ago

@gnutix Released in 0.6.1!