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

Drop PHP 7.4 #67

Closed driehle closed 1 year ago

driehle commented 1 year ago

This PR drops support for PHP 7.4.

Besides, I used Rector with SetList::PHP_80 to modernize the code. Besides minor changes, there are two things worth mentioning:

  1. The mixed type has been introducted in several places. According to this sample https://3v4l.org/phPOP this is not a BC break, as extending classes do not need to explicitly specify mixed.
  2. Constructor promotion has been introduced, which is not a BC break as well, as promoted contructor arguments defined in the base class are still present in extending classes. See https://stitcher.io/blog/constructor-promotion-in-php-8#inheritance and, again, https://3v4l.org/phPOP.
greg0ire commented 1 year ago

Have you tried SetList::UP_TO_PHP_80 ? In case some pieces of code don't even use 7.4 syntax?

driehle commented 1 year ago

Have you tried SetList::UP_TO_PHP_80 ? In case some pieces of code don't even use 7.4 syntax?

Good catch, I now used LevelSetList::UP_TO_PHP_80 instead of SetList::PHP_80. One change dropped array_merge(), another one introduced is_iterable(). Plus several changes in the test files.