-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for PHP 8.4 to version 6 #767
Comments
Unfortunately, v6 of DoctrineORMModule cannot support PHP 8.4. We will need to make a new major release, probably including BC breaks. The reason is as follow: Many of the Laminas packages relevant to this module (including forms, inputfilter, mvc and view) do not yet support laminas-servicemamager v4 and rely still on v3. Therefore, we cannot got for servicemamager v4 yet. Besides, laminas-cache v3 does not support PHP 8.4. The Laminas-cache v4 does, but that one again need servicemamager v4, which we cannot go for, as explained. Hence, while requiring laminas-cache we are stuck to PHP 8.3. My preferred solution is to get rid of laminas-cache, by replacing it with symfony/cache. The symfony package fits the Doctrine ecosystem quite well. After switching to symfony/cache, we could support PHP 8.4. However, we would need to make a new major of DoctrineModule, as changing the cache would change it's implementation from the Laminas interfaces to PSR-6. Let me know what you think. |
@driehle If it is really laminas-cache v3 not supporting PHP 8.4 that is the issue, that can be fixed on Laminas's side and I can work with the team to release a version of laminas-cache v3 that runs on PHP 8.4. No one should be forced into a major upgrade because of PHP 8.4. |
and BTW, when the Doctrine project decides to create a v7 of this component, it should best avoid having one huge package that provides Doctrine support for many Laminas components all at once. It would be better to have separate packages for Form, Validator, Paginator, etc. |
Agree, the time for Doctrine(ORM)Module to got for service-manager v4 has not yet come IMO.
I do, however, thinkg that switching from laminas-cache to symfony/cache is benefitial for DoctrineModule, for the following reasons:
Alltogether, arguments for switching to symfony/cache are overwhelming.
I am not a fan of such an option. First of all, I am currently the only maintainer for the Laminas integrations in the Doctrine team. Maintaining a few more projects is simply not feasible. Second, looking at what is happening to laminas-cache, I am in general not a big fan of splitting things into too many small pieces. The Laminas project is clearly suffering from a lack of contributions, partly - so do I think - because the ecosystem has grown to be too complex. Let's keep it simple and try to keep things together where they belong.
The greatest help you could probably provide currently is in adding support to laminas-servicemanager v4 to the remaining components. These are, in no specific order:
|
@driehle The ServiceManager v4 upgrade is a real pain for MVC components. It's the plugin manager that has changed between V3 and V4, and the versions are not backward compatible. Therefore any component that uses a plugin manager needs to create a new major version. laminas-mvc itself needs a major uplift and it is not getting much attention from the Laminas Project as everyone in the team is more focused on Mezzio. Lack of maintainers on the project has been and continues to be a major issue. Doing maintenance work is not as interesting as working on new stuff for many people. Lack of maintenance makes an ecosystem less interesting which in turn makes it less interesting for people to contribute. |
I think something has been overlooked here: laminas-cache follows the idea of Composer who describes himself like this: "A Dependency Manager for PHP". And APCu, Memcached or Redis are dependencies, therefore it is correct to list these dependencies in the Composer configuration. But if all extensions in one package are required, you can hardly install the package. Therefore the satellite packages for the different adapters. With the background that this package is a module for Laminas and Mezzio, I think other questions should be asked:
|
I get your point, yet I disagree. Are you considering that the caches provided by DoctrineModule are not primarily intented to be used by the end user but rather needed for the configuration of Doctrine? In 2.x, Doctrine provides So to get Doctrine running and having at least a metadata cache set up (I consider this mandatory), we need a PSR-6 cache if we want to support Doctrine ORM v3 in the near future. I think nette/caching (have never used it) is only providing PSR-16, if I scaned the docs correctly? laminas-cache, besides the issues with servicemanager mentioned previously, is quite limited in terms of PSR-6, only the adapters Dba, Filesystem, Memory and Session support this (according to the docs). With Dba beeing abandoned and Session not being of any use for caching Doctrine stuff, only Filesystem and Memory remain. I think that DoctrineModule should provide a setup of Doctrine ORM/ODM that works out of the box and that would at least include a metadatacache. |
The documentation says:
|
Ok, my fault. Misread it, but that makes it worse. Filesystem cache is very essential and common for Doctrine's metadata. |
I didn't know that before, thanks for the hint. It's definitely important that there is PSR support.
This makes sense but I would still allow a choice. Maybe different configurations can be supplied or CLI commands, but I wouldn't pin it down to a specific library – by this I also explicitly mean laminas-cache.
The Filesystem adapter of laminas-cache fully supports PSR-6 and PSR-16! (I will update the documentation.) Please do not get me wrong, I am not saying that laminas-cache should be used here, but I am pointing out that the laminas-cache component is already present in a laminas-mvc based application. |
Feature Request
What
Support for PHP 8.4 should be added to version 6 of this package
Why
PHP 8.4 is now publicly available.
Lack of PHP 8.4 support prevents Laminas based projects using this component from upgrading to PHP 8.4
How
The text was updated successfully, but these errors were encountered: