-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DI compile failure after 2.4.4-p8 update #38704
Comments
Hi @chazzs. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
@magento give me 2.4.4-p4-develop instance |
Hi @chazzs. Thank you for your request. I'm working on Magento instance for you. |
Hi @chazzs, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later. |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hi @engcom-Dash. Thank you for working on this issue.
|
Hi @chazzs Thanks for reporting and collaboration. Verified the issue after upgrading the instance from 2.4.4-p4 to 2.4.4-p8 and the issue is reproducible. Hence, confirming this issue. setup:di:compile is failing with the below error: 1/9 [==>------------------] 11% 1 sec 117.0 MiBsyntax error, unexpected '|', expecting ';' or '{'#0 /usr/local/var/www/magento7/magento7/vendor/composer/ClassLoader.php(427): Composer\Autoload{closure}('/usr/local/var/...') Please refer the attached screenshot. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11923 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Dash. Thank you for verifying the issue. |
I was playing around with this a little in the evening. switched from php7.4 to php8.1 and it was happy to compile. Is php8 now required for this patch? |
@chazzs, according to system requirements, has been required since Magento 2.4.4 https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements |
Hi @chazzs As per the internal discussion, we are keeping this issue on hold. We need to do more R&D on this. We will update the ticket in a few days. |
I think this duplicates:
I would still consider it a bug that you are allowed by composer to install these packages using PHP 7.4, but given that this still hasn't been solved after all these months in the latest patch release, I think it means that Adobe has given up on installations running PHP 7.4 and it's indeed time to move to 8.1 |
Summary
immediately after doing a composer update to magento 2.4.4-p8. code base will no longer compile with
setup:di:compile
compiling completed successfully prior to upgrade then fails after.
syntax error, unexpected '|', expecting ';' or '{'#0 /home/application/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/applicati...') #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('PayPal\\Braintre...') #2 [internal function]: spl_autoload_call('PayPal\\Braintre...') #3 /home/application/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists('PayPal\\Braintre...') #4 /home/application/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass('PayPal\\Braintre...', '/home/applicati...') #5 /home/application/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract(Object(RecursiveIteratorIterator)) #6 /home/application/html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList('/home/applicati...') #7 /home/application/html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation() #8 /home/application/html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process(Object(Closure), Object(Closure)) #9 /home/application/html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /home/application/html/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /home/application/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DiCompileCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /home/application/html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /home/application/html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /home/application/html/bin/magento(23): Symfony\Component\Console\Application->run() #15 {main}
PHP 7.4.26 (cli) (built: Nov 18 2021 16:46:20) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v11.0.0, Copyright (c) 2002-2021, by ionCube Ltd.
with Zend OPcache v7.4.26, Copyright (c), by Zend Technologies
with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
Examples
The system was funcitonal, operating and di:compile finished successfuly. Then, to upgtade:
"magento/product-community-edition": "2.4.4-p4"
to"magento/product-community-edition": "2.4.4-p8"
.compoer2 u
(after back up of functional composer.lock)bin/magento setup:di:compile
Proposed solution
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: