src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
/**
     * Registers and configures the deprecation handler.
     *
     * The mode is a query string with options:
     *  - "disabled" to enable/disable the deprecation handler
     *  - "verbose" to enable/disable displaying the deprecation report
     *  - "quiet" to disable displaying the deprecation report only for some groups (i.e. quiet[]=other)
     *  - "max" to configure the number of deprecations to allow before exiting with a non-zero
     *    status code; it's an array with keys "total", "self", "direct" and "indirect"
     *
     * The default mode is "max[total]=0&verbose=1".
     *
     * The mode can alternatively be "/some-regexp/" to stop the test suite whenever
     * a deprecation message matches the given regular expression.
     *
     * @param int|string|false $mode The reporting mode, defaults to not allowing any deprecations
     */
Registers and configures the deprecation handler.

The default mode is "max[total]=0&verbose=1".

The mode can alternatively be "/some-regexp/" to stop the test suite whenever
a deprecation message matches the given regular expression.

@param int|string|false $mode The reporting mode, defaults to not allowing any deprecations
Registers and configures the deprecation handler . The default mode is " max [ total ] = 0&verbose = 1 " . The mode can alternatively be " / some - regexp / " to stop the test suite whenever a deprecation message matches the given regular expression . @param int|string|false $mode The reporting mode defaults to not allowing any deprecations
public static function register($mode = 0)
    {
        if (self::$isRegistered) {
            return;
        }
        $handler = new self();
        $oldErrorHandler = set_error_handler([$handler, 'handleError']);
        if (null !== $oldErrorHandler) {
            restore_error_handler();
            if ($oldErrorHandler instanceof ErrorHandler || [ErrorHandler::class, 'handleError'] === $oldErrorHandler) {
                restore_error_handler();
                self::register($mode);
            }
        } else {
            $handler->mode = $mode;
            self::$isRegistered = true;
            register_shutdown_function([$handler, 'shutdown']);
        }
    }
public static function register ( $ mode = 0 ) { if ( self :: $ isRegistered ) { return ; } $ handler = new self ( ) ; $ oldErrorHandler = set_error_handler ( [ $ handler , 'handleError' ] ) ; if ( null !== $ oldErrorHandler ) { restore_error_handler ( ) ; if ( $ oldErrorHandler instanceof ErrorHandler || [ ErrorHandler :: class , 'handleError' ] === $ oldErrorHandler ) { restore_error_handler ( ) ; self :: register ( $ mode ) ; } } else { $ handler -> mode = $ mode ; self :: $ isRegistered = true ; register_shutdown_function ( [ $ handler , 'shutdown' ] ) ; } }
Registers and configures the deprecation handler.
Registers and configures the deprecation handler .