braintree/braintree_php

di compile error after upgrading from 2.4.5-p4 to 2.4-5-p5

iramguir opened this issue · 1 comments

I recently upgraded a Magento instance from version 2.4.5-p4 to 2.4.5-p5 . Its running on PHP 7.4.9 . Its a AWS/bitnami instance.

The upgrade seems succesful (no errors shown in front end or admin, when the version is checked it show 2.4.5-p5 .

However, the setup:di:compile command gets interrupted with following errors.

syntax error, unexpected '|', expecting ';' or '{'#0 /opt/bitnami/magento/vendor /composer/ClassLoader.php(428): Composer\Autoload\{closure}() #1 [internal function]: Composer\Autoload\ClassLoader->loadClass() #2 [internal function]: spl_autoload_call() #3 /opt/bitnami/magento/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesSca nner.php(134): class_exists() #4 /opt/bitnami/magento/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesSca nner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass( ) #5 /opt/bitnami/magento/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesSca nner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract() #6 /opt/bitnami/magento/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Rep ositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->ge tList() #7 /opt/bitnami/magento/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(5 6): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation( ) #8 /opt/bitnami/magento/setup/src/Magento/Setup/Console/Command/DiCompileCommand .php(216): Magento\Setup\Module\Di\App\Task\Manager->process() #9 /opt/bitnami/magento/vendor/symfony/console/Command/Command.php(255): Magento \Setup\Console\Command\DiCompileCommand->execute() #10 /opt/bitnami/magento/vendor/symfony/console/Application.php(1021): Symfony\C omponent\Console\Command\Command->run() #11 /opt/bitnami/magento/vendor/symfony/console/Application.php(275): Symfony\Co mponent\Console\Application->doRunCommand() #12 /opt/bitnami/magento/vendor/magento/framework/Console/Cli.php(116): Symfony\ Component\Console\Application->doRun() #13 /opt/bitnami/magento/vendor/symfony/console/Application.php(149): Magento\Fr amework\Console\Cli->doRun() #14 /opt/bitnami/magento/bin/magento(23): Symfony\Component\Console\Application- >run() #15 {main}

By putting a echo in composer/ClassLoader.php error location, I found that this error is occuring when /opt/bitnami/magento/vendor/composer/../paypal/module-braintree-core/Gateway/Com mand/GetPaymentNonceCommand.php is processed.

I do highly appreciate if you could please guide me to resolve it.

Thanks and Best Regards

Indunil

👋 sorry but we can't provide support for third party libraries using this SDK. Maybe there's a namespacing issue?