Announcing Official PHP 8.2 Support for Current TYPO3 Versions

Categories: Development, TYPO3 CMS Created by Benni Mack
A blue stuffed animal shaped like an elephant with the text "php" on the side.
Photo: Drew McLellan / Flickr (CC BY-NC 2.0)
PHP 8.2 was officially released on December 8, 2022. Our TYPO3 versions v11 LTS and v12 support the new PHP version already.

Updated 10 January 2023: Added the section TYPO3 v11 LTS and PHP 8.2 Caveats With PostgreSQL.

Read the PHP 8.2 Release Notes

In the past months we worked hard, with both manual and automatic testing, to ensure compatibility with the new PHP version. Thanks to our testing infrastructure, a lot of the tests of both the TYPO3 core and third-party libraries could be done automatically. The result: Our code base is compatible with PHP 8.2 in our latest releases (TYPO3 11.5.21 and TYPO3 12.1.3). 

The TYPO3 Core is ready for the future of PHP.

Using PHP 8.2 With TYPO3

PHP 8.2 ships with read-only classes and various new features. Even though TYPO3’s code base for v12 will stick with the minimum requirement of PHP 8.1, projects that run on PHP 8.2 can easily use the new PHP language features right away.

Pro tip: DDEV is a great tool for working with TYPO3 in local environments. The latest version has built-in support for PHP 8.2 and TYPO3 v12.

TYPO3 v11 LTS and PHP 8.2 Caveats With PostgreSQL

When using TYPO3 v11 LTS with PHP 8.2 in combination with PostgreSQL as database backend, there is one PHP 8.2 issue related to a PHP library TYPO3 is including. Doctrine DBAL — the database abstraction layer — does not officially support PHP 8.2 in the library version we use in TYPO3 v11. Due to our backwards-compatibility promise, we were unable to update Doctrine DBAL to the next major version for TYPO3 v11.

Our bundled versions (the tar.gz and zip files) include a patched version of Doctrine DBAL that fixes the underlying issue.

However, the deprecation warning will still occur in Composer-based installations when using TYPO3 v11 on PHP 8.2 with PostgreSQL. To resolve this issue, you can apply the same patch in your Composer-based installation. See our instructions in this commit.

TYPO3 v10 and PHP 8 Compatibility

Since PHP 8.0 was released 2 years ago, TYPO3’s code base had to be heavily modified to achieve PHP 8.0 compatibility. It took roughly 80 days of work to add support for both PHP 7.4 and PHP 8.x in TYPO3 v11+, and in the months following the release, we found more and more parts that hadn’t been covered yet. Achieving the same for TYPO3 v10 would have included breaking changes in both the Core and various third-party libraries. As a result, there will be no PHP 8 compatibility for TYPO3 v10.

Additionally, a lot of PHP libraries that included breaking changes to achieve PHP 8.0 compatibility, did not provide PHP 8.0 and PHP 7.2 support at the same time (our original promise for TYPO3 v10). This heavily affects our downloadable .tar.gz and .zip files, where the libraries are included in the files. 

Last but not least, all extension code, whether project-specific or third-party from the TYPO3 Extension Repository (TER), must be compatible with PHP 8 as well. 

If you are in this situation, we recommend upgrading to TYPO3 v11 LTS or further, as TYPO3 v11 supports PHP 7.4 and PHP 8+.

Read the PHP 8.2 Release Notes

Additional contributors for this article
  • Copy Editor : Mathias Bolt Lesniak