magerun2-addons
magerun2-addons copied to clipboard
When running inside a php 8.1 project a PHP Fatal error regarding deprecated functionality is thrown
While working on getting a php 8.1 magento project installed I encountered the following error. This happened as a result from the command: magerun2 env:create
and happened before any user input was given. No app/etc/env.php file existed when running the command and none were generated.
PHP Fatal error: During inheritance of ArrayAccess: Uncaught Exception: Deprecated Functionality: Return type of Elgentos\Dot::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/.n98-magerun2/modules/elgentos-addons/src/Elgentos/Dot.php on line 510 in /data/limburgia/magento2/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 /data/.n98-magerun2/modules/elgentos-addons/src/Elgentos/Dot.php(23): Magento\Framework\App\ErrorHandler->handler(8192, 'Return type of ...', '/data/.n98-mage...', 510)
#1 phar:///usr/local/bin/n98-magerun2/vendor/composer/ClassLoader.php(571): include('/data/.n98-mage...')
#2 phar:///usr/local/bin/n98-magerun2/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/data/.n98-mage...')
#3 /data/.n98-magerun2/modules/elgentos-addons/src/Elgentos/EnvCreateCommand.php(56): Composer\Autoload\ClassLoader->loadClass('Elgentos\\Dot')