When I started the upgrade to Magento 2.4.0 running php7.3 things seemed to be working will until I can across a PHP parsing error when running setup:upgrade
Unable to apply data patch Magento\Customer\Setup\Patch\Data\UpdateDefaultCustomerGroupInConfig for module Magento_Customer. Original exception message: Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 28 in /var/www/magento/src/vendor/magento/framework/Api/AbstractSimpleObjectBuilder.php on line 72
Additional research lead me to believe that I needed to upgrade to php7.4. After doing so, I can no longer upgrade at all and composer is no longer functional. At first I received the error:
Could not find a Magento project package matching "magento/product-enterprise-edition 2.4.0" for PHP version 7.4.8 Update of composer.json with Magento Commerce 2.4.0 changes failed, reverting ./composer.json to its original content from before the Magento root update. Magento root updates cannot run without a valid target package [InvalidArgumentException] Could not find a matching version of package magento/product-enterprise-edition. Check the package spelling, your version constraint and that the package is available in a stability which matches your m inimum-stability (stable).
And now I get:
$ composer show magento/product-enterprise-edition 2.4.* --all | grep -m 1 versions [InvalidArgumentException] Package magento/product-enterprise-edition not found
Why has Magento become so much more fragile over the last year? Every time I go to upgrade there are just more and more problems.
Kindly refer below link for your issue:
https://github.com/Codeception/Codeception/issues/3316
It may help you!
Issue resolved? Please click on Kudos & Accept as Solution!
That link didn't solve my issue. Seems they are having a similar solution in another project.
At this point I'm to where if I'm running php73 I get:
$ composer require magento/product-enterprise-edition=2.4.0 --no-update Could not find a Magento project package matching "magento/product-enterprise-edition 2.4.0" for PHP version 7.3.11 Update of composer.json with Magento Commerce 2.4.0 changes failed, reverting ./composer.json to its original content from before the Magento root update. Magento root updates cannot run without a valid target package [InvalidArgumentException] Could not find a matching version of package magento/product-enterprise-edition. Check the package spelling, your version constraint and that the package is available in a stability which matches your m inimum-stability (stable).
If I upgrade to php74, I get:
$ composer require magento/product-enterprise-edition=2.4.0 --no-update Could not find a Magento project package matching "magento/product-enterprise-edition 2.4.0" for PHP version 7.4.8 Update of composer.json with Magento Commerce 2.4.0 changes failed, reverting ./composer.json to its original content from before the Magento root update. Magento root updates cannot run without a valid target package [InvalidArgumentException] Could not find a matching version of package magento/product-enterprise-edition. Check the package spelling, your version constraint and that the package is available in a stability which matches your m inimum-stability (stable).
I suppose if I can get this working, than maybe the original issue will resolve itself.
After much fighting I was able to get things working, but I'm still getting the following error with a lot of pages.
Exception #0 (Exception): Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 28 in /var/www/magento/src/vendor/magento/framework/Api/AbstractSimpleObjectBuilder.php on line 72
Does anyone know how to fix this?
Hi there,
Hope you've already found a fix - if not, there is a commit for this file I just spotted as I also had the same problem after trying to upgrade from 2.3.6 to 2.4.0.
https://github.com/magento/magento2/commit/e9343d9d719007b60ad7b0e4a3a99aa8df586cf4