symfony/deprecation-contracts
symfony/deprecation-contracts has 2,099 GitHub stars and 10 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-09 21:14 UTC. Last push 2026-09-16.
A generic function and convention to trigger deprecation notices
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalSymfony Deprecation Contracts
A generic function and convention to trigger deprecation notices.
This package provides a single global function named trigger_deprecation() that triggers silenced deprecation notices.
By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
The function requires at least 3 arguments:
- the name of the Composer package that is triggering the deprecation
- the version of the package that introduced the deprecation
- the message of the deprecation
- more arguments can be provided: they will be inserted in the message using
printf()formatting
Example:
trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
This will generate the following message:
Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.
While not recommended, the deprecation notices can be completely ignored by declaring an empty
function trigger_deprecation() {} in your application.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,625 starspublic-apis/public-apis
A collective list of free APIs
497,974 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
450,225 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,301 stars