From 10e33acf4241d13de88da7f2f5e29dde2e460f76 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Jan 2018 18:32:27 +0100 Subject: [PATCH] [appveyor] set memory_limit=-1 --- appveyor.yml | 1 + .../Component/Security/Http/Firewall/ContextListener.php | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6d86996726..9ff140b0a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,6 +31,7 @@ install: - 7z x php_memcache-3.0.8-5.3-nts-vc9-x86.zip -y >nul - cd .. - copy /Y php.ini-development php.ini-min + - echo memory_limit=-1 >> php.ini-min - echo serialize_precision=14 >> php.ini-min - echo max_execution_time=1200 >> php.ini-min - echo date.timezone="America/Los_Angeles" >> php.ini-min diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index 7a3483b2ec..2c315b9944 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -39,8 +39,6 @@ class ContextListener implements ListenerInterface private $dispatcher; private $registered; - private static $unserializeExceptionCode = 0x37313bc; - public function __construct(TokenStorageInterface $tokenStorage, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) { if (empty($contextKey)) { @@ -180,7 +178,7 @@ class ContextListener implements ListenerInterface $prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$prevErrorHandler) { if (__FILE__ === $file) { - throw new \UnexpectedValueException($msg, self::$unserializeExceptionCode); + throw new \UnexpectedValueException($msg, 0x37313bc); } return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false; @@ -194,7 +192,7 @@ class ContextListener implements ListenerInterface restore_error_handler(); ini_set('unserialize_callback_func', $prevUnserializeHandler); if ($e) { - if (!$e instanceof \UnexpectedValueException || self::$unserializeExceptionCode !== $e->getCode()) { + if (!$e instanceof \UnexpectedValueException || 0x37313bc !== $e->getCode()) { throw $e; } if ($this->logger) { @@ -210,6 +208,6 @@ class ContextListener implements ListenerInterface */ public static function handleUnserializeCallback($class) { - throw new \UnexpectedValueException('Class not found: '.$class, self::$unserializeExceptionCode); + throw new \UnexpectedValueException('Class not found: '.$class, 0x37313bc); } }