diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php index 5d5f5339be..f37248a717 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php @@ -98,7 +98,6 @@ class FactoryReturnTypePassTest extends TestCase } /** - * @requires function ReflectionMethod::getReturnType * @expectedDeprecation Relying on its factory's return-type to define the class of service "factory" is deprecated since Symfony 3.3 and won't work in 4.0. Set the "class" attribute to "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy" on the service definition instead. */ public function testCompile() diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 2c6e3250f7..9985fc25b4 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -780,11 +780,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface public function unserialize($data) { - if (PHP_VERSION_ID >= 70000) { - list($environment, $debug) = unserialize($data, array('allowed_classes' => false)); - } else { - list($environment, $debug) = unserialize($data); - } + list($environment, $debug) = unserialize($data, array('allowed_classes' => false)); $this->__construct($environment, $debug); } diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 975824b505..e4d0bb669c 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -141,8 +141,6 @@ class PropertyAccessor implements PropertyAccessorInterface * @var array */ private $writePropertyCache = array(); - private static $previousErrorHandler = false; - private static $errorHandler = array(__CLASS__, 'handleError'); private static $resultProto = array(self::VALUE => null); /** @@ -240,26 +238,9 @@ class PropertyAccessor implements PropertyAccessorInterface } } catch (\TypeError $e) { self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0); - } finally { - if (PHP_VERSION_ID < 70000 && false !== self::$previousErrorHandler) { - restore_error_handler(); - self::$previousErrorHandler = false; - } } } - /** - * @internal - */ - public static function handleError($type, $message, $file, $line, $context) - { - if (E_RECOVERABLE_ERROR === $type) { - self::throwInvalidArgumentException($message, debug_backtrace(false), 1); - } - - return null !== self::$previousErrorHandler && false !== call_user_func(self::$previousErrorHandler, $type, $message, $file, $line, $context); - } - private static function throwInvalidArgumentException($message, $trace, $i) { if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file']) { diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php index 774064d43a..f4208f1256 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php @@ -56,7 +56,6 @@ class JsonDecodeTest extends TestCase } /** - * @requires function json_last_error_msg * @dataProvider decodeProviderException * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException */ diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php index ed33233fb4..f4cbf76afc 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Serializer\Encoder\JsonEncoder; class JsonEncodeTest extends TestCase { - private $encoder; + private $encode; protected function setUp() { @@ -50,7 +50,6 @@ class JsonEncodeTest extends TestCase } /** - * @requires function json_last_error_msg * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException */ public function testEncodeWithError()