Skip to content
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

Migrate ZF2 components to Laminas components #26436

Merged
merged 3 commits into from
Mar 24, 2020

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Jan 17, 2020

Description (*)

This PR do following:

  • replaces all \Zend\* dependencies to \Laminas\* (executed following instruction https://docs.laminas.dev/migration/)
  • Adds laminas/laminas-zendframework-bridge in order to have backward compatibility, so Magento will still be able to load \Zend\ classes

Fixed Issues (if relevant)

  1. Consider migrating from zendframework to laminas community-features#229
  2. Update zendframework to laminas #26335

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jan 17, 2020

Hi @ihor-sviziev. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ihor-sviziev
Copy link
Contributor Author

@magento give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, here is your new Magento instance.
Admin access: https://pr-26436.instances.magento-community.engineering/admin_70c4
Login: 110b697e Password: f88aec94b9f0
Instance will be terminated in up to 3 hours.

@ihor-sviziev
Copy link
Contributor Author

@magento run all tests

@slavvka
Copy link
Member

slavvka commented Jan 29, 2020

@ihor-sviziev, Most of failures are because of "absence" of \Laminas\Stdlib\Glob class. Please try to resolve the issue and rerun the tests.

@ihor-sviziev
Copy link
Contributor Author

ihor-sviziev commented Feb 15, 2020

Current status is following:
All tests for magento Open source were passing (until there merge conflict appeared).
@lenaorobei contacted me in Slack and said that @fascinosum from internal team is working on the same thing and currently there is two options that under discussion:

  1. Replace all zend namespaces with Laminas and add laminas to zend framework bridge (that what I did and this is the most backward compatible change should be)
  2. Just replace namespaces without adding bridge

From my perspective it’s better to do 1st option as it should not break custom extensions, hovered it should break even b2b and EE versions, but it is due to test failures

/CC @Den4ik @lenaorobei

@slavvka @fascinosum @lenaorobei once you will have decision, let me know if you need something from my side - I’ll update PR

@fascinosum @lenaorobei is there any updates since that time, maybe you already decided on solution?

@lenaorobei
Copy link
Contributor

Hi @ihor-sviziev,
Internal team finished upgrade in 2.3-develop branch and 2.4-develop in on the way. As we discussed previously @fascinosum will contact you if any change is required. Thank you.

@ihor-sviziev
Copy link
Contributor Author

@lenaorobei thx for update!

@diazwatson
Copy link
Contributor

Guys what is the status of this?

@ihor-sviziev
Copy link
Contributor Author

@diazwatson
@lenaorobei said me some time ago that my changes were merged to internal branch and will be merged soon. But looks like it still didn’t happen

@diazwatson
Copy link
Contributor

I was about to open an issue to look at this today and then I realised you were already working on this.
Lets see what the guys say 🤞

@fascinosum
Copy link
Contributor

hello @ihor-sviziev, @diazwatson
this community contribution is part of the implementation of migration ZF2 components to Laminas.
Internal ticket is in progress (MC-13825).
Thank you for contribution and your participation

@magento-engcom-team magento-engcom-team merged commit 73f1d9e into magento:2.4-develop Mar 24, 2020
@m2-assistant
Copy link

m2-assistant bot commented Mar 24, 2020

Hi @ihor-sviziev, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@eduard13
Copy link
Contributor

Just leaving it here for the history.
While trying to install the latest dependencies, was getting the following issue:

Installing laminas/laminas-dependency-plugin (1.0.3): Loading from cache
PHP Fatal error: Uncaught Error: Undefined class constant ‘PRE_COMMAND_RUN’ in /home/dev/sites/mage23/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php:63

So, if you also face this one, try to upgrade the composer version using composer self-update, it should help.
Thanks.

@diazwatson
Copy link
Contributor

Thanks for sharing it @eduard13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants