Skip to content

Replace Zend_Validate with laminas-validate #3199

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

Closed
wants to merge 6 commits into from
Closed

Replace Zend_Validate with laminas-validate #3199

wants to merge 6 commits into from

Conversation

sreichel
Copy link
Contributor

Description (*)

#3191 was an good idea imho. Followed this and started to replaced Zend_Validate with laminas components.

Some tests ... https://gist.github.com/sreichel/067428567d49c9ceab907fd10a36e2dc

Questions or comments

Draft: only need some tests to replace all other Zend_Validate code ... (not commited yet)

Btw ... we dont need to stick with Zf1-Furture, There is also https://github.com/zf1s/zf1 that would allow to remove not needed Zend modules ...

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@sreichel sreichel marked this pull request as draft April 20, 2023 23:22
@github-actions github-actions bot added Component: Adminhtml Relates to Mage_Adminhtml Component: Admin Relates to Mage_Admin Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog Component: Checkout Relates to Mage_Checkout Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: ImportExport Relates to Mage_ImportExport Component: Review Relates to Mage_Review Component: Sendfriend Relates to Mage_Sendfriend Component: Wishlist Relates to Mage_Wishlist composer Relates to composer.json labels Apr 20, 2023
@sreichel sreichel changed the title Replace Zend_Validate with laminas Replace Zend_Validate with laminas-validate Apr 20, 2023
@addison74
Copy link
Contributor

You made good observations. If we could replace Zend 1 with Laminas, it would be a huge step. I can't figure out how this will affect existing extensions and what the level of work would be to modify the OpenMage source code. It would probably be simpler than removing Prototype library, on which many extensions relied when implementations on the JavaScript side were needed.

At this moment, I think that ZF1-Future will hold the umbrella for a good while.

@sreichel
Copy link
Contributor Author

I can't figure out how this will affect existing extensions and what the level of work would be to modify the OpenMage source code.

@addison74 its not about to replace ZF1 at all (for now), but some parts could aleady be changed to laminas...

It could break 3rd-party code that extends Zend_Validate classes (seems very unlikly to me). There is only one file left in OM that needs adjustments .

At this moment, I think that ZF1-Future will hold the umbrella for a good while.

Just wanted to mention zf1s/zf1 because of its structre (we only need a few parts from Zend1)

@addison74
Copy link
Contributor

The only problem I see is from the developer's point of view. It would be preferable to have a single framework, not pieces of several (Laminas, ZF1-Future, ...).

Regarding the alternative to ZF1-Future, if we end up using certain parts of that repository, then we have to make sure that we have the best version between the two alternatives.

As I saw that the repositories move slowly, I think it was not a very good idea to remove the framework from OpenMage and link it with Composer. I think it would have been more appropriate to have a separate repository in OpenMage for this framework. So we no longer waited after the PR to be approved and we had a control of the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Admin Relates to Mage_Admin Component: Adminhtml Relates to Mage_Adminhtml Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog Component: Checkout Relates to Mage_Checkout Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: ImportExport Relates to Mage_ImportExport Component: Review Relates to Mage_Review Component: Sendfriend Relates to Mage_Sendfriend Component: Wishlist Relates to Mage_Wishlist composer Relates to composer.json Don't forget this PR phpstan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants