2

I am facing after an issue after upgrading version magneto 2.4.3 to 2.4.5 When I run this command I got error

php bin/magento setup:di:compile

Deprecated Functionality: Return type of Zend_Config::count() should either be compatible with Countable

enter image description here

asked Oct 11, 2022 at 11:30
1
  • Can you please tell us that your magento 2.4.5 is running fine or not. I want to use Magento 2.4.5 for my site? Commented Oct 21, 2022 at 12:58

1 Answer 1

0

You should upgrade again because your upgrade failed.

Solution 1: Update the composer.json file specifically the require-dev section with what is written here https://github.com/magento/magento2/blob/2.4.5/composer.json

Then remove vendor folder and run the following commands:

composer install
bin/magento setup:upgrade
bin/magento setup:di:compile

Solution2: Do the following steps:

  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/* var/page_cache/* generated/code/* ; bin/magento setup:upgrade
  5. composer require-commerce magento/product-community-edition 2.4.5 --no-update
  6. composer update
  7. CHANGE TO PHP 8.1
  8. rm -rf var/cache/* var/page_cache/* generated/code/* ; bin/magento setup:upgrade; bin/magento setup:di:compile

Reference: https://github.com/magento/magento2/issues/35306

answered Oct 11, 2022 at 12:45
4
  • I did but got same error again Commented Oct 11, 2022 at 13:11
  • I've updated the answer, please check. Commented Oct 11, 2022 at 13:29
  • I tried both solutions but got same an error Commented Oct 11, 2022 at 14:14
  • You can take a look at the github issue, some suggestion there maybe help you: github.com/magento/magento2/issues/35306 Commented Oct 19, 2022 at 6:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.