Closed grichards closed 4 years ago
Hi @grichards. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Have found a manual solution to fix this. there needs to be removed laminas folder from vendor directory and also vendor/bin/templatemap_generator.php file (cause it`s a hyper link to some file inside previous laminas folder). then run composer install , that there will be created zendframework inside vendor folder and all will work
The core of the issue that 2.3.5 version migrates to laminas framework (renamed Zend) and 2.3.4 failed to load Zend files (cause they are located in laminas folder). Something like this :)
I ran into the same issue earlier this month. I solved it by removing my vendor folder and running composer install
again.
As @VadimLugovoy pointed out, laminas is the main issue. It's marked as a replacement for the zendframework packages in composer but the laminas packages are not providing the same namespace for the zend classes. So while composer thinks it can keep, for example, laminas/laminas-mvc
as a replacement for zendframework/zend-mvc
, any code looking for a class in the Zend\Mvc
namespace will error out as all the namespaces have been renamed to Laminas\Mvc
.
A workaround would be to add the laminas packages as a conflict in your main composer.json like so:
{
"conflict": {
"laminas/laminas-mvc": "*"
}
}
Just remember to remove those when you upgrade Magento again.
Thanks for your comments @VadimLugovoy and @DuckThom.
After I remove vendor and or only vendor/laminas, then run composer install... the laminas folders just reinstall themselves, despite my having switched my magento version in composer.json down to 2.3.4.
Looks like I had to run composer update instead of install after removing /vendor... I wonder why.
@grichards you have to remove /vendor directory as downgrading sometimes fails when vendor folder exists (bug might not fail), also you need to update your composer.lock (using composer update), as composer install
command just reads and installs what package versions you have in the composer.lock file.
Looks like I had to run composer update instead of install after removing /vendor... I wonder why.
Ah yes, now that you mention it, it was a composer update
that fixed it for me aswell.
To me, it mainly looks like an issue with laminas as the packages are currently marked as being a "drop-in replacement" but the different namespaces are causing it to break if not all zendframework packages are replaced with their laminas alternatives.
As there is a work around, I'll close this.
Hi @ihor-sviziev. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.