Skip to main content

PHP 8.2

PHP 8.2 added readonly classes, disjunctive normal form (DNF) types, the true/false/null standalone types and deprecated dynamic properties. php-ci ships a fully maintained 8.2 image.

Image tag

docker pull himanshuramavat/php-ci:8.2
PropertyValue
Image taghimanshuramavat/php-ci:8.2
PHP branch8.2.x
StatusSecurity fixes only
Support window

PHP 8.2 is in its security-only phase (upstream security support ends 31 Dec 2026). It remains a safe target for production but consider 8.3 for new projects.

When to use it

  • Production applications that have completed their 8.2 migration.
  • The minimum supported version for many current framework releases.

Run the suite

docker run --rm -v "$(pwd):/app" -w /app himanshuramavat/php-ci:8.2 \
bash -c "composer install --no-interaction && ./vendor/bin/phpunit"

Language features available

  • readonly classes
  • Disjunctive Normal Form types ((A&B)|C)
  • Standalone null, true and false types
  • #[\AllowDynamicProperties] and the deprecation of undeclared dynamic properties
  • New Random\Randomizer extension

Migration tip

The deprecation of dynamic properties is the most common source of new warnings. Surface them in CI before they become fatal in 9.0:

docker run --rm -v "$(pwd):/app" -w /app himanshuramavat/php-ci:8.2 \
bash -c "composer install --no-interaction && ./vendor/bin/phpunit --display-deprecations"