doctrine / DoctrineModule

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

Allow laminas form 3.0 while keeping BC #731

Closed driehle closed 2 years ago

driehle commented 2 years ago

This PR is an alternative to #726. In contrast to #726 this PR keeps backward compatibility by using polyfills. Technically, there are now two different implementations of the form elements, one targeted at laminas-form v2 and a different one targeted at laminas-form v3. Using Composers autoload feature, the implementation corresponding to the installed laminas-form version is loaded and put into the right place using class_alias.

In case you are skeptical about this technique, I'd like to refer to laminas-form 2.15.x series, which itself used the same principle to support both laminas-servicemanager v2 and v3. Have a look at their composer.json, autoload file and polyfills.

driehle commented 2 years ago

Please note that I have updated the Github workflows:

driehle commented 2 years ago

Rebased on current 4.2.x. @SenseException are you fine with the trait?