From 72b6c9e0b9309aa4ae55541abe7e04c6c58adc83 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Thu, 1 Sep 2016 12:16:03 +0800 Subject: [PATCH 01/17] Update misleading comment about RFC4627 RFC 4627 does not dictate escaping of HTML special characters --- src/Symfony/Component/HttpFoundation/JsonResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 8df683ddfb7f8..4a533f48ff7f8 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -27,7 +27,7 @@ class JsonResponse extends Response protected $data; protected $callback; - // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. + // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT protected $encodingOptions = 15; From 2511f2a19192c083388113ad75598921e6664678 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Sep 2016 20:54:47 -0700 Subject: [PATCH 02/17] bumped Symfony version to 2.7.18 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 9211aa527aaf0..4215ea070d20b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.17'; - const VERSION_ID = 20717; + const VERSION = '2.7.18-DEV'; + const VERSION_ID = 20718; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 17; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 18; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 68698f2bd4c2ed64f7702b7a428ff3674abc24c2 Mon Sep 17 00:00:00 2001 From: James Halsall Date: Fri, 2 Sep 2016 17:52:32 +0100 Subject: [PATCH 03/17] [BrowserKit] Fix cookie expiration on 32 bit systems On 32-bit systems the cookie expiration value was not being calculated correctly as it was being fetched as an integer. When the timestamp exceeded the PHP_INT_MAX size it would return an invalid value, breaking the cookie construction. The BrowserKit cookie has now been updated to get the timestamp as a string which works around this platform limitation. --- src/Symfony/Component/BrowserKit/Cookie.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 604d12d84d55a..eeef805d72099 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -76,7 +76,7 @@ public function __construct($name, $value, $expires = null, $path = null, $domai throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.', $expires)); } - $this->expires = $timestampAsDateTime->getTimestamp(); + $this->expires = $timestampAsDateTime->format('U'); } } @@ -205,13 +205,13 @@ private static function parseDate($dateValue) foreach (self::$dateFormats as $dateFormat) { if (false !== $date = \DateTime::createFromFormat($dateFormat, $dateValue, new \DateTimeZone('GMT'))) { - return $date->getTimestamp(); + return $date->format('U'); } } // attempt a fallback for unusual formatting if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) { - return $date->getTimestamp(); + return $date->format('U'); } throw new \InvalidArgumentException(sprintf('Could not parse date "%s".', $dateValue)); @@ -304,6 +304,6 @@ public function isHttpOnly() */ public function isExpired() { - return null !== $this->expires && 0 !== $this->expires && $this->expires < time(); + return null !== $this->expires && 0 != $this->expires && $this->expires < time(); } } From ac742dfc48fd45fb3307abb8f3b3d4f97941591c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Sep 2016 19:06:49 +0200 Subject: [PATCH 04/17] Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)" This reverts commit c89f80a9cd3f291159ba5e466c7c968cf15d476a, reversing changes made to 386e5e78b4ad8356fe01ac5406872a56b5177134. --- src/Symfony/Component/DependencyInjection/Container.php | 5 +++-- .../Component/DependencyInjection/ContainerBuilder.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 3cfdd616c5a17..f6c953f550993 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -223,6 +223,7 @@ public function has($id) if ('service_container' === $id || isset($this->aliases[$id]) || isset($this->services[$id]) + || array_key_exists($id, $this->services) ) { return true; } @@ -265,7 +266,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE $id = $this->aliases[$id]; } // Re-use shared service instance if it exists. - if (isset($this->services[$id])) { + if (isset($this->services[$id]) || array_key_exists($id, $this->services)) { return $this->services[$id]; } @@ -347,7 +348,7 @@ public function initialized($id) $id = $this->aliases[$id]; } - return isset($this->services[$id]); + return isset($this->services[$id]) || array_key_exists($id, $this->services); } /** diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 70d1efda4cad7..0813110deda8f 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -436,7 +436,7 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV return $service; } - if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) { + if (!array_key_exists($id, $this->definitions) && isset($this->aliasDefinitions[$id])) { return $this->get($this->aliasDefinitions[$id]); } @@ -784,7 +784,7 @@ public function setDefinition($id, Definition $definition) */ public function hasDefinition($id) { - return isset($this->definitions[strtolower($id)]); + return array_key_exists(strtolower($id), $this->definitions); } /** @@ -800,7 +800,7 @@ public function getDefinition($id) { $id = strtolower($id); - if (!isset($this->definitions[$id])) { + if (!array_key_exists($id, $this->definitions)) { throw new ServiceNotFoundException($id); } From 8cb28bf7517d1c2e27da4d3eeb557fbffedc1ec8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Sep 2016 09:18:51 +0200 Subject: [PATCH 05/17] [DI] Add anti-regression test --- .../Tests/ContainerTest.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index 013ee82316084..e451806bb7807 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -256,6 +256,18 @@ public function testGetReturnsNullOnInactiveScope() $this->assertNull($sc->get('inactive', ContainerInterface::NULL_ON_INVALID_REFERENCE)); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExcepionMessage You have requested a synthetic service ("request"). The DIC does not know how to construct this service. + */ + public function testGetSyntheticServiceAlwaysThrows() + { + require_once __DIR__.'/Fixtures/php/services9.php'; + + $container = new \ProjectServiceContainer(); + $container->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE); + } + public function testHas() { $sc = new ProjectServiceContainer(); @@ -287,14 +299,17 @@ public function testEnterLeaveCurrentScope() $container->addScope(new Scope('foo')); $container->enterScope('foo'); + $container->set('foo', new \stdClass(), 'foo'); $scoped1 = $container->get('scoped'); $scopedFoo1 = $container->get('scoped_foo'); $container->enterScope('foo'); + $container->set('foo', new \stdClass(), 'foo'); $scoped2 = $container->get('scoped'); $scoped3 = $container->get('SCOPED'); $scopedFoo2 = $container->get('scoped_foo'); + $container->set('foo', null, 'foo'); $container->leaveScope('foo'); $scoped4 = $container->get('scoped'); $scopedFoo3 = $container->get('scoped_foo'); @@ -641,6 +656,12 @@ protected function getScopedSynchronizedFooService() return $this->services['scoped_bar'] = $this->scopedServices['foo']['scoped_bar'] = new \stdClass(); } + protected function synchronizeFooService() + { + // Typically get the service to pass it to a setter + $this->get('foo'); + } + protected function synchronizeScopedSynchronizedFooService() { $this->synchronized = true; From 647b3d2f54f6ae2ac7f61d3597e9661755937413 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Sep 2016 14:06:16 +0200 Subject: [PATCH 06/17] [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1) --- .../ClassLoader/ClassCollectionLoader.php | 52 ++++++++++++++----- .../Tests/ClassCollectionLoaderTest.php | 14 +++-- .../Tests/ClassMapGeneratorTest.php | 1 + .../Fixtures/Namespaced/WithStrictTypes.php | 13 +++++ 4 files changed, 61 insertions(+), 19 deletions(-) create mode 100644 src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index b695b9272f28c..18e22a5bca603 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -58,7 +58,12 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = $classes = array_unique($classes); - $cache = $cacheDir.'/'.$name.$extension; + // cache the core classes + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { + throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir)); + } + $cacheDir = rtrim(realpath($cacheDir), '/'.DIRECTORY_SEPARATOR); + $cache = $cacheDir.DIRECTORY_SEPARATOR.$name.$extension; // auto-reload $reload = false; @@ -99,6 +104,10 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = } } + $c = '(?:\s*+(?:(?:#|//)[^\n]*+\n|/\*(?:(?getFileName(); + $files[] = $file = $class->getFileName(); + $c = file_get_contents($file); - $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName())); + if (preg_match($strictTypesRegex, $c)) { + $file = explode(DIRECTORY_SEPARATOR, $file); - // fakes namespace declaration for global code - if (!$class->inNamespace()) { - $c = "\nnamespace\n{\n".$c."\n}\n"; - } + for ($i = 0; isset($file[$i], $cacheDir[$i]); ++$i) { + if ($file[$i] !== $cacheDir[$i]) { + break; + } + } + if (1 >= $i) { + $file = var_export(implode(DIRECTORY_SEPARATOR, $file), true); + } else { + $file = array_slice($file, $i); + $file = str_repeat('..'.DIRECTORY_SEPARATOR, count($cacheDir) - $i).implode(DIRECTORY_SEPARATOR, $file); + $file = '__DIR__.'.var_export(DIRECTORY_SEPARATOR.$file, true); + } - $c = self::fixNamespaceDeclarations('\s*$/'), '', $c); - $content .= $c; - } + // fakes namespace declaration for global code + if (!$class->inNamespace()) { + $c = "\nnamespace\n{\n".$c."\n}\n"; + } - // cache the core classes - if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { - throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir)); + $c = self::fixNamespaceDeclarations(' realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', + 'Namespaced\WithStrictTypes' => realpath(__DIR__).'/Fixtures/Namespaced/WithStrictTypes.php', ), ), array(__DIR__.'/Fixtures/beta/NamespaceCollision', array( diff --git a/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php new file mode 100644 index 0000000000000..3c7870592b3cb --- /dev/null +++ b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php @@ -0,0 +1,13 @@ + Date: Fri, 2 Sep 2016 14:13:13 -0400 Subject: [PATCH 07/17] Code enhancement and cleanup --- .../AbstractDoctrineExtension.php | 2 +- src/Symfony/Bridge/Twig/Command/DebugCommand.php | 1 - .../FrameworkBundle/Command/YamlLintCommand.php | 1 - .../TwigBundle/Extension/ActionsExtension.php | 2 ++ .../EventListener/WebDebugToolbarListener.php | 2 -- .../Component/BrowserKit/Tests/CookieTest.php | 2 +- src/Symfony/Component/Console/Command/Command.php | 2 ++ .../Console/Descriptor/MarkdownDescriptor.php | 2 +- .../Component/Console/Helper/ProgressHelper.php | 2 -- .../Component/Console/Helper/QuestionHelper.php | 4 +++- .../Console/Tests/Helper/HelperSetTest.php | 7 ------- .../Component/CssSelector/XPath/Translator.php | 3 --- src/Symfony/Component/Debug/ErrorHandler.php | 4 +++- .../Compiler/ServiceReferenceGraphEdge.php | 2 +- .../Tests/Dumper/PhpDumperTest.php | 2 +- .../Component/ExpressionLanguage/TokenStream.php | 4 ++++ src/Symfony/Component/Filesystem/Filesystem.php | 2 ++ .../Component/Form/ChoiceList/ArrayChoiceList.php | 13 +++++++------ .../Form/ChoiceList/ArrayKeyChoiceList.php | 13 +++++++------ .../DateTimeToLocalizedStringTransformer.php | 2 -- .../Extension/DataCollector/FormDataExtractor.php | 6 ------ .../Tests/Extension/Core/Type/ChoiceTypeTest.php | 2 +- .../Component/HttpFoundation/JsonResponse.php | 13 ++++++++++++- .../Session/Flash/FlashBagInterface.php | 2 ++ .../Storage/Handler/MongoDbSessionHandler.php | 2 ++ .../LazyLoadingFragmentHandler.php | 1 + .../Component/HttpKernel/Profiler/Profiler.php | 4 ++-- .../EventListener/ValidateRequestListenerTest.php | 2 +- .../Component/HttpKernel/Tests/HttpKernelTest.php | 2 +- src/Symfony/Component/HttpKernel/UriSigner.php | 2 +- .../Intl/DateFormatter/IntlDateFormatter.php | 2 +- .../Intl/ResourceBundle/LanguageBundle.php | 1 + src/Symfony/Component/Process/Tests/ProcessTest.php | 2 +- .../Http/Tests/Firewall/RememberMeListenerTest.php | 2 +- src/Symfony/Component/Templating/PhpEngine.php | 1 + .../Translation/DataCollectorTranslator.php | 2 +- .../Component/Translation/Dumper/MoFileDumper.php | 2 +- .../Component/Translation/Loader/MoFileLoader.php | 2 +- .../Tests/Validator/Abstract2Dot5ApiTest.php | 1 + .../Component/VarDumper/Cloner/VarCloner.php | 1 - .../Component/VarDumper/Dumper/AbstractDumper.php | 5 +++-- 41 files changed, 70 insertions(+), 59 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index 534d762e73f11..e1cbbbfb1a36e 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -336,7 +336,7 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD $memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%'; $memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%'; $memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%'; - $memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%'; + $memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%'; $cacheDef = new Definition($memcacheClass); $memcacheInstance = new Definition($memcacheInstanceClass); $memcacheInstance->addMethodCall('connect', array( diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php index 4bf52c5dd3e36..898e0e2233bb6 100644 --- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php +++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -140,7 +140,6 @@ private function getMetadata($type, $entity) return; } if ($type === 'functions' || $type === 'filters') { - $args = array(); $cb = $entity->getCallable(); if (is_null($cb)) { return; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php index c4c4bb9cf1d27..4c12e7d2fca05 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -85,7 +85,6 @@ protected function execute(InputInterface $input, OutputInterface $output) throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); } - $files = array(); if (is_file($filename)) { $files = array($filename); } elseif (is_dir($filename)) { diff --git a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php index 07f956b07ef52..8b4759ea270a8 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -52,6 +52,8 @@ public function __construct($handler) * @param string $uri A URI * @param array $options An array of options * + * @return string|null The Response content or null when the Response is streamed + * * @see FragmentHandler::render() */ public function renderUri($uri, array $options = array()) diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index ab67078dd6ecd..2dc0b618d5302 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -108,8 +108,6 @@ public function onKernelResponse(FilterResponseEvent $event) /** * Injects the web debug toolbar into the given Response. - * - * @param Response $response A Response instance */ protected function injectToolbar(Response $response, Request $request) { diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php index 61b364e6d1eac..5a724333d350f 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -178,7 +178,7 @@ public function testIsExpired() } /** - * @expectedException UnexpectedValueException + * @expectedException \UnexpectedValueException * @expectedExceptionMessage The cookie expiration time "string" is not valid. */ public function testConstructException() diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index e38002b6d8b39..dcda54b637953 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -569,6 +569,8 @@ public function getSynopsis($short = false) * Add a command usage example. * * @param string $usage The usage, it'll be prefixed with the command name + * + * @return Command The current instance */ public function addUsage($usage) { diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index d3d76a4201025..2eb9944d6213c 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -98,7 +98,7 @@ protected function describeCommand(Command $command, array $options = array()) .'* Description: '.($command->getDescription() ?: '')."\n" .'* Usage:'."\n\n" .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { - return $carry .= ' * `'.$usage.'`'."\n"; + return $carry.' * `'.$usage.'`'."\n"; }) ); diff --git a/src/Symfony/Component/Console/Helper/ProgressHelper.php b/src/Symfony/Component/Console/Helper/ProgressHelper.php index 0e18375895fbf..625fb8120824a 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -371,8 +371,6 @@ private function generate($finish = false) } if (isset($this->formatVars['bar'])) { - $completeBars = 0; - if ($this->max > 0) { $completeBars = floor($percent * $this->barWidth); } else { diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index c158f73593817..6d6850d1ae826 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -200,6 +200,7 @@ protected function writeError(OutputInterface $output, \Exception $error) * * @param OutputInterface $output * @param Question $question + * @param resource $inputStream * * @return string */ @@ -316,7 +317,8 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu /** * Gets a hidden response from user. * - * @param OutputInterface $output An Output instance + * @param OutputInterface $output An Output instance + * @param resource $inputStream The handler resource * * @return string The answer * diff --git a/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php b/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php index d615899ca9899..24deb341f681c 100644 --- a/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php @@ -107,13 +107,6 @@ public function testIteration() } } - /** - * Create a generic mock for the helper interface. Optionally check for a call to setHelperSet with a specific - * helperset instance. - * - * @param string $name - * @param HelperSet $helperset allows a mock to verify a particular helperset set is being added to the Helper - */ private function getGenericMockHelper($name, HelperSet $helperset = null) { $mock_helper = $this->getMock('\Symfony\Component\Console\Helper\HelperInterface'); diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index aac2691f1adfb..3582048260496 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -68,9 +68,6 @@ class Translator implements TranslatorInterface */ private $attributeMatchingTranslators = array(); - /** - * Constructor. - */ public function __construct(ParserInterface $parser = null) { $this->mainParser = $parser ?: new Parser(); diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index a8c072f76bf85..bf12d155e56c1 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -349,10 +349,12 @@ private function reRegister($prev) /** * Handles errors by filtering then logging them according to the configured bit fields. * - * @param int $type One of the E_* constants + * @param int $type One of the E_* constants + * @param string $message * @param string $file * @param int $line * @param array $context + * @param array $backtrace * * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself * diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php index 056be7fa3f5d4..e3c793c4f4eaf 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php @@ -39,7 +39,7 @@ public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceRefere /** * Returns the value of the edge. * - * @return ServiceReferenceGraphNode + * @return string */ public function getValue() { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 118a55244597a..3d9570d4dbcef 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -169,7 +169,7 @@ public function testAddServiceInvalidServiceId() /** * @dataProvider provideInvalidFactories - * @expectedException Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException * @expectedExceptionMessage Cannot dump definition */ public function testInvalidFactories($factory) diff --git a/src/Symfony/Component/ExpressionLanguage/TokenStream.php b/src/Symfony/Component/ExpressionLanguage/TokenStream.php index ac9599769fa9c..6c4af745b2cfe 100644 --- a/src/Symfony/Component/ExpressionLanguage/TokenStream.php +++ b/src/Symfony/Component/ExpressionLanguage/TokenStream.php @@ -60,6 +60,10 @@ public function next() /** * Tests a token. + * + * @param array|int $type The type to test + * @param string|null $value The token value + * @param string|null $message The syntax error message */ public function expect($type, $value = null, $message = null) { diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index df12e9e49992f..f114a2de58bcd 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -285,6 +285,8 @@ public function rename($origin, $target, $overwrite = false) * * @param string $filename Path to the file * + * @return bool + * * @throws IOException When windows path is longer than 258 characters */ private function isReadable($filename) diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php index 82ebe7421d9e7..7f2824fab216a 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php @@ -183,12 +183,13 @@ public function getValuesForChoices(array $choices) /** * Flattens an array into the given output variables. * - * @param array $choices The array to flatten - * @param callable $value The callable for generating choice values - * @param array $choicesByValues The flattened choices indexed by the - * corresponding values - * @param array $keysByValues The original keys indexed by the - * corresponding values + * @param array $choices The array to flatten + * @param callable $value The callable for generating choice values + * @param array $choicesByValues The flattened choices indexed by the + * corresponding values + * @param array $keysByValues The original keys indexed by the + * corresponding values + * @param array $structuredValues The values indexed by the original keys * * @internal Must not be used by user-land code */ diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php index 7c3c107d0f720..2490fe8fb33cb 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php @@ -153,12 +153,13 @@ public function getValuesForChoices(array $choices) /** * Flattens and flips an array into the given output variable. * - * @param array $choices The array to flatten - * @param callable $value The callable for generating choice values - * @param array $choicesByValues The flattened choices indexed by the - * corresponding values - * @param array $keysByValues The original keys indexed by the - * corresponding values + * @param array $choices The array to flatten + * @param callable $value The callable for generating choice values + * @param array $choicesByValues The flattened choices indexed by the + * corresponding values + * @param array $keysByValues The original keys indexed by the + * corresponding values + * @param array $structuredValues The values indexed by the original keys * * @internal Must not be used by user-land code */ diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 352b7c85ff506..51f692755eb6d 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -178,8 +178,6 @@ protected function getIntlDateFormatter($ignoreTimezone = false) /** * Checks if the pattern contains only a date. * - * @param string $pattern The input pattern - * * @return bool */ protected function isPatternDateOnly() diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index 71f07b5fe069f..20b270d845a4d 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -23,14 +23,8 @@ */ class FormDataExtractor implements FormDataExtractorInterface { - /** - * @var ValueExporter - */ private $valueExporter; - /** - * Constructs a new data extractor. - */ public function __construct(ValueExporter $valueExporter = null) { $this->valueExporter = $valueExporter ?: new ValueExporter(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php index b7bea7e5c8062..b675d5d6eee08 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -2040,7 +2040,7 @@ public function getOptionsWithPlaceholderAndEmptyValue() 'An empty string empty_value is used if placeholder is also an empty string when required [maintains BC]' => array(false, false, true, '', '', ''), 'A non-empty string empty_value is used if placeholder is an empty string when required [maintains BC]' => array(false, false, true, '', 'bar', 'bar'), 'A non-empty string placeholder takes precedence over an empty_value set to false when required' => array(false, false, true, 'foo', false, 'foo'), - 'A non-empty string placeholder takes precedence over a not set empty_value' => array(false, false, true, 'foo', null, 'foo'), + 'A non-empty string placeholder takes precedence over a not set empty_value when required' => array(false, false, true, 'foo', null, 'foo'), 'A non-empty string placeholder takes precedence over an empty string empty_value when required' => array(false, false, true, 'foo', '', 'foo'), 'A non-empty string placeholder takes precedence over a non-empty string empty_value when required' => array(false, false, true, 'foo', 'bar', 'foo'), // single expanded, not required diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 8df683ddfb7f8..25584ed21c16c 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -50,7 +50,18 @@ public function __construct($data = null, $status = 200, $headers = array()) } /** - * {@inheritdoc} + * Factory method for chainability. + * + * Example: + * + * return JsonResponse::create($data, 200) + * ->setSharedMaxAge(300); + * + * @param mixed $data The json response data + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return JsonResponse */ public static function create($data = null, $status = 200, $headers = array()) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 80e97f17cdff3..25f3d57b5417b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -72,6 +72,8 @@ public function all(); /** * Sets all flash messages. + * + * @param array $messages */ public function setAll(array $messages); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 7efc1348c8027..8408f000cdbf8 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -214,6 +214,8 @@ protected function getMongo() * Return an instance of a MongoDate or \MongoDB\BSON\UTCDateTime * * @param int $seconds An integer representing UTC seconds since Jan 1 1970. Defaults to now. + * + * @return \MongoDate|\MongoDB\BSON\UTCDateTime */ private function createDateTime($seconds = null) { diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php index 4efe7cb620736..c611e9eaf0bfa 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -35,6 +35,7 @@ public function __construct(ContainerInterface $container, $debug = false, Reque /** * Adds a service as a fragment renderer. * + * @param string $name The service name * @param string $renderer The render service id */ public function addRendererService($name, $renderer) diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index 35d3a8f1b4713..9bfc54e1a19cf 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -78,7 +78,7 @@ public function enable() * * @param Response $response A Response instance * - * @return Profile A Profile instance + * @return Profile|false A Profile instance */ public function loadProfileFromResponse(Response $response) { @@ -149,7 +149,7 @@ public function export(Profile $profile) * * @param string $data A data string as exported by the export() method * - * @return Profile A Profile instance + * @return Profile|false A Profile instance */ public function import($data) { diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php index 842a3869cba79..b9d8f06f00848 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php @@ -21,7 +21,7 @@ class ValidateRequestListenerTest extends \PHPUnit_Framework_TestCase { /** - * @expectedException Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException + * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException */ public function testListenerThrowsWhenMasterRequestHasInconsistentClientIps() { diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index 372c2a3c1b1ae..0fd0fdec7b98f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -272,7 +272,7 @@ public function testVerifyRequestStackPushPopDuringHandle() } /** - * @expectedException Symfony\Component\HttpKernel\Exception\BadRequestHttpException + * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException */ public function testInconsistentClientIpsOnMasterRequests() { diff --git a/src/Symfony/Component/HttpKernel/UriSigner.php b/src/Symfony/Component/HttpKernel/UriSigner.php index c2d0d79664c42..fa84899064e88 100644 --- a/src/Symfony/Component/HttpKernel/UriSigner.php +++ b/src/Symfony/Component/HttpKernel/UriSigner.php @@ -98,7 +98,7 @@ private function buildUrl(array $url, array $params = array()) $host = isset($url['host']) ? $url['host'] : ''; $port = isset($url['port']) ? ':'.$url['port'] : ''; $user = isset($url['user']) ? $url['user'] : ''; - $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; + $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; $pass = ($user || $pass) ? "$pass@" : ''; $path = isset($url['path']) ? $url['path'] : ''; $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index c3b85bbb6f0ad..e6b01d3290e28 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -564,7 +564,7 @@ public function setTimeZoneId($timeZoneId) try { $this->dateTimeZone = new \DateTimeZone($timeZoneId); if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) { - $timeZoneId = $timeZone = $this->getTimeZoneId(); + $timeZone = $this->getTimeZoneId(); } } catch (\Exception $e) { if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { diff --git a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php index cfe82ca3c3135..d12b892a10dcb 100644 --- a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php +++ b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php @@ -42,6 +42,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter * @param string $path * @param BundleEntryReaderInterface $reader * @param LocaleDataProvider $localeProvider + * @param ScriptDataProvider $scriptProvider */ public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider) { diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 0fcedccf8bf07..f8608337a4a04 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -943,7 +943,7 @@ public function provideMethodsThatNeedARunningProcess() /** * @dataProvider provideMethodsThatNeedATerminatedProcess - * @expectedException Symfony\Component\Process\Exception\LogicException + * @expectedException \Symfony\Component\Process\Exception\LogicException * @expectedExceptionMessage Process must be terminated before calling */ public function testMethodsThatNeedATerminatedProcess($method) diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php index 7309042d4764b..cd2f1b8735b86 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php @@ -101,7 +101,7 @@ public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenti } /** - * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException * @expectedExceptionMessage Authentication failed. */ public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExceptionThrownAuthenticationManagerImplementation() diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php index 253796c0511b3..75846455b9ee4 100644 --- a/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/Symfony/Component/Templating/PhpEngine.php @@ -142,6 +142,7 @@ protected function evaluate(Storage $template, array $parameters = array()) throw new \InvalidArgumentException('Invalid parameter (view)'); } + // the view variable is exposed to the require file below $view = $this; if ($this->evalTemplate instanceof FileStorage) { extract($this->evalParameters, EXTR_SKIP); diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/Symfony/Component/Translation/DataCollectorTranslator.php index 1aedab7449aab..f88a467a1d12c 100644 --- a/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -108,7 +108,7 @@ public function getCollectedMessages() * @param string|null $locale * @param string|null $domain * @param string $id - * @param string $trans + * @param string $translation */ private function collectMessage($locale, $domain, $id, $translation) { diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index f8dc6ac395fc4..b01699071401d 100644 --- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -26,7 +26,7 @@ class MoFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - $output = $sources = $targets = $sourceOffsets = $targetOffsets = ''; + $sources = $targets = $sourceOffsets = $targetOffsets = ''; $offsets = array(); $size = 0; diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index f6a8fe923a9bf..191b86337aa72 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -117,7 +117,7 @@ private function parse($resource) $messages = array(); for ($i = 0; $i < $count; ++$i) { - $singularId = $pluralId = null; + $pluralId = null; $translated = null; fseek($stream, $offsetId + $i * 8); diff --git a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php index e85177ef59b24..27d5a25ce26a8 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -40,6 +40,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest /** * @param MetadataFactoryInterface $metadataFactory + * @param array $objectInitializers * * @return ValidatorInterface */ diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 9b34198a41d8b..af467056a5d97 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -25,7 +25,6 @@ class VarCloner extends AbstractCloner protected function doClone($var) { $useExt = $this->useExt; - $i = 0; // Current iteration position in $queue $len = 1; // Length of $queue $pos = 0; // Number of cloned items past the first level $refsCounter = 0; // Hard references counter diff --git a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php index a5f2b35296870..22c60b6e51c72 100644 --- a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php @@ -168,8 +168,9 @@ protected function dumpLine($depth) /** * Generic line dumper callback. * - * @param string $line The line to write - * @param int $depth The recursive depth in the dumped structure + * @param string $line The line to write + * @param int $depth The recursive depth in the dumped structure + * @param string $indentPad The line indent pad */ protected function echoLine($line, $depth, $indentPad) { From c8f3741eba5c8069d99d7149018a22f32093c44b Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Tue, 6 Sep 2016 01:03:05 +0300 Subject: [PATCH 08/17] Update GroupSequence.php Corrected the docblock example --- src/Symfony/Component/Validator/Constraints/GroupSequence.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index aea05583103d5..4b4384f0beb4f 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -19,7 +19,7 @@ * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * - * $validator->validate($address, null, new GroupSequence('Basic', 'Strict')); + * $validator->validate($address, null, new GroupSequence(['Basic', 'Strict'])); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate From 8a9e0f526d56d75f0991c25e7f9f7b7ce9281b0f Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sun, 4 Sep 2016 03:01:20 +0200 Subject: [PATCH 09/17] [FrameworkBundle] Check for class existence before is_subclass_of --- .../DependencyInjection/Compiler/AddConsoleCommandPass.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php index 4ab0d82ed120a..7af53395f8744 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php @@ -38,6 +38,10 @@ public function process(ContainerBuilder $container) $class = $container->getParameterBag()->resolveValue($definition->getClass()); if (!is_subclass_of($class, 'Symfony\\Component\\Console\\Command\\Command')) { + if (!class_exists($class, false)) { + throw new \InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + throw new \InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "Symfony\\Component\\Console\\Command\\Command".', $id)); } $container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $class)), $id); From 42244f2a2ee39b30092fa53d6f669c3a8ee797b9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 6 Sep 2016 15:11:47 +0200 Subject: [PATCH 10/17] [DI] Fix setting synthetic services on ContainerBuilder --- .../DependencyInjection/ContainerBuilder.php | 15 ++++----------- .../Tests/ContainerBuilderTest.php | 6 ++---- .../DependencyInjection/Tests/ContainerTest.php | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 0813110deda8f..6814d28e73116 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -362,21 +362,14 @@ public function getScopeChildren() public function set($id, $service, $scope = self::SCOPE_CONTAINER) { $id = strtolower($id); + $set = isset($this->definitions[$id]); - if ($this->isFrozen()) { + if ($this->isFrozen() && ($set || isset($this->obsoleteDefinitions[$id])) && !$this->{$set ? 'definitions' : 'obsoleteDefinitions'}[$id]->isSynthetic()) { // setting a synthetic service on a frozen container is alright - if ( - (!isset($this->definitions[$id]) && !isset($this->obsoleteDefinitions[$id])) - || - (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic()) - || - (isset($this->obsoleteDefinitions[$id]) && !$this->obsoleteDefinitions[$id]->isSynthetic()) - ) { - throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id)); - } + throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id)); } - if (isset($this->definitions[$id])) { + if ($set) { $this->obsoleteDefinitions[$id] = $this->definitions[$id]; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 7870c40ea9841..6b49b1e34fb85 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -637,14 +637,12 @@ public function testThrowsExceptionWhenSetServiceOnAFrozenContainer() $container->set('a', new \stdClass()); } - /** - * @expectedException \BadMethodCallException - */ public function testThrowsExceptionWhenAddServiceOnAFrozenContainer() { $container = new ContainerBuilder(); $container->compile(); - $container->set('a', new \stdClass()); + $container->set('a', $foo = new \stdClass()); + $this->assertSame($foo, $container->get('a')); } public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer() diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index e451806bb7807..b4eba04f97340 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -258,7 +258,7 @@ public function testGetReturnsNullOnInactiveScope() /** * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException - * @expectedExcepionMessage You have requested a synthetic service ("request"). The DIC does not know how to construct this service. + * @expectedExceptionMessage You have requested a synthetic service ("request"). The DIC does not know how to construct this service. */ public function testGetSyntheticServiceAlwaysThrows() { From c03164e4f95eeef83421933dbd90ed900918f786 Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Wed, 10 Aug 2016 18:14:01 +0100 Subject: [PATCH 11/17] [form] lazy trans `post_max_size_message`. --- .../Component/Form/Extension/Core/Type/FormType.php | 9 +++++++++ .../HttpFoundation/HttpFoundationRequestHandler.php | 2 +- .../Validator/Type/UploadValidatorExtension.php | 7 ++++--- src/Symfony/Component/Form/NativeRequestHandler.php | 2 +- .../Validator/Type/UploadValidatorExtensionTest.php | 8 +++++++- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php index 8590796bfa6e3..1a1a3175e6e4b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FormType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FormType.php @@ -146,6 +146,13 @@ public function configureOptions(OptionsResolver $resolver) }; }; + // Wrap "post_max_size_message" in a closure to translate it lazily + $uploadMaxSizeMessage = function (Options $options) { + return function () use ($options) { + return $options['post_max_size_message']; + }; + }; + // For any form that is not represented by a single HTML control, // errors should bubble up by default $errorBubbling = function (Options $options) { @@ -207,9 +214,11 @@ public function configureOptions(OptionsResolver $resolver) 'action' => '', 'attr' => $defaultAttr, 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', + 'upload_max_size_message' => $uploadMaxSizeMessage, // internal )); $resolver->setAllowedTypes('label_attr', 'array'); + $resolver->setAllowedTypes('upload_max_size_message', array('callable')); } /** diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php index d1e5eece7b5a4..004f4778f98a0 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php @@ -78,7 +78,7 @@ public function handleRequest(FormInterface $form, $request = null) $form->submit(null, false); $form->addError(new FormError( - $form->getConfig()->getOption('post_max_size_message'), + call_user_func($form->getConfig()->getOption('upload_max_size_message')), null, array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()) )); diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php index 6f0fa60afd60d..efbfda93d41bf 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php @@ -42,9 +42,10 @@ public function configureOptions(OptionsResolver $resolver) { $translator = $this->translator; $translationDomain = $this->translationDomain; - - $resolver->setNormalizer('post_max_size_message', function (Options $options, $errorMessage) use ($translator, $translationDomain) { - return $translator->trans($errorMessage, array(), $translationDomain); + $resolver->setNormalizer('upload_max_size_message', function (Options $options, $message) use ($translator, $translationDomain) { + return function () use ($translator, $translationDomain, $message) { + return $translator->trans(call_user_func($message), array(), $translationDomain); + }; }); } diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php index 5541e96ad5df3..3607feb99cc98 100644 --- a/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/Symfony/Component/Form/NativeRequestHandler.php @@ -86,7 +86,7 @@ public function handleRequest(FormInterface $form, $request = null) $form->submit(null, false); $form->addError(new FormError( - $form->getConfig()->getOption('post_max_size_message'), + call_user_func($form->getConfig()->getOption('upload_max_size_message')), null, array('{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()) )); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php index 95a11a78c71ce..dbe13a27456f6 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/UploadValidatorExtensionTest.php @@ -13,6 +13,7 @@ use Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension; use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\OptionsResolver\Options; class UploadValidatorExtensionTest extends TypeTestCase { @@ -29,10 +30,15 @@ public function testPostMaxSizeTranslation() $resolver = new OptionsResolver(); $resolver->setDefault('post_max_size_message', 'old max {{ max }}!'); + $resolver->setDefault('upload_max_size_message', function (Options $options, $message) { + return function () use ($options) { + return $options['post_max_size_message']; + }; + }); $extension->configureOptions($resolver); $options = $resolver->resolve(); - $this->assertEquals('translated max {{ max }}!', $options['post_max_size_message']); + $this->assertEquals('translated max {{ max }}!', call_user_func($options['upload_max_size_message'])); } } From e4193c746c11c44a6ee83f1a098a16b575a26bf5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 6 Sep 2016 11:23:48 +0200 Subject: [PATCH 12/17] Minor cleanups and improvements --- .../Compiler/RepeatedPass.php | 14 ++++++-------- .../Dumper/GraphvizDumper.php | 6 +++--- .../DependencyInjection/Dumper/PhpDumper.php | 16 ++++++++-------- .../DependencyInjection/Dumper/XmlDumper.php | 4 ++-- .../DependencyInjection/Dumper/YamlDumper.php | 4 ++-- .../Loader/YamlFileLoader.php | 4 ++-- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php index 508a8978ea68b..59d4e0a767a5a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php @@ -56,14 +56,12 @@ public function __construct(array $passes) */ public function process(ContainerBuilder $container) { - $this->repeat = false; - foreach ($this->passes as $pass) { - $pass->process($container); - } - - if ($this->repeat) { - $this->process($container); - } + do { + $this->repeat = false; + foreach ($this->passes as $pass) { + $pass->process($container); + } + } while ($this->repeat); } /** diff --git a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index f69d1e9066bac..c8edea28dbbee 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -130,7 +130,7 @@ private function addEdges() * * @return array An array of edges */ - private function findEdges($id, $arguments, $required, $name) + private function findEdges($id, array $arguments, $required, $name) { $edges = array(); foreach ($arguments as $argument) { @@ -246,7 +246,7 @@ private function endDot() * * @return string A comma separated list of attributes */ - private function addAttributes($attributes) + private function addAttributes(array $attributes) { $code = array(); foreach ($attributes as $k => $v) { @@ -263,7 +263,7 @@ private function addAttributes($attributes) * * @return string A space separated list of options */ - private function addOptions($options) + private function addOptions(array $options) { $code = array(); foreach ($options as $k => $v) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 0c3705647d803..37c3275444bcc 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -375,7 +375,7 @@ private function addServiceReturn($id, $definition) * @throws InvalidArgumentException * @throws RuntimeException */ - private function addServiceInstance($id, $definition) + private function addServiceInstance($id, Definition $definition) { $class = $definition->getClass(); @@ -425,7 +425,7 @@ private function addServiceInstance($id, $definition) * * @return bool */ - private function isSimpleInstance($id, $definition) + private function isSimpleInstance($id, Definition $definition) { foreach (array_merge(array($definition), $this->getInlinedDefinitions($definition)) as $sDefinition) { if ($definition !== $sDefinition && !$this->hasReference($id, $sDefinition->getMethodCalls())) { @@ -449,7 +449,7 @@ private function isSimpleInstance($id, $definition) * * @return string */ - private function addServiceMethodCalls($id, $definition, $variableName = 'instance') + private function addServiceMethodCalls($id, Definition $definition, $variableName = 'instance') { $calls = ''; foreach ($definition->getMethodCalls() as $call) { @@ -464,7 +464,7 @@ private function addServiceMethodCalls($id, $definition, $variableName = 'instan return $calls; } - private function addServiceProperties($id, $definition, $variableName = 'instance') + private function addServiceProperties($id, Definition $definition, $variableName = 'instance') { $code = ''; foreach ($definition->getProperties() as $name => $value) { @@ -484,7 +484,7 @@ private function addServiceProperties($id, $definition, $variableName = 'instanc * * @throws ServiceCircularReferenceException when the container contains a circular reference */ - private function addServiceInlinedDefinitionsSetup($id, $definition) + private function addServiceInlinedDefinitionsSetup($id, Definition $definition) { $this->referenceVariables[$id] = new Variable('instance'); @@ -528,7 +528,7 @@ private function addServiceInlinedDefinitionsSetup($id, $definition) * * @return string */ - private function addServiceConfigurator($id, $definition, $variableName = 'instance') + private function addServiceConfigurator($id, Definition $definition, $variableName = 'instance') { if (!$callable = $definition->getConfigurator()) { return ''; @@ -560,7 +560,7 @@ private function addServiceConfigurator($id, $definition, $variableName = 'insta * * @return string */ - private function addService($id, $definition) + private function addService($id, Definition $definition) { $this->definitionVariables = new \SplObjectStorage(); $this->referenceVariables = array(); @@ -1124,7 +1124,7 @@ protected function getDefaultParameters() * * @throws InvalidArgumentException */ - private function exportParameters($parameters, $path = '', $indent = 12) + private function exportParameters(array $parameters, $path = '', $indent = 12) { $php = array(); foreach ($parameters as $key => $value) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index bd8e20071e8b9..3306c4b1a6439 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -262,7 +262,7 @@ private function addServices(\DOMElement $parent) * @param \DOMElement $parent * @param string $keyAttribute */ - private function convertParameters($parameters, $type, \DOMElement $parent, $keyAttribute = 'key') + private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key') { $withKeys = array_keys($parameters) !== range(0, count($parameters) - 1); foreach ($parameters as $key => $value) { @@ -311,7 +311,7 @@ private function convertParameters($parameters, $type, \DOMElement $parent, $key * * @return array */ - private function escape($arguments) + private function escape(array $arguments) { $args = array(); foreach ($arguments as $k => $v) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 3acac1c9ad521..955cb7c14ecca 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -304,7 +304,7 @@ private function getExpressionCall($expression) * * @return array */ - private function prepareParameters($parameters, $escape = true) + private function prepareParameters(array $parameters, $escape = true) { $filtered = array(); foreach ($parameters as $key => $value) { @@ -327,7 +327,7 @@ private function prepareParameters($parameters, $escape = true) * * @return array */ - private function escape($arguments) + private function escape(array $arguments) { $args = array(); foreach ($arguments as $k => $v) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index f57ba587c834b..52cc53946b16d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -386,9 +386,9 @@ private function resolveServices($value) { if (is_array($value)) { $value = array_map(array($this, 'resolveServices'), $value); - } elseif (is_string($value) && 0 === strpos($value, '@=')) { + } elseif (is_string($value) && 0 === strpos($value, '@=')) { return new Expression(substr($value, 2)); - } elseif (is_string($value) && 0 === strpos($value, '@')) { + } elseif (is_string($value) && 0 === strpos($value, '@')) { if (0 === strpos($value, '@@')) { $value = substr($value, 1); $invalidBehavior = null; From 1393e3e91326036e5d09679c4a72af3dd233cd2d Mon Sep 17 00:00:00 2001 From: Pedro Resende Date: Mon, 29 Aug 2016 21:43:12 +0100 Subject: [PATCH 13/17] [FrameworkBundle] Fix Incorrect line break in exception message (500 debug page) --- .../Bundle/FrameworkBundle/Resources/public/css/body.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css index c50c1a54c7868..9a1cbb8cc2755 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css @@ -39,7 +39,7 @@ build: 56 font-family: Georgia, "Times New Roman", Times, serif; font-size: 20px; color: #313131; - word-break: break-all; + word-wrap: break-word; } .sf-reset li { padding-bottom: 10px; From c3b68b0d28790c85bab190b030d132f2ddc73438 Mon Sep 17 00:00:00 2001 From: Enleur Date: Tue, 6 Sep 2016 13:52:05 +0300 Subject: [PATCH 14/17] [Security] Optimize RoleHierarchy's buildRoleMap method --- .../Component/Security/Core/Role/RoleHierarchy.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php index 793007e7f5420..95e76ee279316 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -65,9 +65,17 @@ protected function buildRoleMap() } $visited[] = $role; - $this->map[$main] = array_unique(array_merge($this->map[$main], $this->hierarchy[$role])); - $additionalRoles = array_merge($additionalRoles, array_diff($this->hierarchy[$role], $visited)); + + foreach ($this->hierarchy[$role] as $roleToAdd) { + $this->map[$main][] = $roleToAdd; + } + + foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) { + $additionalRoles[] = $additionalRole; + } } + + $this->map[$main] = array_unique($this->map[$main]); } } } From 7735b4eac9e9a4fdd208a8cd1ff26bfc73dc7af4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Sep 2016 17:54:08 -0700 Subject: [PATCH 15/17] updated CHANGELOG for 2.7.18 --- CHANGELOG-2.7.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 0f7fa8210cbe2..c5f93200d0d51 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,16 @@ in 2.7 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1 +* 2.7.18 (2016-09-07) + + * bug #19859 [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1) (nicolas-grekas) + * bug #19780 [FrameworkBundle] Incorrect line break in exception message (500 debug page) (pedroresende) + * bug #19595 [form] lazy trans `post_max_size_message`. (aitboudad) + * bug #19870 [DI] Fix setting synthetic services on ContainerBuilder (nicolas-grekas) + * bug #19848 Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)" (nicolas-grekas) + * bug #19842 [FrameworkBundle] Check for class existence before is_subclass_of (chalasr) + * bug #19827 [BrowserKit] Fix cookie expiration on 32 bit systems (jameshalsall) + * 2.7.17 (2016-09-02) * bug #19794 [VarDumper] Various minor fixes & cleanups (nicolas-grekas) From dbc2ad230cb3ee2f822c1f00360816b64775d011 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Sep 2016 17:54:14 -0700 Subject: [PATCH 16/17] update CONTRIBUTORS for 2.7.18 --- CONTRIBUTORS.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e10ae01026ab3..7cbed979c4960 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,8 +16,8 @@ Symfony is the result of the work of many people who made the code better - Kris Wallsmith (kriswallsmith) - Jakub Zalas (jakubzalas) - Ryan Weaver (weaverryan) - - Kévin Dunglas (dunglas) - Javier Eguiluz (javier.eguiluz) + - Kévin Dunglas (dunglas) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) - Pascal Borreli (pborreli) @@ -52,8 +52,8 @@ Symfony is the result of the work of many people who made the code better - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - Florin Patan (florinpatan) - - Peter Rehm (rpet) - Ener-Getick (energetick) + - Peter Rehm (rpet) - Iltar van der Berg (kjarli) - Kevin Bond (kbond) - Andrej Hudec (pulzarraider) @@ -315,6 +315,7 @@ Symfony is the result of the work of many people who made the code better - JhonnyL - hossein zolfi (ocean) - Clément Gautier (clementgautier) + - James Halsall (jaitsu) - Eduardo Gulias (egulias) - giulio de donato (liuggio) - Stéphane PY (steph_py) @@ -396,7 +397,6 @@ Symfony is the result of the work of many people who made the code better - Christian Wahler - Mathieu Lemoine - Gintautas Miselis - - James Halsall (jaitsu) - David Badura (davidbadura) - Zander Baldwin - Adam Harvey @@ -1302,6 +1302,7 @@ Symfony is the result of the work of many people who made the code better - Muriel (metalmumu) - Michael Pohlers (mick_the_big) - Cayetano Soriano Gallego (neoshadybeat) + - Ondrej Machulda (ondram) - Patrick McDougle (patrick-mcdougle) - Pablo Monterde Perez (plebs) - Jimmy Leger (redpanda) From 59985613b286b031241628e1470c5f1bd012570f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Sep 2016 17:54:19 -0700 Subject: [PATCH 17/17] updated VERSION for 2.7.18 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 4215ea070d20b..e0e79545193b2 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.18-DEV'; + const VERSION = '2.7.18'; const VERSION_ID = 20718; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; const RELEASE_VERSION = 18; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019';