Skip to content

PHP 8 Compatibility

Sergii Ivashchenko edited this page Feb 20, 2021 · 20 revisions

Overview

To ensure that our journey to PHP 8 compatibility is visible and transparent, we are launching the Magneto PHP 8 Compatibility Community Project!

The mainline for the project is php8-develop branch that should be available for all affected Magento repositories.

Dependency versions updated in php8-develop branch

Dependency 2.4-develop version php8-develop version Pull request Functionality
wikimedia/lessphp 1.8.2 v3.1.0 https://github.com/magento/magento2/pull/31579 Less processing
phpstan/phpstan 0.12.23 0.12.77 https://github.com/magento/magento2/pull/30581 Static tests
pelago/emogrifier 3.1.0 5.0.0 https://github.com/magento/magento2/pull/31772 Email styles
laminas/laminas-validator 2.13.4 2.14.4 https://github.com/magento/magento2/pull/31797 Url validation
tedivm/jshrink 1.3.3 1.4.0 https://github.com/magento/magento2/pull/31800 Javascript minifiaction
laminas/laminas-config 2.6.0 3.4.0 https://github.com/magento/magento2/pull/31856 Not used in Magento. Removed as 1st level dependency
friendsofphp/php-cs-fixer 2.16.10 2.18.2 https://github.com/magento/magento2/pull/31858 Static tests
elasticsearch/elasticsearch 7.7.0 7.11.0 https://github.com/magento/magento2/pull/32210 Elasticsearch
laminas/laminas-crypt 2.6.0 3.4.0 https://github.com/magento/magento2/pull/32200 Enchryption
laminas/laminas-math 2.7.1 3.3.2 https://github.com/magento/magento2/pull/32200 Enchryption
laminas/laminas-json 2.6.1 3.2.0 https://github.com/magento/magento2/pull/32198 Serialization

Backward incompatible changes list

Description Dependency Pull request
Magento\Email\Model\Template\Filter constructor parameters changed pelago/emogrifier https://github.com/magento/magento2/pull/31772
Magento\Email\Model\Template\Filter::getCssFilesContent function throws exception instead of returning exception message in the content pelago/emogrifier https://github.com/magento/magento2/pull/31772
Magento\Email\Model\Template\Filter::$emogrifier protected property has been removed pelago/emogrifier https://github.com/magento/magento2/pull/31772
\Magento\PhpStan\Formatters\FilteredErrorFormatter does not extend \PHPStan\Command\ErrorFormatter\TableErrorFormatter phpstan/phpstan https://github.com/magento/magento2/pull/32215
dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon configuration updated phpstan/phpstan https://github.com/magento/magento2/pull/32215