Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via composer

doctrine/deprecations v1.1.1

A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
Package summary
Share
0
issues
1
license
1
MIT
Package created
10 Jul 2020
Version published
3 Jun 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
doctrine/deprecations@v1.1.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of doctrine/deprecations 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does doctrine/deprecations do?

Doctrine/Deprecations is a small package that operates as a layer above trigger_error(E_USER_DEPRECATED) or PSR-3 logging. This PHP library provides additional functionality with less side-effects, allowing for the ability to disable all or specific deprecations for packages. This helps developers in dealing with deprecated code and preparing for future updates, in a more efficient, less error-prone way.

How do you use doctrine/deprecations?

Using Doctrine/Deprecations involves several key methods and environments settings. At the basic level, to enable Doctrine deprecations to be sent to a PSR3 logger, you can run:

\Doctrine\Deprecations\Deprecation::enableWithPsrLogger($logger);

To allow the deprecations to be sent as @trigger_error messages, you should set the DOCTRINE_DEPRECATIONS environment variable to 'trigger', or simply call:

\Doctrine\Deprecations\Deprecation::enableWithTriggerError();

To disable deprecations for specific packages or identifiers, use the ignoreDeprecations and ignorePackage methods as shown:

\Doctrine\Deprecations\Deprecation::ignoreDeprecations("https://link/to/deprecations-description-identifier");
\Doctrine\Deprecations\Deprecation::ignorePackage("doctrine/orm");

To trigger a deprecation, the trigger and triggerIfCalledFromOutside methods can be used:

\Doctrine\Deprecations\Deprecation::trigger(
    "doctrine/orm",
    "https://link/to/deprecations-description",
    "message"
);

Note: Replace "https://link/to/deprecations-description" and "message" with the appropriate deprecation description and message.

Where are the doctrine/deprecations docs?

The documentation for Doctrine/Deprecations can be found within the README file in the package's GitHub repository at https://github.com/doctrine/deprecations. This documentation provides a comprehensive view of the functionalities available in the library, useful code snippets, and guidelines for usage scenarios including PHPUnit tests.