doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 270 forks source link

Add support for PHP 8.2 #791

Closed fezfez closed 1 year ago

fezfez commented 1 year ago

will be green once https://github.com/doctrine/doctrine-laminas-hydrator/pull/62 is merge

Blocked by:

fezfez commented 1 year ago

no, waiting https://github.com/laminas/laminas-code/issues/142

driehle commented 1 year ago

I just checked the upgrade path and it seems like container-interop seems to block laminas-servicemanager >3.10, which again blocks everything else. So we first need to drop the container-interop dependency, for which I created #792.

driehle $ composer why-not php 8.2
Package "php" could not be found with constraint "8.2", results below will most likely be incomplete.
doctrine/doctrine-module                        5.3.x-dev requires php (^7.4 || ~8.0.0 || ~8.1.0)   
laminas/laminas-cache                           3.2.0     requires php (^7.4 || ~8.0.0 || ~8.1.0)
laminas/laminas-cache-storage-adapter-blackhole 2.0.0     requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-cache-storage-adapter-memory    2.0.0     requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-code                            4.7.0     requires php (>=7.4, <8.2)
laminas/laminas-filter                          2.15.1    requires php (^7.4 || ~8.0.0 || ~8.1.0)
laminas/laminas-form                            3.2.0     requires php (^7.4 || ~8.0.0 || ~8.1.0)
laminas/laminas-hydrator                        4.3.2     requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-i18n                            2.15.0    requires php (^7.4 || ~8.0.0 || ~8.1.0)
laminas/laminas-inputfilter                     2.16.0    requires php (^7.4 || ~8.0.0 || ~8.1.0)
laminas/laminas-router                          3.5.0     requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-servicemanager                  3.10.0    requires php (~7.4.0 || ~8.0.0 || ~8.1.0)
laminas/laminas-session                         2.12.1    requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-validator                       2.19.0    requires php (^7.3 || ~8.0.0 || ~8.1.0)
laminas/laminas-view                            2.20.0    requires php (^7.4 || ~8.0.0 || ~8.1.0)
phpspec/prophecy                                v1.15.0   requires php (^7.2 || ~8.0, <8.2)

Besides, we have the same issue with prophecy, as in doctrine-laminas-hydrators. I would be fine with dropping prophecy here as well, but here prophecy is used quite itensively in the unit tests. So rewriting these tests would be quite a bit of work, which currently I am not capable to do.

driehle commented 1 year ago

Could you please rebase on latest 5.3.x and run composer why-not php 8.2? After I have now dropped container-interop, I think we should be left with just laminas-code and prophecy...

fezfez commented 1 year ago

Could you please rebase on latest 5.3.x and run composer why-not php 8.2? After I have now dropped container-interop, I think we should be left with just laminas-code and prophecy...

/var/www # composer why-not php 8.2
Package "php" could not be found with constraint "8.2", results below will most likely be incomplete.
laminas/laminas-code 4.7.0   requires php (>=7.4, <8.2)        
phpspec/prophecy     v1.15.0 requires php (^7.2 || ~8.0, <8.2) 

yep

driehle commented 1 year ago

I'd like to request to changes:

  1. We have just merged your PR #794 (thanks for your contribution!), so please rebase on latest 5.3.x
  2. Currently, we gain nothing by dropping PHP 7.4 and according to Packagist, about 35% of 5.x installs are still on PHP 7.4. Though this is clearly the fault of those people, I don't feel like I should teach them. Therefore, I would like to drop PHP 7.4 if, and only if, we can gain something from it like, for instance, typed signatures for methods. Those, however, would require a new major release, which I plan rather for 2023, but not for this year. So let's keep PHP 7.4 as for now.