How did I upgrade tradefurniturecompany.co.uk from Magento 2.3.6-p1 to 2.3.7-p4?

Step 1

bin/magento maintenance:enable

Step 2

I replaced the the root’s composer.json file with the file from Magento 2.3.7-p4.
Then I declared already installed third-party packages in the require section of the file:

https://github.com/tradefurniturecompany/site/tree/2023-06-30-v3/composer.json#L17-L36

Step 3

rm -rf composer.lock
composer update

Step 4

Then I restored patches in Magento files (which have been overwritten by composer update).

4.1. lib/web/fotorama/fotorama.js

4.2. pub/errors/default/503.phtml

4.3. vendor/magento/framework/Image/Adapter/Gd2.php

4.4. vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php

4.5. vendor/magento/framework/View/Element/Template/File/Validator.php

How to fix the «Invalid template file» / «require_js.phtml» failure for 2.3 ≤ Magento < 2.4.5 in Windows?

4.6. vendor/magento/module-paypal/Model/Api/Nvp.php

4.7. vendor/magento/module-quote/Model/ChangeQuoteControl.php

Step 5

How did I fix «strtotime() expects parameter 1 to be string, null given in vendor/magento/module-security/Model/AdminSessionInfo.php:136»?

Step 6

Step 7

Step 8

Step 9

bin/magento setup:upgrade
bin/magento cache:enable

Step 10

I disabled the preinstalled Magento’s crapware:

bin/magento module:disable Vertex_AddressValidationApi

Step 11

rm -rf var/di var/generation generated/*
bin/magento setup:di:compile
bin/magento cache:clean
rm -rf pub/static/* var/cache var/page_cache var/view_preprocessed
bin/magento setup:static-content:deploy \
	--area adminhtml \
	--theme Magento/backend \
	-f en_US en_GB
bin/magento setup:static-content:deploy \
	--area frontend \
	--theme TradeFurnitureCompany/default \
	-f en_GB
bin/magento cache:clean
bin/magento maintenance:disable

Step 12

How to fix «Session size of <…> exceeded allowed session max size of <…>» in Magento 2.3 ≥ 2.3.7 and Magento 2.4 ≥ 2.4.3?

Step 13

Remove the bin/magento setup:cron:run command call and the update/cron.php script call from the Cron schedule.