How did I upgrade Magento on keyclampstore.com from 2.4.5-p10 to 2.4.8-p3?

1. Enable the maintenance mode

bin/magento maintenance:enable

2. Adapt the root composer.json to 2.4.8-p3

3. «magento/product-community-edition 2.4.8-p3 requires ext-ftp * -> it is missing from your system»

How did I workaround «magento/product-community-edition 2.4.8-p3 requires ext-ftp * -> it is missing from your system»?

4. «baldwin/magento2-module-csp-shim replaces magento/module-csp and thus cannot coexist with it»

5. «fooman/emailattachments-m2[3.3.10, ..., 3.3.11] require php ~7.1.0||~7.2.0||~7.3.0||~7.4.0||~8.0.0||~8.1.0 -> your php version (8.2.8) does not satisfy that requirement»

6. «laminas/laminas-log[2.13.0, ..., 2.14.x-dev] require php ^7.3 || ~8.0.0 -> your php version (8.2.8) does not satisfy that requirement»

7. Upgrade PHP to 8.2

Magento 2.4.8-p3 requires 8.2 ≤ PHP ≤ 8.4:

8. Change the Composer's minimum-stability for dev to stable

How did I change the Composer's minimum-stability for dev to stable?

9. Upgrade the «Yotpo Reviews» module from 3.3.0 to 4.3.4

How did I upgrade the «Yotpo Reviews» module from 3.3.0 to 4.3.4?

Rationale

How did I fix «Module 'Yotpo_Yotpo'» / «sales_order_data_exporter indexer does not exist» on bin/magento setup:upgrade while upgrading Magento from 2.4.5-p10 to 2.4.8-p3?

10. The «Yotpo Reviews» module has stopped working after the 3.3.0 → 4.3.4 upgrade

How did I repair the «Yotpo Reviews» module after the 3.3.0 → 4.3.4 upgrade?

11. Upgrade the Wyomind_SimpleGoogleShopping module from 14.10.2 to 17.0.8

How did I upgrade the Wyomind_SimpleGoogleShopping module from 14.10.2 to 17.0.8?

Rationale

How did I fix «Creation of dynamic property Wyomind\SimpleGoogleShopping\Plugin\Framework\App\PageCache\Identifier::$request is deprecated in vendor/wyomind/framework/Helper/License.php:11»?

12. Wyomind_SimpleGoogleShopping: «we can't activate your license» / «Your Support & Upgrade Period has expired»

How did I solve «we can't activate your license» / «Your Support & Upgrade Period has expired» for the Wyomind_SimpleGoogleShopping module?

13. composer update

rm -rf composer.lock
composer clear-cache
composer update --ignore-platform-req=ext-ftp

14. Reimplement the core file patches overwritten by composer update

  • .editorconfig
  • pub/get.php
  • setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php
  • vendor/magento/framework/Image/Adapter/Gd2.php
  • vendor/magento/framework/Interception/PluginListGenerator.php
  • vendor/magento/framework/View/Element/Template/File/Validator.php
  • vendor/magento/module-catalog/Model/View/Asset/Image.php

15. The price block on the frontend product screen is broken after the Magento 2.4.5-p10 → 2.4.8-p3 upgrade

How did I repair the broken price block on the frontend product screen after the Magento 2.4.5-p10 → 2.4.8-p3 upgrade?

Magento since 2.4.7 has set skip_adjustments to false for the oldPrice block

16. Disable E_DEPRECATED PHP warnings as the project is fixed priced

17. «Stripe Payments v4.5.6 depends on Stripe PHP library v17.6 or newer» despite I have the version 4.4.0 of stripe/stripe-payments installed

How did I fix «Stripe Payments v4.5.6 depends on Stripe PHP library v17.6 or newer» despite I have the version 4.4.0 of stripe/stripe-payments installed?

18. bin/magento setup:upgrade

rm -rf var/di var/generation generated/*
bin/magento setup:upgrade
bin/magento cache:enable

19. Set "canonical": false for repo.magento.com

It will solve «Root composer.json requires fooman/emailattachments-m2 3.6.1, it is satisfiable <…> from <…> (https://repo.packagist.org) <…> but <…> (https://repo.magento.com) has higher repository priority».

20. Upgrade fooman/emailattachments-m2

It will solve «Class "Zend_Mime" not found» in vendor/fooman/emailattachments-m2/src/Model/Attachment.php:31 on bin/magento setup:di:compile.

rm -rf composer.lock
composer clear-cache
composer remove fooman/emailattachments-m2 --ignore-platform-req=ext-ftp
composer require fooman/emailattachments-m2:3.6.1 --ignore-platform-req=ext-ftp

rm -rf var/di var/generation generated/*
bin/magento setup:upgrade
bin/magento cache:enable

21. Mageplaza_SecurityPro: «Preference declared for "Zend\ServiceManager\ServiceLocatorInterface" as "Zend\ServiceManager\ServiceManager", but the latter does not exist» on bin/magento setup:di:compile

How did I fix «Preference declared for "Zend\ServiceManager\ServiceLocatorInterface" as "Zend\ServiceManager\ServiceManager", but the latter does not exist» on bin/magento setup:di:compile for Mageplaza_SecurityPro in Magento 2.4.8-p3?

22. «Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway)» in PayPal_Braintree despite I do not use it

How did I fix the «Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway)» error of the PayPal_Braintree module despite I do not use it?

23. bin/magento setup:di:compile

bin/magento setup:di:compile

24. bin/magento setup:static-content:deploy

(
	bin/magento cache:clean
	(
		o=(
			pub/static/*		
			var/cache
			var/page_cache
			var/view_preprocessed
		) 
		rm -rf "${o[@]}"
	)
	(
		ll='en_US en_GB'
		tt=(
			'adminhtml Magento/backend'
			'frontend Codazon/unlimited_motorcycle'
		)	
		for t in "${tt[@]}"; do
			read -r area theme <<< "$t"
			o=(
				--area $area
				--force
				--theme $theme
			)
			bin/magento setup:static-content:deploy "${o[@]}" $ll
		done
	)
	bin/magento cache:clean	
)	

25. Install mage2pro/core for diagnostics

26. «elasticsearch7 search engine doesn't exist. Falling back to opensearch»

How did I fix «elasticsearch7 search engine doesn't exist. Falling back to opensearch» in Magento 2.4.8-p3?

27. bin/magento indexer:reindex

bin/magento indexer:reindex

28. Prevent the backend notification spam from Magefan modules

How did I prevent the backend notification spam from Magefan modules?

29. Disable the maintenance mode

bin/magento maintenance:disable

30. «Redis session exceeded concurrent connections»

How did I solve «Redis session exceeded concurrent connections» after a Magento 2.4.5-p10 → 2.4.8-p3 upgrade?

https://github.com/keyclampstore-com/m/issues/35

31. «Undefined array key 2 in vendor/magento/framework/Reflection/TypeProcessor.php on line 947» on /soap/default?services=storeStoreRepositoryV1

How did I solve «Undefined array key 2 in vendor/magento/framework/Reflection/TypeProcessor.php on line 947» on /soap/default?services=storeStoreRepositoryV1?

https://github.com/keyclampstore-com/m/issues/36

32. MageWorx_ShippingRules: «Magento\Customer\Model\Address\AbstractAddress\CountryModelsCache::get(): Argument #1 ($key) must be of type string, null given, called in vendor/magento/module-customer/Model/Address/AbstractAddress.php on line 532»

How did I solve the «Magento\Customer\Model\Address\AbstractAddress\CountryModelsCache::get(): Argument #1 ($key) must be of type string, null given» error caused by the MageWorx_ShippingRules module?

https://github.com/keyclampstore-com/m/issues/37

33. magento.cron.log: «Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.29. in vendor/composer/platform_check.php on line 28»

How did I solve the «Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.29. in vendor/composer/platform_check.php on line 28» problem on bin/magento cron:run on Nexcess?

https://github.com/keyclampstore-com/m/issues/40

34. lib/web/less/less.min.js 4.2.0 (shipped with Magento 2.4.8-p3) fails on the Less files of Codazon_ThemeLayoutPro: «Operation on an invalid type»

How did I resolve «Operation on an invalid type» for the Less files of Codazon_ThemeLayoutPro in Magento 2.4.8-p3?

35. wikimedia/less.php 5.5.0 (used by Magento 2.4.8-p3) fails on the Less files of Codazon_ThemeLayoutPro: «Operation on an invalid type»

How did I resolve «Operation on an invalid type» for the Less files of Codazon_ThemeLayoutPro in Magento 2.4.8-p3?