Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0147da

Browse files
committed
Remove PHP < 7.1 leftovers
1 parent 6da6853 commit f0147da

File tree

5 files changed

+2
-28
lines changed

5 files changed

+2
-28
lines changed

src/Symfony/Component/DependencyInjection/Tests/Compiler/FactoryReturnTypePassTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function testCircularReference()
9898
}
9999

100100
/**
101-
* @requires function ReflectionMethod::getReturnType
102101
* @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.
103102
*/
104103
public function testCompile()

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -780,11 +780,7 @@ public function serialize()
780780

781781
public function unserialize($data)
782782
{
783-
if (PHP_VERSION_ID >= 70000) {
784-
list($environment, $debug) = unserialize($data, array('allowed_classes' => false));
785-
} else {
786-
list($environment, $debug) = unserialize($data);
787-
}
783+
list($environment, $debug) = unserialize($data, array('allowed_classes' => false));
788784

789785
$this->__construct($environment, $debug);
790786
}

src/Symfony/Component/PropertyAccess/PropertyAccessor.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ class PropertyAccessor implements PropertyAccessorInterface
141141
* @var array
142142
*/
143143
private $writePropertyCache = array();
144-
private static $previousErrorHandler = false;
145-
private static $errorHandler = array(__CLASS__, 'handleError');
146144
private static $resultProto = array(self::VALUE => null);
147145

148146
/**
@@ -240,26 +238,9 @@ public function setValue(&$objectOrArray, $propertyPath, $value)
240238
}
241239
} catch (\TypeError $e) {
242240
self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0);
243-
} finally {
244-
if (PHP_VERSION_ID < 70000 && false !== self::$previousErrorHandler) {
245-
restore_error_handler();
246-
self::$previousErrorHandler = false;
247-
}
248241
}
249242
}
250243

251-
/**
252-
* @internal
253-
*/
254-
public static function handleError($type, $message, $file, $line, $context)
255-
{
256-
if (E_RECOVERABLE_ERROR === $type) {
257-
self::throwInvalidArgumentException($message, debug_backtrace(false), 1);
258-
}
259-
260-
return null !== self::$previousErrorHandler && false !== call_user_func(self::$previousErrorHandler, $type, $message, $file, $line, $context);
261-
}
262-
263244
private static function throwInvalidArgumentException($message, $trace, $i)
264245
{
265246
if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file']) {

src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public function decodeProvider()
5656
}
5757

5858
/**
59-
* @requires function json_last_error_msg
6059
* @dataProvider decodeProviderException
6160
* @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
6261
*/

src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class JsonEncodeTest extends TestCase
1919
{
20-
private $encoder;
20+
private $encode;
2121

2222
protected function setUp()
2323
{
@@ -50,7 +50,6 @@ public function encodeProvider()
5050
}
5151

5252
/**
53-
* @requires function json_last_error_msg
5453
* @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
5554
*/
5655
public function testEncodeWithError()

0 commit comments

Comments
 (0)