Repository navigation
Add PHP 8.2-8.5 version support upgrade skill and audit engine - #3
noruzzamans wants to merge 4 commits into
Conversation
|
Following our discussion on #2, this pull request has been updated with full dynamic parameterization and is now marked Ready for Review! Summary of Updates:
Looking forward to your review and feedback whenever you have a moment! |
| - phpstan.neon* | ||
| - .github/workflows/*.yml | ||
| metadata: | ||
| author: Fueled & 10up |
There was a problem hiding this comment.
There does not need to be any references to 10up. That can be cleaned up to just be Fueled across all files
| - .github/workflows/*.yml | ||
| metadata: | ||
| author: Fueled & 10up | ||
| version: "1.1.0" |
There was a problem hiding this comment.
Since this hasn't been released yet, any reason for this not to be 1.0.0?
| ## 🎯 Interactive Invocation & Version Configuration | ||
|
|
||
| When invoking this skill, determine the target version boundaries: | ||
| - **Target Minimum PHP Version Floor (`targetMin`):** `8.2` (Default for current Fueled/10up initiative) |
There was a problem hiding this comment.
| - **Target Minimum PHP Version Floor (`targetMin`):** `8.2` (Default for current Fueled/10up initiative) | |
| - **Target Minimum PHP Version Floor (`targetMin`):** `8.2` |
|
|
||
| When invoking this skill, determine the target version boundaries: | ||
| - **Target Minimum PHP Version Floor (`targetMin`):** `8.2` (Default for current Fueled/10up initiative) | ||
| - **Target Maximum Tested PHP Version Ceiling (`targetMax`):** `8.5` (Default for current Fueled/10up initiative) |
There was a problem hiding this comment.
| - **Target Maximum Tested PHP Version Ceiling (`targetMax`):** `8.5` (Default for current Fueled/10up initiative) | |
| - **Target Maximum Tested PHP Version Ceiling (`targetMax`):** `8.5` |
|
|
||
| ## When to Use | ||
|
|
||
| - Updating a Fueled or 10up open-source repository to modernize PHP requirements. |
There was a problem hiding this comment.
Any particularly reason this needs to mention Fueled or 10up here? I'd make this generic for any codebase, open source or not, owned by Fueled or not
| @@ -0,0 +1,164 @@ | |||
| # PHP 8.2–8.5 Deprecations and Incompatibilities Reference | |||
There was a problem hiding this comment.
I'd maybe include down to PHP 8 here, not just PHP 8.2+
| @@ -0,0 +1,76 @@ | |||
| # Legacy Shims and Dead Code Catalog | |||
|
|
|||
| When elevating the minimum supported PHP runtime floor to **PHP 8.2**, legacy conditional branches, compatibility shims, and polyfills for features introduced in PHP 8.0 and 8.1 become dead code. | |||
There was a problem hiding this comment.
| When elevating the minimum supported PHP runtime floor to **PHP 8.2**, legacy conditional branches, compatibility shims, and polyfills for features introduced in PHP 8.0 and 8.1 become dead code. | |
| When elevating the minimum supported PHP runtime floor to **PHP 8.2+**, legacy conditional branches, compatibility shims, and polyfills for features introduced in PHP 8.0 and 8.1 become dead code. |
| @@ -0,0 +1,183 @@ | |||
| # Detection and Tooling Configuration Matrix | |||
|
|
|||
| This reference specifies the deterministic configuration, metadata, and continuous integration settings required when upgrading a WordPress plugin or theme repository to support **PHP 8.2 through PHP 8.5**. | |||
There was a problem hiding this comment.
So a lot still here references PHP 8.2 as the minimum, though someone can set a different minimum. If we want to keep referencing a specific minimum, I'd set that to PHP 8, not 8.2 so it's more flexible
|
Thanks for the thorough review and great suggestions, @dkotter! All feedback points have been addressed in commit a07b4b0:
Ready for re-review! |
Description of the Change
Following the initiative outlined by @jeffpaul in #2, the architectural consultation with @dkotter, and the direction set by WooCommerce's PHP version support update, this pull request introduces a standardized, reusable AI Agent skill conforming to the
@10up/agent-skills/agentskills.iospecification to automate auditing and preparing open-source repositories for modern PHP support.This skill is designed as the foundational precursor to streamline the PHP upgrade across the suite of 24 downstream repositories linked to #2 (including
safe-redirect-manager,distributor,ElasticPress,classifai,safe-svg, etc.).📁 Bundled Skill Architecture
⚙️ Key Operational Capabilities
audit_php_versions.mjs):Requires PHP),readme.txt,composer.json(require.php),phpcs.xml(testVersion), static analysis, and GitHub Actions CI matrices.${var}interpolation,utf8_encode(),auto_detect_line_endings, and obsolete polyfills native in PHP 8.0+.--batchmode for automated scanning across multiple repositories and--jsonfor programmatic agent pipelines.--min=<version>and--max=<version>) with default baseline (8.2and8.5).8.2) and maximum testing ceiling to target maximum (default:8.5).--runtime-set testVersion <min>-<max>) and PHPStan/Psalm targets.['8.2', '8.3', '8.4', '8.5']) withexperimental: truefor pre-GA PHP 8.5 containers.matchexpression rewrites, ensuring surgical PR diffs and minimal maintainer friction.Closes #2
How to test the Change
Verify script execution in a single repository (Default Boundaries):
Confirm structured terminal report displays detected metadata, code pattern risks, and remediation action items.
Verify dynamic version parameterization (Custom Boundaries):
Verify JSON output mode:
Verify batch mode across multiple plugins:
Verify skill documentation completeness:
Review
SKILL.mdand the 4 modular guides inreferences/to ensure all procedures align with Fueled and 10up engineering standards.Changelog Entry
Credits
Props @noruzzamans, @jeffpaul, @dkotter
Checklist: