0

I have upgraded Magento from 2.4.5 to 2.4.7 and it went well.

Here are my system details

Composer version 2.7.6 

PHP version 8.2.12

Here are the steps I followed.

cp composer.json composer.json.bak && cp composer.lock composer.lock.bak

composer require magento/composer-root-update-plugin=~2.0 --no-update

composer require-commerce magento/product-community-edition=2.4.7 --no-update

updated composer files section as mentioned below from https://github.com/magento/magento2/blob/2.4.7/composer.json

"psr-4": {
            "Magento\\": "app/code/Magento/",
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/"
        }


 "require-dev": {
             "allure-framework/allure-phpunit": "^2",
             "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
             "dg/bypass-finals": "^1.4",
             "friendsofphp/php-cs-fixer": "^3.22",
             "lusitanian/oauth": "^0.8",
             "magento/magento-coding-standard": "*",
             "magento/magento2-functional-testing-framework": "^4.7",
             "pdepend/pdepend": "^2.10",
             "phpmd/phpmd": "^2.12",
             "phpstan/phpstan": "^1.9",
             "phpunit/phpunit": "^9.5",
             "sebastian/phpcpd": "^6.0",
             "symfony/finder": "^6.4"
         },
    


"autoload-dev": {
        "psr-4": {
            "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/",
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/"
        }
    }, 

composer update

rm -rf var/cache/* var/page_cache/* generated/code/*

php bin/magento setup:upgrade php bin/magento setup:di:compile

Here is the error

There is an error in /home/public_html/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php at line: 78
Interface "Zend\ServiceManager\AbstractFactoryInterface" not found#0 /home/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(136): require_once()
#1 /home/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#2 /home/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#3 /home/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/ApplicationCodeGenerator.php(100): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()
#4 /home/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/ApplicationCodeGenerator.php(69): Magento\Setup\Module\Di\App\Task\Operation\ApplicationCodeGenerator->getFiles()
#5 /home/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\ApplicationCodeGenerator->doOperation()
#6 /home/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(209): Magento\Setup\Module\Di\App\Task\Manager->process()
#7 /home/public_html/vendor/symfony/console/Command/Command.php(326): Magento\Setup\Console\Command\DiCompileCommand->execute()
#8 /home/public_html/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#9 /home/public_html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#10 /home/public_html/vendor/magento/framework/Console/Cli.php(118): Symfony\Component\Console\Application->doRun()
#11 /home/public_html/vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun()
#12 /home/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#13 {main}

3 Answers 3

1

Magento removred zend framework from the magento version 2.4.6 and Replaced Zend_Filter with laminas/laminas-filter. for more details read below refrence link Magento Open Source 2.4.6 release notes

Also Check this one https://www.magetop.com/blog/how-to-fix-class-zend-not-found-in-magento-2/

0

The issue was resolved by replacing setup folder from https://github.com/magento/magento2/tree/2.4-develop/setup to the base folder of Magento installation.

0

@ishaq

Hey,

Please follow the given steps,

  1. Clear Generated Files and Cache
  2. Check PHP Version Compatibility
  3. Verify Composer Dependencies
  4. Disable Third-Party Module.
  5. Check for Conflicting Classes or Plugins

Thank You!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.