# symfony/deprecation-contracts

A generic function and convention to trigger deprecation notices

Repository: https://github.com/symfony/deprecation-contracts
Canonical: https://ross.abutalabs.com/products/deprecation-contracts
Homepage: https://symfony.com
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, contracts, symfony-contracts
Last push: 2026-06-27T21:46:30+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 78, longevity 100
- inputs: {"age_days": 2398, "days_push": 67, "days_rel": 67, "gap_med": 52, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2099, forks 10 (observed 2026-08-28T04:06:13.493325+00:00)

## What it is
A minimal PHP package providing a single global `trigger_deprecation()` function and convention for emitting deprecation notices from libraries. The notices can be captured and logged via a custom error handler such as Symfony's ErrorHandler component.

## Use cases
- trigger deprecation notices in a php library
- warn users about deprecated api usage
- log silenced deprecations in dev and prod
- manage backward compatibility warnings across package versions
- standardize deprecation messages in composer packages

## When to choose
- you maintain a PHP library or Symfony component and need a standard way to mark APIs as deprecated
- you want deprecations to be catchable and loggable by error handlers
- you need a tiny dependency with no runtime overhead

## When to avoid
- you need a full deprecation detection or static analysis tool rather than a trigger convention
- your project is not PHP-based
- you want automatic code migration suggestions

## Facets
- artifact type: library
- maturity: stable
- function: logging, error-handling, developer-tools
- domain: developer-tools, apis
- platform: php, cli
- tags: deprecation-notices, symfony-contracts, php-library, backward-compatibility, php

## Member repositories
- symfony/deprecation-contracts (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:13.493325+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:54:27.114315+00:00, confidence not recorded.
  - readme: https://github.com/symfony/deprecation-contracts (fetched 2026-08-28T04:06:13.493325+00:00, sha 174b9acbcf94)
  - homepage: https://symfony.com (fetched 2026-08-29T10:34:44.333306+00:00, sha 68595089eb73)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T10:34:44.342417+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/contributing/community/releases.html (fetched 2026-08-29T10:34:44.344358+00:00, sha 43441105b0a6)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T10:34:44.346201+00:00, sha 5bd749e2b676)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T10:34:44.347975+00:00, sha d8584ccbba1c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
