magento2: Upgrade from 2.4.3-p1 to 2.4.4 throws terminal error "Fatal error: During inheritance of Countable"

UPDATE: THANKS to @loic-paquin for helping pinpoint a change in process with upgrading to 2.4.4. Please see comment 7 for solution!

Preconditions (*)

  1. Magento 2.4.3-p1
  2. Production Mode
  3. Apache 2.4 (no NGINX)
  4. mod_mpm_worker
  5. PHP 7.4.23
  6. Elasticsearch 7.12.1
  7. Redis 6.2.6
  8. MariaDB 10.3.34
  9. Composer 2.1.6 (then upgraded to 2.3.5 because of the errors below thinking this would help but it made no difference)
  10. RabbitMQ 3.9.14
  11. PHP-FPM: on
  12. PHP Handler: fcgi
  13. Followed: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/php-settings.html

Steps to reproduce (*)

These are the steps I did (in this exact order) then receive the error shown below (in terminal). M2.4.3-p1 worked fine btw.

  1. I was on PHP 7.4.23 - I changed to PHP 8.1.4
  2. Ran the following:
  • composer require magento/product-community-edition 2.4.4 --no-update
  • composer require magento/composer-root-update-plugin ~2.0 --no-update
  • composer upgrade
  1. It appeared to complete the files to download/update because it displayed the “generating autoload files” and “funding” lines at the end (no errors).
  2. I tried running “rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade”

Expected result (*)

  1. Magento 2.4.4 to work as intended.

Actual result (*)

  1. After running “step 4” above, it simply throws the error shown below. No magento command works - the only command that works is “composer upgrade”.

Can’t run any of the following without error (with or without php before command):

  • bin/magento maintenance:disable
  • bin/magento setup:upgrade
  • bin/magento setup:di:compile
  1. Error Report: ----ERRORS SHOWN IN CONSOLE/TERMINAL (when executing any command with PHP 8.1)-----
Fatal error: During inheritance of Countable: Uncaught Exception: Deprecated Functionality: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/*****/public_html/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 277 in /home/*****/public_html/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 /home/*****/public_html/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php(28): Magento\Framework\App\ErrorHandler->handler(8192, 'Return type of ...', '/home/*****/publi...', 277)
#)1 /home/*****/public_html/vendor/composer/ClassLoader.php(571): include('/home/*****/publi...')
#)2 /home/*****/public_html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/*****/publi...')
#)3 /home/*****/public_html/vendor/composer/composer/src/Composer/Repository/PlatformRepository.php(31): Composer\Autoload\ClassLoader->loadClass('Composer\\Reposi...')
#)4 /home/*****/public_html/vendor/composer/ClassLoader.php(571): include('/home/*****/publi...')
#)5 /home/*****/public_html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/*****/publi...')
#)6 /home/*****/public_html/vendor/composer/composer/src/Composer/Package/Loader/ValidatingArrayLoader.php(375): Composer\Autoload\ClassLoader->loadClass('Composer\\Reposi...')
#)7 /home/*****/public_html/vendor/composer/composer/src/Composer/Package/Loader/RootPackageLoader.php(70): Composer\Package\Loader\ValidatingArrayLoader::hasPackageNamingError('magento/project...')
#)8 /home/*****/public_html/vendor/composer/composer/src/Composer/Factory.php(368): Composer\Package\Loader\RootPackageLoader->load(Array, 'Composer\\Packag...', '/home/*****/publi...')
#)9 /home/*****/public_html/vendor/composer/composer/src/Composer/Factory.php(595): Composer\Factory->createComposer(Object(Composer\IO\BufferIO),Array, false)
#)10 /home/*****/public_html/vendor/magento/framework/Composer/ComposerFactory.php(47): Composer\Factory::create(Object(Composer\IO\BufferIO), '/home/*****/publi...')
#)11 /home/*****/public_html/vendor/magento/framework/Composer/ComposerInformation.php(368): Magento\Framework\Composer\ComposerFactory->create()
#)12 /home/*****/public_html/vendor/magento/framework/Composer/ComposerInformation.php(381): Magento\Framework\Composer\ComposerInformation->getComposer()
#)13 /home/*****/public_html/vendor/magento/framework/Composer/ComposerInformation.php(244): Magento\Framework\Composer\ComposerInformation->getLocker()
#)14 /home/*****/public_html/vendor/magento/framework/App/ProductMetadata.php(120): Magento\Framework\Composer\ComposerInformation->getSystemPackages()
#)15 /home/*****/public_html/vendor/magento/framework/App/ProductMetadata.php(80): Magento\Framework\App\ProductMetadata->getSystemPackageVersion()
#)16 /home/*****/public_html/vendor/magento/framework/Console/Cli.php(98): Magento\Framework\App\ProductMetadata->getVersion()
#)17 /home/*****/public_html/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#)18 {main} in /home/*****/public_html/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 28

-------ERROR SHOWN IN SYSTEM.LOG (when executing: php bin/magento setup:upgrade with PHP 7.4)------- main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Communication\Config\Data, Magento\Framework\Reflection\TypeProcessor::resolveFullyQualifiedClassName(): Argument #2 ($typeName) must be of type string, null given, called in /home/*****/public_html/vendor/magento/framework/Reflection/TypeProcessor.php on line 550


I apologize if I did something wrong. I don’t wish to waste anyone’s time. I’ve spent hours trying to figure out why it’s doing this before posting this report, to try and make sure it’s not on my end. And I tried researching and there isn’t much on this. Hopefully the error log points to a bug.

EDIT: Updated my command processes - with same outcome. Just to clarify. EDIT2: Learning more as I keep trying. Something is up with the PHP changes in Magento I think, EDIT3: Solution info added to top of OP


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [-] 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”.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 48 (4 by maintainers)

Most upvoted comments

Hello,

If it can help others, I had the same issue and I was not able to fix it by running the solution proposed. On my end I needed to update the composer.json file specifically the require-dev section with what is written here https://github.com/magento/magento2/blob/2.4.4/composer.json

This way the propers composer modules were install and the issue disapeared.

i faced this issue while upgrading to 2.4.5-p1 in my case the issue was in require-dev section: “pdepend/pdepend”: “~2.7.0” needed to be updated manually to “pdepend/pdepend”: “~2.10.0” Now fixed

@C4rter Yup that sounds like exactly what I was going through. For the lack of sounding repetitive, but to cover all bases, did you read all the previous posts?

Specifically, did you follow the steps I found to work for me exactly? Here:

  1. STAY IN PHP 7.4
  2. composer require magento/composer-root-update-plugin ~2.0 --no-update
  3. composer update
  4. rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade
  5. composer require-commerce magento/product-community-edition 2.4.4 --no-update
  6. composer update
  7. CHANGE TO PHP 8.1
  8. rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade

Staying with PHP 7.4 all the way to the end is very important. Also, making sure to update to the new ‘composer-root-update-plugin’ properly is important as well (doing composer require then composer update then rm those folders then setup:upgrade). I missed the step of doing the composer update & setup:upgrade my first time around, so the new command of “composer require-commerce” didn’t work for me and I went with the old way of “composer require magento/…” which was not correct.

If you follow that precisely it should work as intended. The error you’re getting is the exact one I got and this fixed it for me.

Hey, I got the same issue, what saved me was :

composer require magento/composer-root-update-plugin ~2.0 --no-update composer require-commerce magento/product-community-edition 2.4.4 --no-update composer update

https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guide/prepare/prerequisites.html?lang=en https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guide/implementation/perform-upgrade.html

I can confirm that using this require-dev in my composer.json file in Magento 2.4.5-p1 was exactly what allowed me to complete composer2 update and then successfully complete setup:upgrade:

“require-dev”: { “allure-framework/allure-phpunit”: “~1.5.0”, “dealerdirect/phpcodesniffer-composer-installer”: “^0.7.0”, “friendsofphp/php-cs-fixer”: “~3.3.0”, “lusitanian/oauth”: “~0.8.10”, “magento/magento-coding-standard”: “*”, “magento/magento2-functional-testing-framework”: “^3.7”, “pdepend/pdepend”: “~2.10.0”, “phpmd/phpmd”: “^2.9.1”, “phpstan/phpstan”: “~1.2.0”, “phpunit/phpunit”: “~9.5.0”, “sebastian/phpcpd”: “^6.0.3”, “squizlabs/php_codesniffer”: “~3.6.0”, “symfony/finder”: “^5.2” },

“Command “require-commerce” is not defined.” My Bad :

composer require magento/composer-root-update-plugin ~2.0 --no-update
composer update

It will add the command require-commerce.

The problem you may encouter here is that you’re already in php 8.1 but magento 2.4.3 expects php7.4. In this case, composer will fail. In order to fix this you can use update-alternatives --config php to select the php version used by linux.

In our case it was the require-dev section of the root composer.json. It had not been updated to the requirements of 2.4.5 thus working with old versions of phpmd/phpmd which requires composer/xdebug-handler (^1.0). This was blocking the update of composer/composer in our case.

the following both require-dev dependencies are necessary: magento/composer-root-update-plugin ~2.0 & pdepend/pdepend ~2.10.0

Hello,

If it can help others, I had the same issue and I was not able to fix it by running the solution proposed. On my end I needed to update the composer.json file specifically the require-dev section with what is written here https://github.com/magento/magento2/blob/2.4.4/composer.json

This way the propers composer modules were install and the issue disapeared.

my man, your cookie is on its way

Thanks @tthierryEra, updating the require-dev dependencies also updated the vendor/composer module!

cc C4rter

@C4rter there is no way to upgrade it. If I delete the folder and run the composer require commands for root plugin ~2.0 and magento community 2.4.4, it just re-installs the same composer module with the deprecated functionality.

Edit: I’m on PHP 8.1.4 and the latest composer is incompatible with it

@snez If you reference the OP, you’ll see I am on PHP 8.1.4 as well as Composer 2.3.5. I’m currently using Magento 2.4.4 with no issues now (other than the obvious theme/modules issues which is not Magento’s fault).

As @C4rter points out, modifying base files (not a 3rd party module or theme) is usually never a good idea and is not intended to be done to work.

If you follow all steps properly, it should upgrade. It is possible. I know it seems like it just won’t work, but something is mis-configured on your end to make it that way. In the OP, I gave every single stack info I am using, make sure to have those versions or better at least. M2.4.4 is requiring newer releases of the stack this time around. These make a difference.

It is a matter of inadequate communication then. Even though it was there, the Magento team and the release notes team specifically need to do better to enable a better developer experience.

@Viper9x Indeed, even on the page it’s moving to it shows it. On the page you linked it says to run the update command for the root update plugin then to run the “composer update” command. On the new page it does not say that (to run composer update). I simply made the mistake and forgot to do that (I only looked at the new page it’s moving to). I mentioned this in previous comments, that I made that mistake.

We simply thought maybe it could be clarified better and maybe in more than just one place. But you are right, it does say it.

usually the missing magento default files are sorted by deleting vendor/magento and doing a composer install.

The install information from @FadedOut and warning about the new prerequisites need to be added to the release notes.

For me it was solved after I added types to all interfaces in my custom module.

Example:

public function get($storeCode); -> public function get(string $storeCode);

I encountered an issue with the fastcgi_backend variable, which may require your attention. It would be helpful if you could review the nginx.conf.sample file. I made modifications to the configuration file in the sites-available directory to accommodate the need for running multiple Magento instances.

How i fixed the same issue:

  1. composer require magento/composer-root-update-plugin ~2.0 --no-update
  2. composer update
  3. removed composer.lock file
  4. changed require-dev/require module versions to the latest
  5. composer require-commerce magento/product-community-edition 2.4.4 --no-update
  6. composer update

Not sure why, but I had version 2.1.0 in composer.lock. I upgraded package “composer/composer” to 2.2+ manually and it fixed the issue for me. composer require composer/composer:~2.2.0

@snez

That’s correct, the main branch of composer is still for Composer 1.

The composer module version that needs to be required and installed is that one: https://github.com/composer/composer/tree/2.2 From the 2.2 branch.

Here’s the file in question: https://github.com/composer/composer/blob/2.2/src/Composer/Repository/ArrayRepository.php As you can see, the comments are there.

That’s how it should look like in the composer.lock:

{
            "name": "composer/composer",
            "version": "2.2.x-dev",
            "source": {
                "type": "git",
                "url": "https://github.com/2tvenom/CBOREncode.git",
                "reference": "42aedccb861d01fc0554782348cc08f8ebf22332"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/2tvenom/CBOREncode/zipball/42aedccb861d01fc0554782348cc08f8ebf22332",
                "reference": "42aedccb861d01fc0554782348cc08f8ebf22332",
                "shasum": ""
            },
            "require": {
                "composer/ca-bundle": "^1.0",
                "composer/metadata-minifier": "^1.0",
                "composer/pcre": "^1.0",
                "composer/semver": "^3.0",
                "composer/spdx-licenses": "^1.2",
                "composer/xdebug-handler": "^2.0 || ^3.0",
                "justinrainbow/json-schema": "^5.2.11",
                "php": "^5.3.2 || ^7.0 || ^8.0",
                "psr/log": "^1.0 || ^2.0",
                "react/promise": "^1.2 || ^2.7",
                "seld/jsonlint": "^1.4",
                "seld/phar-utils": "^1.0",
                "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
                "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
                "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
                "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
            },
            "require-dev": {
                "phpspec/prophecy": "^1.10",
                "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
            },
            "suggest": {
                "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
                "ext-zip": "Enabling the zip extension allows you to unzip archives",
                "ext-zlib": "Allow gzip compression of HTTP requests"
            },
            "bin": [
                "bin/composer"
            ],
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-main": "2.2-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Composer\\": "src/Composer"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Nils Adermann",
                    "email": "naderman@naderman.de",
                    "homepage": "https://www.naderman.de"
                },
                {
                    "name": "Jordi Boggiano",
                    "email": "j.boggiano@seld.be",
                    "homepage": "https://seld.be"
                }
            ],
            "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.",
            "homepage": "https://getcomposer.org/",
            "keywords": [
                "autoload",
                "dependency",
                "package"
            ],
            "funding": [
                {
                    "url": "https://packagist.com",
                    "type": "custom"
                },
                {
                    "url": "https://github.com/composer",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
                    "type": "tidelift"
                }
            ],
            "time": "2022-04-14T09:25:44+00:00"
        },

Unfortunately I cannot say what is going wrong when you do it.

Whats the “minimum-stability” value set to in you composer.json? Mine is: “dev”

@FadedOut @C4rter I followed your advise and restarted the process from scratch, and all I managed to do was to bring the error back. Here are the exact commands I used:

$ rm -rf vendor/composer
$ brew unlink php
$ brew link php@7.4
$ php -v
PHP 7.4.28 (cli) (built: Feb 28 2022 07:33:39) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
$ composer require magento/composer-root-update-plugin "~2.0" --no-update
$ composer update
$ rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade
$ composer require-commerce magento/product-community-edition "2.4.4" --no-update
$ composer update
$ brew unlink php
$ brew link php@8.1
$ php -v
PHP 8.1.4 (cli) (built: Mar 18 2022 09:32:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
    with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
$ rm -rf var/cache/* ; rm -rf var/page_cache/* ; rm -rf generated/code/* ; bin/magento setup:upgrade
PHP Fatal error:  During inheritance of Countable: Uncaught Exception: Deprecated Functionality: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 277 in vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 vendor/composer/composer/src/Composer/Repository/ArrayRepository.php(28): Magento\Framework\App\ErrorHandler->handler(8192, 'Return type of ...', '/Users/snez/Pro...', 277)
...
Fatal error: During inheritance of Countable: Uncaught Exception: Deprecated Functionality: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php on line 277 in vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 vendor/composer/composer/src/Composer/Repository/ArrayRepository.php(28): Magento\Framework\App\ErrorHandler->handler(8192, 'Return type of ...', '/Users/snez/Pro...', 277)

And

$ zsh --version
zsh 5.8 (x86_64-apple-darwin21.0)
$ composer -V                                                                                                                                                                                                                  
Composer version 2.3.5 2022-04-13 16:43:00

I am also attaching the generated composer.json file if any dev wants to take a look composer.txt

Nothing indicates that I have an outdated composer module, it seems to be the latest one.

Here is even the latest ArrayRepository.php::count() method on the latest composer branch on Github: https://github.com/composer/composer/blob/main/src/Composer/Repository/ArrayRepository.php#L321-L333

There are some forks of composer which have already performed the #[\ReturnTypeWillChange] fix, but the main branch of composer hasn’t

@C4rter there is no way to upgrade it. If I delete the folder and run the composer require commands for root plugin ~2.0 and magento community 2.4.4, it just re-installs the same composer module with the deprecated functionality.

Edit: I’m on PHP 8.1.4 and the latest composer is incompatible with it

A few of us here had the same issue and we all fixed it. I also thought there is no way to upgrade it at one point. But then I started from scratch, meaning PHP 7.4 and Magento 2.4.3 and the matching DB. And then I did the 8 steps from @FadedOut and then it actually did upgrade that module.

Sure, I had another issue then with files missing which lead me to completely remove the vendor folder again and composer install once again. But it still used the newer composer module version that time as well and after that everything was updated and working.

In the end it’s your decision, but I wouldn’t call it a day with that setup now. That would be too unstable for me. you should never have to rely on manual changes of files in the vendor folder. That never goes well in the end.

@FadedOut @C4rter Magento guide for upgrade magento version already mentioned require installing the Composer update plugin.

https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html

Thank you, yeah, that did it. I removed the vendor folder and did another composer update. Now everything looks good.

Oh good, it sounds like his info helped because I had no idea past what I was saying unfortunately. And I didn’t even think of removing the vendor/magento files - I suppose that makes sense. Maybe remanence of older modules colliding? I love github 😃

Haha, yeah, as I said before. The update from M1 to M2 was less of a hassle than this one. It started the last two days with getting Klarna up and running again (and the new extension not even available in the marketplace) and today that stuff. It’s enough issues for a minor version update now.

lol that’s crazy that M1 to M2 was easier than this. In that case, they definitely should have documented the processes better (esp being a month past original release date no-less). No way this should have been harder than an entire codebase change (M1 -> M2). This is why Magento updates scare me 😦. You never know how it will go, when you think it will be smooth/easy, most likely it won’t be. And then the downtime/loss of business = no good. Then they leave for us on github to figure it out lol.

Yeah I was one of these guys till two years ago and since 2010. But I switched jobs and now I only have one Magento store I keep working for on my own time and for my day job I do something different.

The good thing I think I find is that when Magento is running well it seems to stay that way. So at least, being able to run a estore and do something else during the day is somewhat possible.

I’ve switched from 7.1 to 7.4 not so long ago and that went pretty good. But yeah, that and I think they might have changed too much in one release. Removal of many payment providers. PHP version change and much more. If think I’m lucky that the store I manage has very little customization done. Part of the reason I keep doing that.

Yeah 7.1 -> 7.4 isn’t as drastic of a stack change. It’s exactly like how the days of 5.6 - 7.x went. Many devs delayed delayed delayed because they knew it would be a pain to move to 7.x. Well, it seems about the same with 8.x., except maybe a bit smoother because 8.0 has only been out since nov 2020, so like 1.5 yrs. That’s not bad for major platforms (ie. Magento, Wordpress/WC, I’m sure there’s more) to be running on it. I know in the end here, I’m glad for the change, bring us into modern times/tech.

And thanks again for your step by step guide. Doing that, from scratch, sorted out my issues then.

No problem at all. Glad you were able to get it up and running. There is nothng worse than being stuck and not being able to find help. I know that feeling. I got helped then that help was able to help others lol.

There was a warning block with the mysql to elasticsearch search system change. Considering the ramifications of this extra step and the custom command necessary to complete and upgrade it should be there too. @engcom-Alfa @engcom-Hotel maybe this is something for you guys and the internal team to consider for both now and when an upgrade path deviates from the standard composer workflow.

@Sental I agree, I just quickly looked over the release notes again and don’t see anything about the “composer-root-update-plugin” needing to be updated - esp first. I can’t remember if I did that update prior to doing the magento update on previous versions. I feel like that is new.

As I mentioned in a previous comment, a little “warning” block on a part of magento docs explaining this isn’t enough. I feel like many will run into this issue because of that - esp with this change of step being required. More read the release notes I would think.

Yikes, yeah sorry to say bud you got something else crazy going on there.

These updates can indeed be a pain sometimes (that’s why there are teams that get paid thousands to do the updates for store owners - for this exact reason I believe). I’ve done updates from 2.4.1 through to this one and had many hiccups for each one. But for the most part, they do always end up successful if done right. Sometimes it’s things that were added as well like incompatible modules or themes. Might want to make sure all custom stuff is disabled/removed as well before trying. For me, “bin/magento setup:upgrade” was not finishing simply because of incompatible modules with php8. After disabling/removing them I was good.

I think the primary issue with this release is the PHP 8.x change. Previous releases were all on PHP 7.x. When we change PHP versions (or anything major in the stack) it usually throws wrenches into the process. But in the end, this stack change is good, it will finally push the lazy [3rd party] devs to get going updating their outdated extensions.

I’ll attach the file - but oddly mine says it was updated yesterday along with every other file in that folder - which is when I think I was in the middle of trying to figure this out. So I’m not sure honestly when/which version this file is. And simply replacing this file with yours or making changes is probably not the best course of action. It should update correctly if the steps are done in the right order.

So, that error I resolved without doing any file modifications. My 2.4.3-p1 was working great when I updated, so no previous bugs/problems/errors. Then I simply did the steps I just posted (thanks to the help from @loic-paquin pointing out my mistake) and my problem was solved.

Just make sure to run composer update after updating the “composer-root-update-plugin”. If you still end up with problems, you’ll need to post your exact steps 1 by 1 so I can see where you’re going wrong. Also follow my “preconditions” listed in OP, to make sure you at least have the same versions of stack as I do. Most of what I have is required by Magento (things like my Elasticsearch is somewhat off but so far seems to be okay).

ArrayRepository.php in zip attached - this file also states it’s part of composer. This “updated file” might be from when I updated to 2.3.5, which might look different from yours depending on your composer version. ArrayRepository.zip

There is no typo, The correct syntax is :

composer require-commerce magento/product-community-edition 2.4.4 --no-update

as stipulated : WARNING The procedure for upgrading Adobe Commerce and Magento Open Source has changed. You must install a new version of the magento/composer-root-update-plugin package (see prerequisites). In addition, the commands for upgrading have changed from composer require magento/<package_name> to composer require-commerce magento/<package_name>.

And I’m not sure I understand what you mean when you “It will add the command require-commerce”. It will allow you to use composer require-commerce for the next step.

I got confused too with require-commerce. But once I installed with this method, it was OK. I’m still facing issues with custom modules but it’s not Magento’s fault.

Also you definitely need to launch bin/magento setup:upgrade with php 8.1