mirasvit / module-profiler

Magento 2 Profiler
https://mirasvit.com/
Open Software License 3.0
133 stars 36 forks source link

Add compatibility with Magento Cloud - Fix: "ObjectManager isn't initialized" on deploy #53

Open fredden opened 4 years ago

fredden commented 4 years ago

Without this, the following PHP Fatal error is encountered when deploying to Magento Cloud instances during the phase which runs vendor/bin/ece-patches apply.

PHP Fatal error: Uncaught RuntimeException: ObjectManager isn't initialized in /var/www/html/vendor/magento/framework/App/ObjectManager.php:36 Stack trace:

0 /var/www/html/vendor/mirasvit/module-profiler/src/Profiler/Model/Driver/Output/Html.php(18): Magento\Framework\App\ObjectManager::getInstance()

1 /var/www/html/vendor/magento/framework/Profiler/Driver/Standard.php(195): Mirasvit\Profiler\Model\Driver\Output\Html->display(Object(Magento\Framework\Profiler\Driver\Standard\Stat))

2 [internal function]: Magento\Framework\Profiler\Driver\Standard->display()

3 {main}

thrown in /var/www/html/vendor/magento/framework/App/ObjectManager.php on line 36

Fatal error: Uncaught RuntimeException: ObjectManager isn't initialized in /var/www/html/vendor/magento/framework/App/ObjectManager.php:36 Stack trace:

0 /var/www/html/vendor/mirasvit/module-profiler/src/Profiler/Model/Driver/Output/Html.php(18): Magento\Framework\App\ObjectManager::getInstance()

1 /var/www/html/vendor/magento/framework/Profiler/Driver/Standard.php(195): Mirasvit\Profiler\Model\Driver\Output\Html->display(Object(Magento\Framework\Profiler\Driver\Standard\Stat))

2 [internal function]: Magento\Framework\Profiler\Driver\Standard->display()

3 {main}

thrown in /var/www/html/vendor/magento/framework/App/ObjectManager.php on line 36