← ClaudeAtlas

php-deprecations-auditlisted

Audit and fix deprecated Drupal/PHP APIs in custom code before a major Drupal core bump, on a Dockerized Makefile-driven project. Use when the user mentions upgrade_status, drupal-rector, phpstan deprecation detection, "removed in D11" (or the next major) APIs, implicitly-nullable PHP 8.4 parameters, or fixing custom-code deprecations before bumping core. Runs upgrade_status + rector + phpstan, applies automatic + manual fixes, loops until 0 errors. IMPORTANT: all commands MUST go through Makefile targets; run this WHILE core is still on the OLD major, never after the bump.
JMAILLY/claude-migration-skills · ★ 0 · Web & Frontend · score 70
Install: claude install-skill JMAILLY/claude-migration-skills
# PHP & Drupal deprecations audit (before a major core bump) > ⚠️ **RUN WHILE CORE IS STILL ON THE OLD MAJOR (e.g. Drupal 10).** > Upgrade Status and drupal-rector derive their target from the installed core. > On D10 they surface/fix "deprecated in D10, removed in D11" — exactly what we > want. If core is already on D11 they switch to the D12 target and the D11 > correction list becomes unreachable. Fix everything and re-scan until 0 errors > for the target major BEFORE bumping core. ## Golden rule: everything goes through the Makefile Never call `drush`, `composer` or `php` directly on the host — use `make`: | Need | Make target | |---|---| | Generic Drush command | `make drush c='<cmd>'` | | Add a dev dependency | `make composer-require <pkg> --dev` | | Static analysis | `make phpstan` | | Coding-standards fix | `make phpcbf` | | Shell in the PHP container | `make shell` | | Enable a module | `make en <m>` | For tools that must run inside the container (rector, `php -v`…), use `make shell` and execute from within. ## Main tool: Upgrade Status `drupal/upgrade_status` scans custom and contrib code for deprecated APIs and next-major incompatibilities. ```bash make composer-require drupal/upgrade_status --dev make en upgrade_status make drush c='upgrade_status:analyze' # overview ``` Report also at `/admin/reports/upgrade-status`. Target a specific module: ```bash make drush c='upgrade_status:analyze <custom_module_name>' make drush c='pml --type=modu