/laravel-playbook:craft-deprecationfrom laravel-playbook
Crafting deprecations. Sunset gracefully, remove confidently.
Ships in laravel-playbook. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
"A deprecation is a promise: you have time, and we have a plan."
Deprecate in Minor, Remove in Major: Introduce deprecation notices in a minor release. Remove the deprecated code in the next major. This gives consumers at least one minor version window to migrate. No surprise removals.
Dual Signal — Attribute + Runtime: Mark with #[\Deprecated] (PHP 8.4+) for IDE strikethrough and static analysis. Add trigger_deprecation() for runtime warnings on older PHP. Both signals, always.
Three Files Per Deprecation: Every deprecation PR updates CHANGELOG.md (what changed), UPGRADING.md for the current minor (how to migrate now), and UPGRADING.md for the next major (what gets removed). Symfony's discipline. Adopt it.
Class Deprecation: Create the replacement class. Extend it from the old class (or alias). Mark the old class @deprecated. Consumers' code keeps working. IDE shows the path forward.
Method Deprecation: Keep the old method. Proxy it to the new one. Add #[\Deprecated] and trigger_deprecation() in the body. The old method becomes a one-line redirect with a warning.
Package Deprecation: Mark abandoned on Packagist with a suggest pointing to the successor. Archive the GitHub repo. Write a migration guide. The package still installs — it just tells you where to go next.
Automated Migration: For structural changes (class renames, method renames), ship Rector rules or a CLI upgrade command. Filament's filament/upgrade is the model. Automation beats manual find-and-replace.
Impact Rating: Rate each deprecation as High / Medium / Low likelihood of impact in the upgrade guide. Developers triage — help them prioritize.
| Don't | Do | Why |
|---|---|---|
| Remove without deprecating first | Deprecate in minor, remove in major | Surprise removals break trust |
@deprecated docblock only | Attribute + runtime notice + docblock | Docblocks are invisible at runtime |
| Deprecate without migration path | Show the replacement in the deprecation message | A warning without a fix is just noise |
| Remove in a minor version | Remove only in major versions | Semver contract. No exceptions |
| Deprecate and remove in the same major | At least one minor version window | Consumers need time to migrate |
| Manual-only migration for renames | Ship Rector rules for structural changes | Automation scales, humans don't |
See also: craft-docs (UPGRADING.md structure and versioned docs), craft-release (version support policy).
See examples.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub attac-t/the-foundry --plugin laravel-playbook29 skills in this plugin
/craft-apiCrafting API surfaces. Entry points, fluent builders, progressive disclosure./craft-brandingCrafting package identity. Professional impressions from the first click./craft-ciCrafting a CI pipeline. Five workflows, zero manual gates./craft-configCrafting a config file. The self-documenting contract between package and consumer./craft-docsCrafting a documentation site. Progressive depth, not progressive confusion./craft-exceptionCrafting exceptions. Named constructors, contextual messages, one class per failure mode.