W3cubDocs

/Symfony 4.1

DeprecationErrorHandler

class DeprecationErrorHandler

Catch deprecation notices and print a summary report at the end of the test suite.

Constants

MODE_WEAK
MODE_WEAK_VENDORS
MODE_DISABLED

Methods

static register(int|string|false $mode = 0)

Registers and configures the deprecation handler.

static collectDeprecations($outputFile)

Details

static register(int|string|false $mode = 0)

Registers and configures the deprecation handler.

The following reporting modes are supported: - use "weak" to hide the deprecation report but keep a global count; - use "weak_vendors" to fail only on deprecations triggered in your own code; - use "/some-regexp/" to stop the test suite whenever a deprecation message matches the given regular expression; - use a number to define the upper bound of allowed deprecations, making the test suite fail whenever more notices are trigerred.

Parameters

int|string|false $mode The reporting mode, defaults to not allowing any deprecations

static collectDeprecations($outputFile)

Parameters

$outputFile

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.html