Download the PHP package samsonasik/is-deprecated without Composer
On this page you can find all versions of the php package samsonasik/is-deprecated. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samsonasik/is-deprecated
More information about samsonasik/is-deprecated
Files in samsonasik/is-deprecated
Package is-deprecated
Short Description Check PHP user and core function is deprecated
License MIT
Homepage https://github.com/samsonasik/IsDeprecated
Informations about the package is-deprecated
IsDeprecated
Introduction
IsDeprecated is PHP7 Helper that can help you detect if your function is deprecated with E_USER_DEPRECATED and E_DEPRECATED level.
Features
- [x] Detect on independent function (E_USER_DEPRECATED)
- [x] Detect on function inside class (E_USER_DEPRECATED)
- [x] Detect on core php function (E_DEPRECATED)
Installation
Require uses composer:
Usage
There are 2 functions:
1. For user defined function
Note: when trigger_error E_USER_DEPRECATED inside condition, you need to use
actual
call with signature:
2. For core PHP function
Example On independent function
Example On function inside class
Example On core PHP function
Limitation
For Core PHP Functions or user function with condition (T_IF or T_SWITCH token), the function passed actually need to be called. It ensure that we don't get error during call deprecated function, and we can use alternative function if the isDeprecatedCore()
returns true with call of isDeprecatedWithActualCall
.
Contributing
Contributions are very welcome. Please read CONTRIBUTING.md
All versions of is-deprecated with dependencies
jeremeamia/functionparser Version ^1.0
laminas/laminas-stdlib Version ^3.1