[Debug] fix loading order for legacy classes
This commit is contained in:
parent
760ad3306f
commit
cb347896b2
@ -9,19 +9,6 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Debug\Exception;
|
|
||||||
|
|
||||||
use Symfony\Component\HttpKernel\Exception\FatalErrorException as LegacyFatalErrorException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fatal Error Exception.
|
|
||||||
*
|
|
||||||
* @author Konstanton Myakshin <koc-dp@yandex.ru>
|
|
||||||
*/
|
|
||||||
class FatalErrorException extends LegacyFatalErrorException
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Symfony\Component\HttpKernel\Exception;
|
namespace Symfony\Component\HttpKernel\Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,3 +21,16 @@ namespace Symfony\Component\HttpKernel\Exception;
|
|||||||
class FatalErrorException extends \ErrorException
|
class FatalErrorException extends \ErrorException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Symfony\Component\Debug\Exception;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Exception\FatalErrorException as LegacyFatalErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fatal Error Exception.
|
||||||
|
*
|
||||||
|
* @author Konstanton Myakshin <koc-dp@yandex.ru>
|
||||||
|
*/
|
||||||
|
class FatalErrorException extends LegacyFatalErrorException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@ -9,6 +9,46 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\HttpKernel\Exception;
|
||||||
|
|
||||||
|
use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FlattenException wraps a PHP Exception to be able to serialize it.
|
||||||
|
*
|
||||||
|
* Basically, this class removes all objects from the trace.
|
||||||
|
*
|
||||||
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
|
||||||
|
*/
|
||||||
|
class FlattenException
|
||||||
|
{
|
||||||
|
private $handler;
|
||||||
|
|
||||||
|
public static function __callStatic($method, $args)
|
||||||
|
{
|
||||||
|
if (!method_exists('Symfony\Component\Debug\Exception\FlattenException', $method)) {
|
||||||
|
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_called_class(), $method));
|
||||||
|
}
|
||||||
|
|
||||||
|
return call_user_func_array(array('Symfony\Component\Debug\Exception\FlattenException', $method), $args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __call($method, $args)
|
||||||
|
{
|
||||||
|
if (!isset($this->handler)) {
|
||||||
|
$this->handler = new DebugFlattenException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!method_exists($this->handler, $method)) {
|
||||||
|
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_class($this), $method));
|
||||||
|
}
|
||||||
|
|
||||||
|
return call_user_func_array(array($this->handler, $method), $args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace Symfony\Component\Debug\Exception;
|
namespace Symfony\Component\Debug\Exception;
|
||||||
|
|
||||||
use Symfony\Component\HttpKernel\Exception\FlattenException as LegacyFlattenException;
|
use Symfony\Component\HttpKernel\Exception\FlattenException as LegacyFlattenException;
|
||||||
@ -279,35 +319,3 @@ class FlattenException extends LegacyFlattenException
|
|||||||
return $array['__PHP_Incomplete_Class_Name'];
|
return $array['__PHP_Incomplete_Class_Name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Symfony\Component\HttpKernel\Exception;
|
|
||||||
|
|
||||||
use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* FlattenException wraps a PHP Exception to be able to serialize it.
|
|
||||||
*
|
|
||||||
* Basically, this class removes all objects from the trace.
|
|
||||||
*
|
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
|
||||||
*
|
|
||||||
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
|
|
||||||
*/
|
|
||||||
class FlattenException
|
|
||||||
{
|
|
||||||
private $handler;
|
|
||||||
|
|
||||||
public static function __callStatic($method, $args)
|
|
||||||
{
|
|
||||||
return forward_static_call_array(array('Symfony\Component\Debug\Exception\FlattenException', $method), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __call($method, $args)
|
|
||||||
{
|
|
||||||
if (!isset($this->handler)) {
|
|
||||||
$this->handler = new DebugFlattenException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return call_user_func_array(array($this->handler, $method), $args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user