doctrine / doctrine-laminas-hydrator

Doctrine hydrators for Laminas applications
https://www.doctrine-project.org/projects/doctrine-laminas-hydrator.html
MIT License
33 stars 19 forks source link

Allow PHP 8.3 #81

Closed driehle closed 9 months ago

driehle commented 9 months ago

This PR adds support for PHP 8.3. Fortunately, all dependencies of this library are already PHP 8.3-compatible, so this step is pretty straight forward.

Minimum constraints for doctrine/collections has been raised to ensure that BC-layer is always present in 2.x series. Minimum constraint for laminas-hydrator and laminas-stdlib has been raised to lowest versions supporting PHP 8.0, so that change is only of cosmetic nature (but makes maintenance easier and, hence, should be made).

TomHAnderson commented 9 months ago

Correct me if I'm wrong, but shouldn't coding standards be checked at lowest: 8.0?

driehle commented 9 months ago

@TomHAnderson

Correct me if I'm wrong, but shouldn't coding standards be checked at lowest: 8.0?

No, that's not necessary. The minimal version compatibilty is set in phpcs.xml.dist and php-cs will adhere to that setting. Therefore, its better to run the coding standards with new newest PHP version to detect errors early.

https://github.com/doctrine/doctrine-laminas-hydrator/blob/6eebc1f52a48cfdee36eb61192609d5da32bd007/phpcs.xml.dist#L9-L10

For Psalm and PHPStan the same holds true, though they infer the PHP versions automatically be checking the composer.json file. For Psalm its possible to specify the minimum PHP version in the config, but we do not use that feature, as an automatic inflection from the composer file is more convenient and reliable.

The minimum version for php-cs will be raised within #82.