Magento has released a patch that provides support for PHP 7.2.x for Magento Commerce 1.14.2.x and 1.14.3.x, as well as Magento Open Source 1.9.2.x and 1.9.3.x.
Additionally, support for PHP 7.2 will be included as part of the Magento Commerce 184.108.40.206 and Magento Open Source 220.127.116.11 releases, which are currently scheduled for late 2018.
Note: While this patch resolves compatibility issues with the core Magento code, you must also update any extensions and customizations. Work with your systems integrator and extension vendor to ensure those components are also compatible with PHP 7.2. Test all changes first on a test or staging instance before updating your production site.
Magento Commerce customers can find patch options under Magento Commerce 1.x > Support Patches and Security Patches > PHP Compatibility patches in the Downloads section of their account. We have separate patches for versions 18.104.22.168 to 22.214.171.124, 126.96.36.199, and 188.8.131.52 to 184.108.40.206 (note this last patch is compatible with just released version 220.127.116.11):
Magento Open Source merchants can download the following patches from Magento Tech Resources. We have separate patches for versions 18.104.22.168 to 22.214.171.124, 126.96.36.199, and 188.8.131.52 to 184.108.40.206 (note this last patch is also compatible with just released version 220.127.116.11):
Inchoo eCommerce, contributors to this code, have published this helpful blog post on installing this patch: Magento 1 Official PHP 7.2 patches.
Note: You can install these patches using either patch or git apply <patch_name>. See the Instructions section of the Magento 1 Official PHP 7.2 patches blog post for more information on both forms of installation.
We tested this patch on official sample data on clean installations. In this test environment:
- Magento was set to developer mode
- PHP error reporting was set to E_ALL to report all errors
- Display errors was set to 1 to see all errors
Our test coverage included the following scenarios:
- Running on PHP 5.6 with patch applied
- Installed on PHP 5.6:
- Without patch, then patch applied
- Without patch, then patch applied, and then moved to PHP 7.2
- Running on PHP 7.2 with patch applied
- Installed on PHP 7.2 with patch applied
- Installed with flat categories and products both enabled and disabled
We tested the following actions within the context of the preceding test scenarios:
- Preview CMS page, Contact us form, Category page, and Product page
- Use layered navigation
- Add various product types to cart
- Check out as guest
- Register as a customer
- Check out as customer
- Subscribe to and manage newsletters
- Use wish lists
- Compare products
- Create and use cart price and catalog price rules
- Work with order process flow (shipment, invoice, credit memo, RMA, order cancelation)
- Send email
- Use and manage gift cards, reward points, and store credits
- Use customer segments
- Use Visual Merchandiser
- Add and edit products and categories in the catalog
- Render and edit Configuration pages in the Admin
- SOAP API: creating a product, uploading an image, updating product quantity, managing attributes, and order processing
See the PHP News Archive for more information about PHP 7.2 features.
Special thanks to Inchoo eCommerce for their work on this patch and their helpful blog post.