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.
Auth::old() in v10.0 after 6 months of warnings").spatie/laravel-permission deprecating old auth methods).whoops, laravel-debugbar) to log notices.v1.x → v2.0 transitions).Deprecation component in full Symfony apps).E_USER_DEPRECATED (e.g., default PHP error reporting without custom handlers).Executives:
"This package future-proofs our Laravel ecosystem by giving us a standardized way to phase out old features without disrupting users. It’s a zero-cost insurance policy: by logging deprecation warnings early, we can identify which features to sunset first, reduce support costs from broken upgrades, and maintain trust in our roadmap. For example, if we deprecate Auth::once() in v11, we’ll know exactly which customers are still using it—letting us plan migrations or offer alternatives proactively."
Engineering (Devs/Architects):
"A single, dependency-free function to replace our ad-hoc trigger_error() calls for deprecations. It integrates seamlessly with Laravel’s error handlers to surface warnings in dev and log them in prod—no extra work. We can even fail CI builds if new deprecations pop up unexpectedly, forcing us to clean up tech debt before it bites us. Best part? It’s a one-liner to add to any method, and it’s already battle-tested by Symfony."
Product/Tech Leads:
"This lets us signal intent to developers early—e.g., ‘This API endpoint will be removed in v3.0’—while giving us data to decide when to actually remove it. For example, if we see 90% of users have migrated off oldAuthSystem(), we can confidently deprecate it sooner. It’s a force multiplier for our roadmap planning."
How can I help you explore Laravel packages today?