How to fix «Class 'Zend\Mvc\Controller\LazyControllerAbstractFactory' not found» after upgrading Magento Community or Enterprise from 2.2.x to 2.3.x?

How to fix

Step 1

Set your autoload section in the root’s composer.json file as in Magento 2.3.2:

magento/magento2/blob/2.3.2/composer.json#L298-L319

"autoload": {

    "psr-4": {

        "Magento\\Framework\\": "lib/internal/Magento/Framework/",

        "Magento\\Setup\\": "setup/src/Magento/Setup/",

        "Magento\\": "app/code/Magento/",

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

    },

    "psr-0": {

        "": [

            "app/code/",

            "generated/code/"

        ]

    },

    "files": [

        "app/etc/NonComposerComponentRegistration.php"

    ],

    "exclude-from-classmap": [

        "**/dev/**",

        "**/update/**",

        "**/Test/**"

    ]

},

Step 2

composer dumpautoload

Step 3

Re-run bin/magento setup:upgrade

 

magento.stackexchange.com/a/252122 

https://magento.stackexchange.com/questions/252048/upgrade-magento-from-2-2-6-to-2-3/252122#252122