All Projects → symfony → Deprecation Contracts

symfony / Deprecation Contracts

Licence: mit
A generic function and convention to trigger deprecation notices

Labels

Projects that are alternatives of or similar to Deprecation Contracts

Pagekit
Pagekit CMS
Stars: ✭ 5,455 (+633.2%)
Mutual labels:  symfony
Wallabag
wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.
Stars: ✭ 6,392 (+759.14%)
Mutual labels:  symfony
Symfony Docker
A Docker-based installer and runtime for Symfony. Install: download and `docker-compose up`.
Stars: ✭ 732 (-1.61%)
Mutual labels:  symfony
Sensiogeneratorbundle
Generates Symfony bundles, entities, forms, CRUD, and more...
Stars: ✭ 634 (-14.78%)
Mutual labels:  symfony
Sulu
Core framework that implements the functionality of the Sulu content management system
Stars: ✭ 645 (-13.31%)
Mutual labels:  symfony
Polyfill Intl Grapheme
This component provides a partial, native PHP implementation of the Grapheme functions from the Intl extension.
Stars: ✭ 690 (-7.26%)
Mutual labels:  symfony
Mailer
The Mailer component helps sending emails
Stars: ✭ 609 (-18.15%)
Mutual labels:  symfony
Symfony Cmf
Meta package tying together all the key packages of the Symfony CMF project.
Stars: ✭ 742 (-0.27%)
Mutual labels:  symfony
Craueformflowbundle
Multi-step forms for your Symfony project.
Stars: ✭ 654 (-12.1%)
Mutual labels:  symfony
Recipes
Symfony Recipes Repository
Stars: ✭ 724 (-2.69%)
Mutual labels:  symfony
Sulu Standard
This repository is not longer the recommended way to start a sulu project. Use:
Stars: ✭ 636 (-14.52%)
Mutual labels:  symfony
Knpgaufrettebundle
Easily use Gaufrette in your Symfony projects.
Stars: ✭ 646 (-13.17%)
Mutual labels:  symfony
Symfony
The Symfony PHP framework
Stars: ✭ 26,220 (+3424.19%)
Mutual labels:  symfony
Polyfill Apcu
This component provides apcu_* functions and the APCUIterator class to users of the legacy APC extension.
Stars: ✭ 629 (-15.46%)
Mutual labels:  symfony
Translation
The Translation component provides tools to internationalize your application.
Stars: ✭ 6,196 (+732.8%)
Mutual labels:  symfony
Graphqlbundle
This bundle provides tools to build a complete GraphQL server in your Symfony App.
Stars: ✭ 628 (-15.59%)
Mutual labels:  symfony
Doctrine Test Bundle
Symfony bundle to isolate your app's doctrine database tests and improve the test performance
Stars: ✭ 689 (-7.39%)
Mutual labels:  symfony
En Marche.fr
Le site principal du mouvement En Marche !
Stars: ✭ 743 (-0.13%)
Mutual labels:  symfony
Alicebundle
A Symfony bundle to manage fixtures with Alice and Faker.
Stars: ✭ 742 (-0.27%)
Mutual labels:  symfony
String
Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way.
Stars: ✭ 709 (-4.7%)
Mutual labels:  symfony

Symfony 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 necessarily recommended, the deprecation notices can be completely ignored by declaring an empty function trigger_deprecation() {} in your application.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].