PHP 8.2.30
Preview: DeprecationErrorHandler.php Size: 1.05 KB
/opt/cloudlinux/alt-php55/root/usr/share/pear/Symfony/Component/Form/Test/DeprecationErrorHandler.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Form\Test;

use Symfony\Component\Form\FormEvent;

class DeprecationErrorHandler
{
    public static function handle($errorNumber, $message, $file, $line, $context)
    {
        if ($errorNumber & E_USER_DEPRECATED) {
            return true;
        }

        return \PHPUnit_Util_ErrorHandler::handleError($errorNumber, $message, $file, $line);
    }

    public static function handleBC($errorNumber, $message, $file, $line, $context)
    {
        if ($errorNumber & E_USER_DEPRECATED) {
            return true;
        }

        return false;
    }

    public static function preBind($listener, FormEvent $event)
    {
        set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
        $listener->preBind($event);
        restore_error_handler();
    }
}

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
1.05 KB lrw-r--r-- 2019-12-18 11:24:06
Edit Download
377 B lrw-r--r-- 2019-12-18 11:24:06
Edit Download
811 B lrw-r--r-- 2019-12-18 11:24:06
Edit Download
363 B lrw-r--r-- 2019-12-18 11:24:06
Edit Download
1.56 KB lrw-r--r-- 2019-12-18 11:24:06
Edit Download
1.01 KB lrw-r--r-- 2019-12-18 11:24:06
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).