← ClaudeAtlas

dhpk-php-8x-featureslisted

Use when the project's PHP floor permits 8.x syntax, when reviewing whether a 7.4-and-up library can adopt an 8.x idiom conditionally, or when designing an API with attributes, enums, readonly, or newer types. Not for everyday business logic, 7.4 baseline guidance, or legacy 5.6 code. Output: a feature recommendation or migration decision with its minimum PHP version and library-floor rule.
hmj1026/dhpk · ★ 2 · Code & Development · score 71
Install: claude install-skill hmj1026/dhpk
# PHP 8.x features — routing entrypoint Use this skill to decide whether a PHP 8.0–8.3 language feature is legal for the actual runtime and package floor. Start with the feature catalog before editing code; PHP 8.x syntax has no runtime polyfill. ## Working sequence 1. Read `composer.json`, CI matrices, and deployment metadata to identify the lowest supported PHP version. 2. Open the relevant version section in `references/feature-catalog.md`. 3. Apply the catalog's library rule: attributes may be inert on 7.4, while the other listed 8.x syntax requires a compatible parser. 4. If the floor changes, run the composer-package-hygiene checks and record the semver consequence. 5. Verify with the project's parser, static-analysis, and focused-test gates. ## Decision branches - Choosing a language idiom: use the feature's minimum-version entry and compare it with the declared floor. - Supporting `^7.4 || ^8.0`: use the mixed-floor decision table; do not hide parse errors behind runtime checks. - Designing public API: inspect named-argument stability, attributes read by frameworks, and serialization or reflection consequences. - Raising `composer.json`'s PHP floor: hand off to `skills/dhpk-composer-package-hygiene/SKILL.md` for semver and release review. ## When NOT to Use - Everyday business logic where no PHP-version decision is involved. - PHP 7.4 baseline or dual-floor patterns; use `dhpk-php-modern-pro`. - Legacy PHP 5.6 compatibility work; use `dhpk-p