SyntaxStudy
Sign Up
PHP Intermediate 3 min read

Platform Requirements

Platform Config

Declare the PHP version and required extensions so Composer validates compatibility before installing.

Example
"require": {
  "php": "^8.2",
  "ext-pdo": "*",
  "ext-json": "*",
  "ext-mbstring": "*",
  "ext-redis": "^6.0"
},
"config": {
  "platform": { "php": "8.2.0" }
}
# Check platform requirements
composer check-platform-reqs
Pro Tip

config.platform lets you test compatibility with an older PHP version even if you run a newer one locally.