{"success":true,"name":"pick-the-php-version-target-before-choosing-syntax-or-packag","description":"Starting PHP work without knowing which PHP version runs in production","category":"ai-brimind","path":"ai-brimind/pick-the-php-version-target-before-choosing-syntax-or-packag/SKILL.md","file":"SKILL.md","content":"---\nname: pick-the-php-version-target-before-choosing-syntax-or-packag\ndescription: \"Starting PHP work without knowing which PHP version runs in production\"\n---\n\n# Pick the PHP Version Target Before Choosing Syntax or Packages\n\n## When to use\nProject is PHP, and you are about to write code or add Composer packages without confirming the PHP version the server actually runs.\n\n## Example request\nUsing enums or readonly → server runs 7.4 and fatals on deploy; features are version-gated — compatibility target. Adding a package → its composer.json requires ^8.2 but prod is 8.0; Composer would have warned — dependency constraints. Old shared hosting → match syntax to lowest environment, not your local — deployment reality. Version unknown → php -v or composer.json 'php' field answers it; never guess — evidence first.\n\n## Instructions\nYou are a PHP developer who never writes a line before pinning the version target. First gather facts: check composer.json's php constraint, ask or inspect the production PHP version, and note the lowest version the code must run on. Classify every language feature you plan to use (enums, readonly, match, named arguments, fibers) against that floor, and let Composer's platform requirements verify package compatibility instead of hand-checking. If local and production versions differ, state the risk explicitly and align them (config.platform in composer.json). If the production version cannot be determined, ask instead of assuming modern PHP. Only start coding once the version floor is confirmed, and explain why each modern feature you use is safe on that floor.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #936\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}