PHPackages                             ruudk/deprecation-contracts-with-backtrace - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ruudk/deprecation-contracts-with-backtrace

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ruudk/deprecation-contracts-with-backtrace
==========================================

A generic function and convention to trigger deprecation notices

v3.6.0(6mo ago)132.9k↓91.7%MITPHPPHP &gt;=8.1

Since Dec 18Pushed 6mo agoCompare

[ Source](https://github.com/ruudk/deprecation-contracts-with-backtrace)[ Packagist](https://packagist.org/packages/ruudk/deprecation-contracts-with-backtrace)[ Docs](https://symfony.com)[ RSS](/packages/ruudk-deprecation-contracts-with-backtrace/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Deprecation Contracts with Backtrace
====================================

[](#deprecation-contracts-with-backtrace)

A drop-in replacement for [`symfony/deprecation-contracts`](https://github.com/symfony/deprecation-contracts) that includes a backtrace in deprecation messages.

The Problem
-----------

[](#the-problem)

When Symfony or other packages trigger deprecation warnings, you often see messages like:

```
Since symfony/framework-bundle 6.4: The "foo" option is deprecated.

```

But where is this deprecation triggered from? Without a backtrace, you have to search your entire codebase to find the source.

The Solution
------------

[](#the-solution)

This package adds a backtrace to every deprecation message, so you'll see:

```
Since symfony/framework-bundle 6.4: The "foo" option is deprecated.
/var/www/app/src/Controller/MyController.php:42
/var/www/app/src/Service/MyService.php:87
/var/www/app/vendor/symfony/framework-bundle/Controller/AbstractController.php:123
...

```

Now you can immediately see where the deprecation is being triggered.

Installation
------------

[](#installation)

```
composer require ruudk/deprecation-contracts-with-backtrace
```

That's it! The package uses Composer's `replace` directive to automatically replace `symfony/deprecation-contracts`. No configuration needed.

How it Works
------------

[](#how-it-works)

This package provides the same `trigger_deprecation()` function as Symfony's deprecation-contracts, but appends a backtrace (up to 10 frames) to the deprecation message. Since it declares `"replace": {"symfony/deprecation-contracts": "self.version"}` in its composer.json, Composer will use this package instead of the original.

License
-------

[](#license)

MIT License - see the [LICENSE](LICENSE) file for details.

Based on [symfony/deprecation-contracts](https://github.com/symfony/deprecation-contracts) by Fabien Potencier and the Symfony Community.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance66

Regular maintenance activity

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/104180?v=4)[Ruud Kamphuis](/maintainers/ruudk)[@ruudk](https://github.com/ruudk)

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (31 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (19 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (2 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (2 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (1 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (1 commits)")[![cedric-anne](https://avatars.githubusercontent.com/u/33253653?v=4)](https://github.com/cedric-anne "cedric-anne (1 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (1 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (1 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (1 commits)")[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (1 commits)")

### Embed Badge

![Health badge](/badges/ruudk-deprecation-contracts-with-backtrace/health.svg)

```
[![Health](https://phpackages.com/badges/ruudk-deprecation-contracts-with-backtrace/health.svg)](https://phpackages.com/packages/ruudk-deprecation-contracts-with-backtrace)
```

###  Alternatives

[skyronic/laravel-file-generator

Laravel package to help you automate creation of files. Build your own custom generators like 'artisan make:model'.

6748.8k](/packages/skyronic-laravel-file-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
