magento2.3.7升级2.4.3

直接升级magento2.4.3有问题,

先升级magento2.4.0进行过渡


1、执行升级

composer require magento/product-community-edition=2.4.0 --no-update

2、编译

sudo php bin/magento maintenance:enable && sudo chmod 777 * -R && rm -rf  var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/* && rm -rf pub/static/* && sudo php bin/magento setup:upgrade && sudo php bin/magento setup:di:compile && php bin/magento setup:static-content:deploy -f && php bin/magento indexer:reindex && sudo php bin/magento maintenance:disable && php bin/magento cache:clean && php bin/magento cache:flush && sudo chmod 777 * -R

如果有:Class 'Zend\Mvc\Controller\LazyControllerAbstractFactory' not found»? 报错,则将:

"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"

如图修改composer.json文件

nba2k2球员数据

其次执行:

composer dumpautoload

即可!

3、编译过程中,WeltPixel 报错,我这里是直接从composer移除出去了

4、后续编译还有报错:

    ①、Undefined class constant 'XML_PATH_HEADER_TRANSLATE_TITLE'  这个是框架bug,在报错指定目录文件,将static改为self即可

5、升级到2.4.3(如果2.4.0还升级不了,那就继续升到2.4.2过渡)

composer require magento/product-community-edition 2.4.3 --no-update

6、先升级composer版本再执行update,2.4.3用composer2:

composer self-update --2
sudo composer update --with-all-dependencies

如果报错:magento don't install symfony/console v4.4.43 ,

我这里是将composer.json文件中的:

"pdepend/pdepend": "2.5.0",

改为:

"pdepend/pdepend": "2.5.2",

再次执行update命令。

成功!!



7、执行编译,在

php bin/magento setup:di:compile

遇到问题:

Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater for module Magento_Paypal. Original exception message: Notice: Undefined offset: 1 in /path/to/magento/vendor/magento/module-paypal/Setup/Patch/Data/UpdateBmltoPayLater.php on line 138

解决方案:https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Update-from-2-4-0-p1-to-2-4-3-generates-PayPal-module-error-in/td-p/479990

在138行插入以下代码:

if ($page === 'active') continue;


8、继续编译,成功

nba2k2球员数据
请先登录后发表评论
  • 最新评论
  • 总共0条评论