dotkernel / frontend

DotKernel Frontend Application. Based on Mezzio microframework using Laminas components.
https://v5.dotkernel.net
MIT License
22 stars 5 forks source link

laminas form #249

Closed arhimede closed 2 years ago

arhimede commented 2 years ago
  1. check if the package laminas/laminas-form is required
  2. if can be removed from composer, remove it
  3. make a new release with the updated composer.json file
  4. trebe sa dam la baietii noul composer sa stie gen
bidi47 commented 2 years ago

laminas form is removed checking other laminas, mezzio packages that can be removed from the root composer.json

bidi47 commented 2 years ago

after laminas-form upgrade, getting error below on php ^7.4 the older version (2.17) didn't have Laminas\Form\FormAbstractServiceFactory declared as final, so now our dot-form can't extend it

Fatal error: Class Dot\Form\Factory\FormAbstractServiceFactory may not inherit from final class (Laminas\Form\FormAbstractServiceFactory) in \frontend\vendor\dotkernel\dot-form\src\Factory\FormAbstractServiceFactory.php on line 20

arhimede commented 2 years ago

@alexmerlin

alexmerlin commented 2 years ago

Quick and dirty solution - as Dot\Form\Factory\FormAbstractServiceFactory already implements the same methods as Laminas\Form\FormAbstractServiceFactory:

NOTE: This decouples our class from theirs - which means that if they add some functionality into their factory, we need to update ours.

bidi47 commented 2 years ago

added update for existing open pull request https://github.com/dotkernel/frontend/pull/251

arhimede commented 2 years ago

"message":"Argument 1 passed to Laminas\Form\Element\Checkbox::setUncheckedValue() must be of the type string, bool given, called in /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/laminas/laminas-form/src/Element/Checkbox.php on line 52","extra":{"\u0000*\u0000message":"Argument 1 passed to Laminas\Form\Element\Checkbox::setUncheckedValue() must be of the type string, bool given, called in /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/laminas/laminas-form/src/Element/Checkbox.php on line 52"

bidi47 commented 2 years ago

unlike in v2, laminas-form v3.1.1 has strict data types for checkboxes the delete account form is updated