Skip to content
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

Open
1 of 5 tasks
chazzs opened this issue May 7, 2024 · 13 comments
Open
1 of 5 tasks

DI compile failure after 2.4.4-p8 update #38704

chazzs opened this issue May 7, 2024 · 13 comments
Assignees
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Code Issue: On Hold Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: dev in progress Reported on 2.4.4-p8 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@chazzs
Copy link

chazzs commented May 7, 2024

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:

  1. I edited composer.json and updates the required item "magento/product-community-edition": "2.4.4-p4" to "magento/product-community-edition": "2.4.4-p8".
  2. ran compoer2 u (after back up of functional composer.lock)
  3. composer upgrade finishes successfully
  4. ran bin/magento setup:di:compile
  5. at step 1/9, the failure happens with a pretty useless stack trace or indications as to where this problem was found. from the looks of it the Braintree module is not compatible with this new update?

Proposed solution

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@chazzs chazzs added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label May 7, 2024
Copy link

m2-assistant bot commented May 7, 2024

Hi @chazzs. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@chazzs
Copy link
Author

chazzs commented May 7, 2024

@magento give me 2.4.4-p4-develop instance

Copy link

Hi @chazzs. Thank you for your request. I'm working on Magento instance for you.

Copy link

Hi @chazzs, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-Hotel engcom-Hotel added the Reported on 2.4.4-p8 Indicates original Magento version for the Issue report. label May 8, 2024
@engcom-Hotel engcom-Hotel self-assigned this May 8, 2024
Copy link

m2-assistant bot commented May 8, 2024

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Dash engcom-Dash removed the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label May 8, 2024
Copy link

m2-assistant bot commented May 8, 2024

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash
Copy link

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/...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('PayPal\Braintre...')
#2 [internal function]: spl_autoload_call('PayPal\Braintre...')
#3 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists('PayPal\Braintre...')
#4 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass('PayPal\Braintre...', '/usr/local/var/...')
#5 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract(Object(RecursiveIteratorIterator))
#6 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList('/usr/local/var/...')
#7 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#8 /usr/local/var/www/magento7/magento7/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process(Object(Closure), Object(Closure))
#9 /usr/local/var/www/magento7/magento7/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 /usr/local/var/www/magento7/magento7/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 /usr/local/var/www/magento7/magento7/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 /usr/local/var/www/magento7/magento7/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 /usr/local/var/www/magento7/magento7/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /usr/local/var/www/magento7/magento7/bin/magento(23): Symfony\Component\Console\Application->run()
#15 {main}

Please refer the attached screenshot.

Screenshot 2024-05-08 at 6 28 51 PM

@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Code Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Upgrades - Upgrade Compatibility Tool labels May 8, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board May 8, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11923 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented May 8, 2024

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@chazzs
Copy link
Author

chazzs commented May 8, 2024

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?

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented May 9, 2024

@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
Anyway, PHP 7.4 has reached End Of Life 1.5 years ago, so better to upgrade to 8.1 https://www.php.net/supported-versions.php

@engcom-Dash engcom-Dash added Issue: On Hold and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels May 9, 2024
@m2-community-project m2-community-project bot moved this from Confirmed to On Hold in Issue Confirmation and Triage Board May 9, 2024
@m2-community-project m2-community-project bot moved this from Confirmed to On Hold in Issue Confirmation and Triage Board May 9, 2024
@engcom-Dash
Copy link

engcom-Dash commented May 9, 2024

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.

@engcom-Dash engcom-Dash self-assigned this May 9, 2024
@ihor-sviziev ihor-sviziev added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label May 15, 2024
@m2-community-project m2-community-project bot added this to Dev In Progress in High Priority Backlog May 15, 2024
@hostep
Copy link
Contributor

hostep commented May 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Upgrades - Upgrade Compatibility Tool Component: Code Issue: On Hold Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: dev in progress Reported on 2.4.4-p8 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Dev In Progress
Development

No branches or pull requests

6 participants