Skip to content

PHP 8 Compatibility

Sergii Ivashchenko edited this page Mar 16, 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
laminas/laminas-di 2.6.1 3.2.0 https://github.com/magento/magento2/pull/31854 DI
laminas/laminas-servicemanager 2.7.0 3.6.0 https://github.com/magento/magento2/pull/31854 DI
laminas/laminas-mvc 2.7.0 3.2.0 https://github.com/magento/magento2/pull/31854 MVC
laminas/laminas-db 2.11.3 2.12.0 https://github.com/magento/magento2/pull/32330 DB
laminas/laminas-code 3.4.1 3.5.1 https://github.com/magento/magento2/pull/32209 Reflection
laminas/laminas-mime 2.5.0 2.8.0 https://github.com/magento/magento2/pull/32337 Mime
laminas/laminas-view 2.11.2 2.12.0 https://github.com/magento/magento2/pull/32314 View
laminas/laminas-feed 2.9.0 2.13.0 https://github.com/magento/magento2/pull/32473
laminas/laminas-log 2.12.0 2.13.0 https://github.com/magento/magento2/pull/32436
laminas/laminas-console - Removed https://github.com/magento/magento2/pull/32432
laminas/laminas-serializer 2.7.2 2.10.1 https://github.com/magento/magento2/pull/32338

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