Патчи доступны для:
- Magento Open Source (Community) версии с 1.9.2.x до Magento 1.9.3.x
- Magento Commerce (Enterprise) версии с 1.14.2.x до 1.14.3.x
Инструкция по установке
У этих патчей несколько непривычное расширение *.patch. Но оно знакомо тем, кто пользуется GIT или PATCH.
Скачайте соответствующий патч и загрузите его в корень вашего сайта. Далее выполните следующую команду для утилиты PATCH:
patch -p1 < PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2
Если сделали все правильно, вы увидите примерно следующее:
spectre ~/var/docker/m1.docker/html $ patch -p1 < PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2
patching file app/Mage.php
patching file app/code/core/Mage/Core/Helper/Data.php
patching file app/code/core/Mage/Core/Model/Resource/Session.php
patching file app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
patching file app/code/core/Mage/Core/functions.php
patching file app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Group.php
patching file app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Store.php
patching file app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Website.php
patching file app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Source/Country.php
patching file app/code/core/Mage/Customer/Model/Resource/Address/Attribute/Source/Country.php
patching file app/code/core/Mage/Customer/Model/Resource/Address/Attribute/Source/Region.php
patching file app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Store.php
patching file app/code/core/Mage/Install/etc/install.xml
patching file app/code/core/Mage/Sales/etc/config.xml
patching file app/code/core/Mage/Shipping/Model/Carrier/Abstract.php
patching file app/code/core/Mage/Wishlist/Model/Observer.php
patching file lib/Varien/Autoload.php
patching file lib/Varien/File/Uploader.php
patching file lib/Varien/Io/Sftp.php
patching file lib/mcrypt_compat/mcrypt.php
patching file lib/phpseclib/Crypt/AES.php
patching file lib/phpseclib/Crypt/Base.php
patching file lib/phpseclib/Crypt/Blowfish.php
patching file lib/phpseclib/Crypt/DES.php
patching file lib/phpseclib/Crypt/Hash.php
patching file lib/phpseclib/Crypt/RC2.php
patching file lib/phpseclib/Crypt/RC4.php
patching file lib/phpseclib/Crypt/RSA.php
patching file lib/phpseclib/Crypt/Random.php
patching file lib/phpseclib/Crypt/Rijndael.php
patching file lib/phpseclib/Crypt/TripleDES.php
patching file lib/phpseclib/Crypt/Twofish.php
patching file lib/phpseclib/File/ANSI.php
patching file lib/phpseclib/File/ASN1.php
patching file lib/phpseclib/File/ASN1/Element.php
patching file lib/phpseclib/File/X509.php
patching file lib/phpseclib/Math/BigInteger.php
patching file lib/phpseclib/Net/SCP.php
patching file lib/phpseclib/Net/SFTP.php
patching file lib/phpseclib/Net/SFTP/Stream.php
patching file lib/phpseclib/Net/SSH1.php
patching file lib/phpseclib/Net/SSH2.php
patching file lib/phpseclib/PHP/Compat/Function/array_fill.php
patching file lib/phpseclib/PHP/Compat/Function/bcpowmod.php
patching file lib/phpseclib/PHP/Compat/Function/str_split.php
patching file lib/phpseclib/System/SSH/Agent.php
patching file lib/phpseclib/System/SSH/Agent/Identity.php
patching file lib/phpseclib/bootstrap.php
patching file lib/phpseclib/openssl.cnf
Если вы предпочитаете GIT, вместо PATCH, то выполните следующее:
git apply PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2
После чего вы должны увидеть такой отчет
spectre ~/var/docker/m1.docker/html $ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: app/Mage.php
modified: app/code/core/Mage/Core/Helper/Data.php
modified: app/code/core/Mage/Core/Model/Resource/Session.php
modified: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
modified: app/code/core/Mage/Core/functions.php
modified: app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Group.php
modified: app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Store.php
modified: app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Website.php
modified: app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Source/Country.php
modified: app/code/core/Mage/Customer/Model/Resource/Address/Attribute/Source/Country.php
modified: app/code/core/Mage/Customer/Model/Resource/Address/Attribute/Source/Region.php
modified: app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Store.php
modified: app/code/core/Mage/Install/etc/install.xml
modified: app/code/core/Mage/Sales/etc/config.xml
modified: app/code/core/Mage/Shipping/Model/Carrier/Abstract.php
modified: app/code/core/Mage/Wishlist/Model/Observer.php
modified: lib/Varien/Autoload.php
modified: lib/Varien/File/Uploader.php
modified: lib/Varien/Io/Sftp.php
modified: lib/phpseclib/Crypt/AES.php
modified: lib/phpseclib/Crypt/DES.php
modified: lib/phpseclib/Crypt/Hash.php
modified: lib/phpseclib/Crypt/RC4.php
modified: lib/phpseclib/Crypt/RSA.php
modified: lib/phpseclib/Crypt/Random.php
modified: lib/phpseclib/Crypt/Rijndael.php
modified: lib/phpseclib/Crypt/TripleDES.php
modified: lib/phpseclib/Math/BigInteger.php
modified: lib/phpseclib/Net/SFTP.php
modified: lib/phpseclib/Net/SSH1.php
modified: lib/phpseclib/Net/SSH2.php
deleted: lib/phpseclib/PHP/Compat/Function/array_fill.php
deleted: lib/phpseclib/PHP/Compat/Function/bcpowmod.php
deleted: lib/phpseclib/PHP/Compat/Function/str_split.php
Untracked files:
(use "git add ..." to include in what will be committed)
PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2
lib/mcrypt_compat/
lib/phpseclib/Crypt/Base.php
lib/phpseclib/Crypt/Blowfish.php
lib/phpseclib/Crypt/RC2.php
lib/phpseclib/Crypt/Twofish.php
lib/phpseclib/File/
lib/phpseclib/Net/SCP.php
lib/phpseclib/Net/SFTP/
lib/phpseclib/System/
lib/phpseclib/bootstrap.php
lib/phpseclib/openssl.cnf
no changes added to commit (use "git add" and/or "git commit -a")
На заметку
- После установки исправлений, ваша Magento всё равно будет совместима с предыдущими версиями PHP.
- Обратите внимание что ваш сайт должен соответствовать требованиям указанным в SUPEE_* исправления, рядом с каждой конкретной версией патча для PHP 7.2.
- Убедитесь, что у вас не стояло сторонних расширений, которые исправляли совместимость работы с PHP 7.2.
- Проверьте все ли модули или расширения у вас совместимы с PHP 7, для этого используйте регулярное выражение:
->\$.+\[.+\]\(.*\)
Вольный перевод статьи - https://inchoo.net/magento/magento-1-official-php-7-2-patches/