symfony/deprecation-contracts
Provides the global trigger_deprecation() helper to emit standardized, silenced deprecation notices with package name and version. Works with custom error handlers (e.g., Symfony ErrorHandler) to catch and log deprecations in dev and production.
spatie/laravel-activitylog) to maintain compatibility during transitions, ensuring smoother adoption for end users.Adopt when:
Route::controller() to Route::resource()).ErrorHandler or a compatible system (e.g., Laravel’s built-in error handling) to log/alert on deprecations.Avoid when:
E_USER_DEPRECATED notices (e.g., no custom error handler or logging pipeline).Executives:
"This package future-proofs our Laravel ecosystem by standardizing how we communicate deprecated features—reducing support costs from unexpected breakages and keeping our roadmap transparent. For example, when we deprecate Auth::login() in favor of Auth::attempt(), developers get clear, versioned warnings before the change, not after. It’s a zero-cost investment that directly improves upgrade reliability and customer trust."
Engineering (Devs):
"A single trigger_deprecation() call replaces ad-hoc trigger_error() hacks or undocumented Slack posts. It integrates with Laravel’s error handling to log usage in production (e.g., ‘legacy User::findById() called 42 times this month’), so we can proactively clean up tech debt. No dependencies, no overhead—just add it to your deprecation workflow."
Engineering (PMs/Architects):
"This is the missing piece for Laravel’s gradual API evolution. Imagine deprecating Blade@if() in favor of @isset(): with this package, we can log every usage instance, set a deprecation timeline, and even automate CI checks to block deprecated paths. It’s like GitHub’s deprecation policy, but for PHP."
How can I help you explore Laravel packages today?