From fe190b6ee96462f9d7cc268733528d81bc3231e4 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Thu, 12 Oct 2017 09:07:31 -0400 Subject: [PATCH 01/92] reject remember-me token if user check fails --- .../Authentication/Provider/RememberMeAuthenticationProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php index d5e4172bb132d..1e51f6b8fdcce 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php @@ -49,6 +49,7 @@ public function authenticate(TokenInterface $token) $user = $token->getUser(); $this->userChecker->checkPreAuth($user); + $this->userChecker->checkPostAuth($user); $authenticatedToken = new RememberMeToken($user, $this->providerKey, $this->key); $authenticatedToken->setAttributes($token->getAttributes()); From 7da052f18fcf65444a66bf853f5320c78aea3533 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 13 Oct 2017 09:35:47 -0700 Subject: [PATCH 02/92] Updated the source text and translation --- .../Component/Form/Resources/translations/validators.sv.xlf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf index 4e2518b16b19c..2a5e57ca81b36 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf @@ -11,8 +11,8 @@ Den uppladdade filen var för stor. Försök ladda upp en mindre fil. - The CSRF token is invalid. - CSRF-symbolen är inte giltig. + The CSRF token is invalid. Please try to resubmit the form. + CSRF-elementet är inte giltigt. Försök att skicka formuläret igen. From d2ab0d80199669091c3bd08b5e32ae6de3298f7d Mon Sep 17 00:00:00 2001 From: "hubert.lenoir" Date: Fri, 13 Oct 2017 18:51:13 +0200 Subject: [PATCH 03/92] =?UTF-8?q?[Debug]=C2=A0Fix=20same=20vendor=20detect?= =?UTF-8?q?ion=20in=20class=20loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Debug/DebugClassLoader.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 160e945ccbbe0..84c0f663c5bd6 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -203,18 +203,11 @@ public function loadClass($class) } elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) { self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]); } else { - if (2 > $len = 1 + (strpos($name, '\\', 1 + strpos($name, '\\')) ?: strpos($name, '_'))) { + if (2 > $len = 1 + (strpos($name, '\\') ?: strpos($name, '_'))) { $len = 0; $ns = ''; } else { - switch ($ns = substr($name, 0, $len)) { - case 'Symfony\Bridge\\': - case 'Symfony\Bundle\\': - case 'Symfony\Component\\': - $ns = 'Symfony\\'; - $len = strlen($ns); - break; - } + $ns = substr($name, 0, $len); } $parent = get_parent_class($class); From 03be003018a3d2734528e89ffbca6eb14e8f8f03 Mon Sep 17 00:00:00 2001 From: Christian Sciberras Date: Sat, 14 Oct 2017 03:33:35 +0200 Subject: [PATCH 04/92] Fixed mistake in exception expectation --- .../DependencyInjection/ConfigurationTest.php | 9 ++++----- .../Component/Form/Tests/ButtonBuilderTest.php | 11 +++++++---- .../DateIntervalToArrayTransformerTest.php | 14 ++++++++++++-- .../Process/Tests/ProcessFailedExceptionTest.php | 10 ++++++---- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 0d2578db040af..03dfee5f993c0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -165,12 +165,11 @@ public function testAssetsCanBeEnabled() */ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMessage) { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( - InvalidConfigurationException::class, - $expectedMessage - ); - if (method_exists($this, 'expectExceptionMessage')) { + if (method_exists($this, 'expectException')) { + $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage($expectedMessage); + } else { + $this->setExpectedException(InvalidConfigurationException::class, $expectedMessage); } $processor = new Processor(); diff --git a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php index 15df850796ae8..014a5ae179b13 100644 --- a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php +++ b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Form\ButtonBuilder; +use Symfony\Component\Form\Exception\InvalidArgumentException; /** * @author Alexander Cheprasov @@ -53,10 +54,12 @@ public function getInvalidNames() */ public function testInvalidNames($name) { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( - '\Symfony\Component\Form\Exception\InvalidArgumentException', - 'Buttons cannot have empty names.' - ); + if (method_exists($this, 'expectException')) { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Buttons cannot have empty names.'); + } else { + $this->setExpectedException(InvalidArgumentException::class, 'Buttons cannot have empty names.'); + } new ButtonBuilder($name); } } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php index 25ad31f8666b6..81e6b3bc6cf66 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToArrayTransformerTest.php @@ -181,7 +181,12 @@ public function testReverseTransformWithEmptyFields() 'minutes' => '', 'seconds' => '6', ); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class, 'This amount of "minutes" is invalid'); + if (method_exists($this, 'expectException')) { + $this->expectException(TransformationFailedException::class); + $this->expectExceptionMessage('This amount of "minutes" is invalid'); + } else { + $this->setExpectedException(TransformationFailedException::class, 'This amount of "minutes" is invalid'); + } $transformer->reverseTransform($input); } @@ -191,7 +196,12 @@ public function testReverseTransformWithWrongInvertType() $input = array( 'invert' => '1', ); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(TransformationFailedException::class, 'The value of "invert" must be boolean'); + if (method_exists($this, 'expectException')) { + $this->expectException(TransformationFailedException::class); + $this->expectExceptionMessage('The value of "invert" must be boolean'); + } else { + $this->setExpectedException(TransformationFailedException::class, 'The value of "invert" must be boolean'); + } $transformer->reverseTransform($input); } diff --git a/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php index 5f739158c9b14..25712af7ded1a 100644 --- a/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -29,10 +29,12 @@ public function testProcessFailedExceptionThrowsException() ->method('isSuccessful') ->will($this->returnValue(true)); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( - '\InvalidArgumentException', - 'Expected a failed process, but the given process was successful.' - ); + if (method_exists($this, 'expectException')) { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Expected a failed process, but the given process was successful.'); + } else { + $this->setExpectedException(\InvalidArgumentException::class, 'Expected a failed process, but the given process was successful.'); + } new ProcessFailedException($process); } From 2350597288e0c431a84bdee5534e51ac3508e83f Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Sun, 15 Oct 2017 19:29:08 +0200 Subject: [PATCH 05/92] add DOMElement as return type in Crawler::getIterator to support foreach support in ide --- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 1ad80e933ee84..9596610ddc8cd 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -1071,7 +1071,7 @@ public function count() } /** - * @return \ArrayIterator + * @return \ArrayIterator|\DOMElement[] */ public function getIterator() { From ba37cba6c2513ecf239946e95dac22bc2e5fe1ad Mon Sep 17 00:00:00 2001 From: maryo Date: Sun, 15 Oct 2017 19:41:03 +0200 Subject: [PATCH 06/92] Fixed unsetting from loosely equal keys OrderedHashMap --- .../Form/Tests/Util/OrderedHashMapTest.php | 20 +++++++++++++++++++ .../Component/Form/Util/OrderedHashMap.php | 4 ++-- .../Form/Util/OrderedHashMapIterator.php | 8 +++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php b/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php index 89735ea6180c6..fe922e9239faa 100644 --- a/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php +++ b/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php @@ -56,6 +56,15 @@ public function testInsertNullKeys() $this->assertSame(array(0 => 1, 'foo' => 2, 1 => 3), iterator_to_array($map)); } + public function testInsertLooselyEqualKeys() + { + $map = new OrderedHashMap(); + $map['1 as a string'] = '1 as a string'; + $map[1] = 1; + + $this->assertSame(array('1 as a string' => '1 as a string', 1 => 1), iterator_to_array($map)); + } + /** * Updates should not change the position of an element, otherwise we could * turn foreach loops into endless loops if they change the current @@ -111,6 +120,17 @@ public function testUnset() $this->assertSame(array('second' => 2), iterator_to_array($map)); } + public function testUnsetFromLooselyEqualKeysHashMap() + { + $map = new OrderedHashMap(); + $map['1 as a string'] = '1 as a string'; + $map[1] = 1; + + unset($map[1]); + + $this->assertSame(array('1 as a string' => '1 as a string'), iterator_to_array($map)); + } + public function testUnsetNonExistingSucceeds() { $map = new OrderedHashMap(); diff --git a/src/Symfony/Component/Form/Util/OrderedHashMap.php b/src/Symfony/Component/Form/Util/OrderedHashMap.php index 78687032feac6..24ec0d529902f 100644 --- a/src/Symfony/Component/Form/Util/OrderedHashMap.php +++ b/src/Symfony/Component/Form/Util/OrderedHashMap.php @@ -133,7 +133,7 @@ public function offsetSet($key, $value) : 1 + (int) max($this->orderedKeys); } - $this->orderedKeys[] = $key; + $this->orderedKeys[] = (string) $key; } $this->elements[$key] = $value; @@ -144,7 +144,7 @@ public function offsetSet($key, $value) */ public function offsetUnset($key) { - if (false !== ($position = array_search($key, $this->orderedKeys))) { + if (false !== ($position = array_search((string) $key, $this->orderedKeys))) { array_splice($this->orderedKeys, $position, 1); unset($this->elements[$key]); diff --git a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php b/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php index 7305f51640c38..11562475d822e 100644 --- a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php +++ b/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php @@ -118,7 +118,13 @@ public function next() */ public function key() { - return $this->key; + if (null === $this->key) { + return null; + } + + $array = array($this->key => null); + + return key($array); } /** From c17a92259af8330f9b11cc11da5aabb9c4f4c59f Mon Sep 17 00:00:00 2001 From: "Anton A. Sumin" Date: Fri, 10 Mar 2017 23:00:21 +0300 Subject: [PATCH 07/92] Fixed pathinfo calculation for requests starting with a question mark. - fix bad conflict resolving issue - port symfony/symfony#21968 to 3.3+ --- .../Component/HttpFoundation/Request.php | 8 ++- .../HttpFoundation/Tests/RequestTest.php | 61 +++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 28e78c0a208f2..ac3ec7171e6e6 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1863,6 +1863,9 @@ protected function prepareBaseUrl() // Does the baseUrl have anything in common with the request_uri? $requestUri = $this->getRequestUri(); + if ($requestUri !== '' && $requestUri[0] !== '/') { + $requestUri = '/'.$requestUri; + } if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { // full $baseUrl matches @@ -1935,9 +1938,12 @@ protected function preparePathInfo() } // Remove the query string from REQUEST_URI - if ($pos = strpos($requestUri, '?')) { + if (false !== $pos = strpos($requestUri, '?')) { $requestUri = substr($requestUri, 0, $pos); } + if ($requestUri !== '' && $requestUri[0] !== '/') { + $requestUri = '/'.$requestUri; + } $pathInfo = substr($requestUri, strlen($baseUrl)); if (null !== $baseUrl && (false === $pathInfo || '' === $pathInfo)) { diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index b36fbb7e96258..3c123656ccb2e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -1286,6 +1286,12 @@ public function testGetPathInfo() $request->initialize(array(), array(), array(), array(), array(), $server); $this->assertEquals('/path%20test/info', $request->getPathInfo()); + + $server = array(); + $server['REQUEST_URI'] = '?a=b'; + $request->initialize(array(), array(), array(), array(), array(), $server); + + $this->assertEquals('/', $request->getPathInfo()); } public function testGetParameterPrecedence() @@ -2188,6 +2194,61 @@ public function testGetTrustedHeaderName() Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X_FORWARDED_PORT'); Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X_FORWARDED_PROTO'); } + + public function nonstandardRequestsData() + { + return array( + array('', '', '/', 'http://host:8080/', ''), + array('/', '', '/', 'http://host:8080/', ''), + + array('hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), + array('/hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), + + array('', 'a=b', '/', 'http://host:8080/?a=b'), + array('?a=b', 'a=b', '/', 'http://host:8080/?a=b'), + array('/?a=b', 'a=b', '/', 'http://host:8080/?a=b'), + + array('x', 'a=b', '/x', 'http://host:8080/x?a=b'), + array('x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), + array('/x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), + + array('hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), + array('/hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), + + array('hello/app.php/x', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), + array('hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), + array('/hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), + ); + } + + /** + * @dataProvider nonstandardRequestsData + */ + public function testNonstandardRequests($requestUri, $queryString, $expectedPathInfo, $expectedUri, $expectedBasePath = '', $expectedBaseUrl = null) + { + if (null === $expectedBaseUrl) { + $expectedBaseUrl = $expectedBasePath; + } + + $server = array( + 'HTTP_HOST' => 'host:8080', + 'SERVER_PORT' => '8080', + 'QUERY_STRING' => $queryString, + 'PHP_SELF' => '/hello/app.php', + 'SCRIPT_FILENAME' => '/some/path/app.php', + 'REQUEST_URI' => $requestUri, + ); + + $request = new Request(array(), array(), array(), array(), array(), $server); + + $this->assertEquals($expectedPathInfo, $request->getPathInfo()); + $this->assertEquals($expectedUri, $request->getUri()); + $this->assertEquals($queryString, $request->getQueryString()); + $this->assertEquals(8080, $request->getPort()); + $this->assertEquals('host:8080', $request->getHttpHost()); + $this->assertEquals($expectedBaseUrl, $request->getBaseUrl()); + $this->assertEquals($expectedBasePath, $request->getBasePath()); + } } class RequestContentProxy extends Request From 56b29a754cbe4af6669b57135347da19ef475265 Mon Sep 17 00:00:00 2001 From: Yuriy Potemkin Date: Mon, 16 Oct 2017 20:34:10 +0300 Subject: [PATCH 08/92] pdo session fix --- .../Session/Storage/Handler/PdoSessionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 5cdac639399f0..daabbc21f0b66 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -387,7 +387,7 @@ public function close() $this->gcCalled = false; // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol < :time"; + $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol"; $stmt = $this->pdo->prepare($sql); $stmt->bindValue(':time', time(), \PDO::PARAM_INT); From a73249db313b8b9b5453de8b68c1c9e64983efbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 16 Oct 2017 09:56:04 +0200 Subject: [PATCH 09/92] [PropertyInfo] Add support for the iterable type --- src/Symfony/Component/PropertyInfo/Tests/TypeTest.php | 6 ++++++ src/Symfony/Component/PropertyInfo/Type.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php b/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php index 9266f9808fb55..cd1cab9167371 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php @@ -37,6 +37,12 @@ public function testConstruct() $this->assertEquals(Type::BUILTIN_TYPE_STRING, $collectionValueType->getBuiltinType()); } + public function testIterable() + { + $type = new Type('iterable'); + $this->assertSame('iterable', $type->getBuiltinType()); + } + /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage "foo" is not a valid PHP type. diff --git a/src/Symfony/Component/PropertyInfo/Type.php b/src/Symfony/Component/PropertyInfo/Type.php index ad21f917241f8..3dc7d785fe94f 100644 --- a/src/Symfony/Component/PropertyInfo/Type.php +++ b/src/Symfony/Component/PropertyInfo/Type.php @@ -27,6 +27,7 @@ class Type const BUILTIN_TYPE_ARRAY = 'array'; const BUILTIN_TYPE_NULL = 'null'; const BUILTIN_TYPE_CALLABLE = 'callable'; + const BUILTIN_TYPE_ITERABLE = 'iterable'; /** * List of PHP builtin types. @@ -43,6 +44,7 @@ class Type self::BUILTIN_TYPE_ARRAY, self::BUILTIN_TYPE_CALLABLE, self::BUILTIN_TYPE_NULL, + self::BUILTIN_TYPE_ITERABLE, ); /** @@ -102,7 +104,7 @@ public function __construct($builtinType, $nullable = false, $class = null, $col /** * Gets built-in type. * - * Can be bool, int, float, string, array, object, resource, null or callback. + * Can be bool, int, float, string, array, object, resource, null, callback or iterable. * * @return string */ From b5246a72ca0f2089ac945d1b0f9a1edc45377dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 15 Oct 2017 19:28:12 +0200 Subject: [PATCH 10/92] [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed --- .../Component/Serializer/Normalizer/ObjectNormalizer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index fbd771dbd76ab..2c5842d6a5484 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -16,6 +16,7 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Serializer\Exception\CircularReferenceException; use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; @@ -33,6 +34,10 @@ class ObjectNormalizer extends AbstractNormalizer public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null) { + if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) { + throw new RuntimeException('The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.'); + } + parent::__construct($classMetadataFactory, $nameConverter); $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); From 7d21caf8ddef5b88bed4714f6bc4ef52e91dffa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 15 Oct 2017 19:38:38 +0200 Subject: [PATCH 11/92] [Serializer] YamlEncoder: throw if the Yaml component isn't installed --- src/Symfony/Component/Serializer/Encoder/YamlEncoder.php | 5 +++++ .../Component/Serializer/Normalizer/DataUriNormalizer.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php index 41ac04f209105..3ac1af679a4a1 100644 --- a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Serializer\Encoder; +use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Yaml\Dumper; use Symfony\Component\Yaml\Parser; @@ -29,6 +30,10 @@ class YamlEncoder implements EncoderInterface, DecoderInterface public function __construct(Dumper $dumper = null, Parser $parser = null, array $defaultContext = array()) { + if (!class_exists(Dumper::class)) { + throw new RuntimeException('The YamlEncoder class requires the "Yaml" component. Install "symfony/yaml" to use it.'); + } + $this->dumper = $dumper ?: new Dumper(); $this->parser = $parser ?: new Parser(); $this->defaultContext = array_merge($this->defaultContext, $defaultContext); diff --git a/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php index 9e5af130d03b7..121d3425f74f1 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php @@ -110,7 +110,7 @@ public function supportsDenormalization($data, $type, $format = null) $supportedTypes = array( \SplFileInfo::class => true, \SplFileObject::class => true, - 'Symfony\Component\HttpFoundation\File\File' => true, + File::class => true, ); return isset($supportedTypes[$type]); From fdb0ea9fdd5c273f593622078f77344c5c2a7a0f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 17 Oct 2017 00:50:56 +0200 Subject: [PATCH 12/92] [DI] Enhance service locator error message --- .../DependencyInjection/Compiler/ServiceLocatorTagPass.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php index 59c5e390223ca..fd6e6655a9c7f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php @@ -78,6 +78,9 @@ protected function processValue($value, $isRoot = false) public static function register(ContainerBuilder $container, array $refMap) { foreach ($refMap as $id => $ref) { + if (!$ref instanceof Reference) { + throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', is_object($ref) ? get_class($ref) : gettype($ref), $id)); + } $refMap[$id] = new ServiceClosureArgument($ref); } ksort($refMap); From 45ac19220081f77a96374b6d3bbc2adfbfa54f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Tue, 17 Oct 2017 12:11:27 +0200 Subject: [PATCH 13/92] Remove obsolete PHPDoc from UriSigner --- src/Symfony/Component/HttpKernel/UriSigner.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/UriSigner.php b/src/Symfony/Component/HttpKernel/UriSigner.php index a64bf2c4460b5..526a9197384a1 100644 --- a/src/Symfony/Component/HttpKernel/UriSigner.php +++ b/src/Symfony/Component/HttpKernel/UriSigner.php @@ -55,10 +55,6 @@ public function sign($uri) /** * Checks that a URI contains the correct hash. * - * The _hash query string parameter must be the last one - * (as it is generated that way by the sign() method, it should - * never be a problem). - * * @param string $uri A signed URI * * @return bool True if the URI is signed correctly, false otherwise From e5d57dd0500e6dc9f313deeb97fc1fbc4a9be052 Mon Sep 17 00:00:00 2001 From: Richard Quadling Date: Tue, 17 Oct 2017 12:58:41 +0100 Subject: [PATCH 14/92] Username and password in basic auth are allowed to contain '.' Initially reported by Fede Isas in https://github.com/beberlei/assert/pull/234 --- src/Symfony/Component/Validator/Constraints/UrlValidator.php | 2 +- .../Component/Validator/Tests/Constraints/UrlValidatorTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/src/Symfony/Component/Validator/Constraints/UrlValidator.php index 1ba47ffd1d91b..40ac709fe843a 100644 --- a/src/Symfony/Component/Validator/Constraints/UrlValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -24,7 +24,7 @@ class UrlValidator extends ConstraintValidator { const PATTERN = '~^ (%s):// # protocol - (([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth + (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth ( ([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name | # or diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php index 5406b354ce065..c921fce933137 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php @@ -103,6 +103,9 @@ public function getValidUrls() array('http://xn--d1abbgf6aiiy.xn--p1ai/'), array('http://☎.com/'), array('http://username:password@symfony.com'), + array('http://user.name:password@symfony.com'), + array('http://username:pass.word@symfony.com'), + array('http://user.name:pass.word@symfony.com'), array('http://user-name@symfony.com'), ); } From 574f9f52736c17804848bd1481d9c1d23c872e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 17 Oct 2017 19:33:19 +0200 Subject: [PATCH 15/92] Prefer line formatter on missing cli dumper The console formatter does a better job, unless the VarDumper component is missing, in which case you will not see the "context" or "extra" keys and the LineFormatter should be preferred. --- src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php index a3a2af2135189..6ac2565bf7ad3 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php @@ -11,6 +11,7 @@ namespace Symfony\Bridge\Monolog\Handler; +use Monolog\Formatter\LineFormatter; use Monolog\Handler\AbstractProcessingHandler; use Monolog\Logger; use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter; @@ -20,6 +21,7 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\VarDumper\Dumper\CliDumper; /** * Writes logs to the console output depending on its verbosity setting. @@ -162,6 +164,9 @@ protected function write(array $record) */ protected function getDefaultFormatter() { + if (!class_exists(CliDumper::class)) { + return new LineFormatter(); + } if (!$this->output) { return new ConsoleFormatter(); } From fcc2146bef98317605adec580b63dd0ca320aed2 Mon Sep 17 00:00:00 2001 From: Theo Tzaferis Date: Tue, 17 Oct 2017 12:21:58 +0200 Subject: [PATCH 16/92] Remove BC Break label from `NullDumper` class https://github.com/symfony/dependency-injection/commit/7f34aa2643519f3400a6f66415a8cf9bf7147e81 This is the commit where the class has been made "final", but it has only been made final via php doc, not via code, so this shouldn't be a BC break in my opinion. --- UPGRADE-3.3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-3.3.md b/UPGRADE-3.3.md index 3cff95d8506ce..1b61c352238fe 100644 --- a/UPGRADE-3.3.md +++ b/UPGRADE-3.3.md @@ -82,7 +82,7 @@ DependencyInjection * Autowiring services based on the types they implement is deprecated and won't be supported in version 4.0. Rename (or alias) your services to their FQCN id to make them autowirable. - * [BC BREAK] The `NullDumper` class has been made final + * The `NullDumper` class has been made final * [BC BREAK] `_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names. From b935b93c7ae6fc9360765756632472a85f7bda7a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 18 Oct 2017 18:43:06 -0700 Subject: [PATCH 17/92] bumped Symfony version to 4.0.0 --- 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 26facc144de1c..743c7586ffd9f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -61,12 +61,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $projectDir; private $warmupDir; - const VERSION = '4.0.0-BETA1'; + const VERSION = '4.0.0-DEV'; const VERSION_ID = 40000; const MAJOR_VERSION = 4; const MINOR_VERSION = 0; const RELEASE_VERSION = 0; - const EXTRA_VERSION = 'BETA1'; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '07/2018'; const END_OF_LIFE = '01/2019'; From 2ef619f9bb4a38394b5e3716b3febec9499c6425 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 18 Oct 2017 16:44:01 -0400 Subject: [PATCH 18/92] Adding the Form default theme files to be warmed up in Twig's cache --- .../DependencyInjection/Compiler/ExtensionPass.php | 9 ++++++++- .../TwigBundle/DependencyInjection/TwigExtension.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php index c829cfa4377fb..963a63b8c321a 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -45,7 +45,14 @@ public function process(ContainerBuilder $container) if ($container->has('form.extension')) { $container->getDefinition('twig.extension.form')->addTag('twig.extension'); $reflClass = new \ReflectionClass('Symfony\Bridge\Twig\Extension\FormExtension'); - $container->getDefinition('twig.loader.native_filesystem')->addMethodCall('addPath', array(dirname(dirname($reflClass->getFileName())).'/Resources/views/Form')); + + $coreThemePath = dirname(dirname($reflClass->getFileName())).'/Resources/views/Form'; + $container->getDefinition('twig.loader.native_filesystem')->addMethodCall('addPath', array($coreThemePath)); + + $paths = $container->getDefinition('twig.cache_warmer')->getArgument(2); + $paths[$coreThemePath] = null; + $container->getDefinition('twig.cache_warmer')->replaceArgument(2, $paths); + $container->getDefinition('twig.template_iterator')->replaceArgument(2, $paths); } if ($container->has('fragment.handler')) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 77d10e84c1464..d1fab3184e3a6 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -89,6 +89,7 @@ public function load(array $configs, ContainerBuilder $container) } } + // paths are modified in ExtensionPass if forms are enabled $container->getDefinition('twig.cache_warmer')->replaceArgument(2, $config['paths']); $container->getDefinition('twig.template_iterator')->replaceArgument(2, $config['paths']); From c63742daefdba877428716a8ed7a90ea5c3a8678 Mon Sep 17 00:00:00 2001 From: DQNEO Date: Thu, 19 Oct 2017 20:55:56 +0900 Subject: [PATCH 19/92] content can be a resource --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index f9d7895db03ae..b987c5b9027f1 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -130,7 +130,7 @@ class Request public $headers; /** - * @var string + * @var string|resource */ protected $content; From 1f84b1fd8103148d55b56a3fb1e407448fdb9f1b Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 19 Oct 2017 14:43:54 +0200 Subject: [PATCH 20/92] [Session] remove lazy_write polyfill for php < 7.0 --- .../Storage/Handler/AbstractSessionHandler.php | 14 -------------- .../Storage/Handler/AbstractSessionHandlerTest.php | 3 --- 2 files changed, 17 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php index c20a23b20e5d9..0929c4d0e3d57 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -88,9 +88,6 @@ public function read($sessionId) $data = $this->doRead($sessionId); $this->newSessionId = '' === $data ? $sessionId : null; - if (\PHP_VERSION_ID < 70000) { - $this->prefetchData = $data; - } return $data; } @@ -100,14 +97,6 @@ public function read($sessionId) */ public function write($sessionId, $data) { - if (\PHP_VERSION_ID < 70000 && $this->prefetchData) { - $readData = $this->prefetchData; - $this->prefetchData = null; - - if ($readData === $data) { - return $this->updateTimestamp($sessionId, $data); - } - } if (null === $this->igbinaryEmptyData) { // see https://github.com/igbinary/igbinary/issues/146 $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize(array()) : ''; @@ -125,9 +114,6 @@ public function write($sessionId, $data) */ public function destroy($sessionId) { - if (\PHP_VERSION_ID < 70000) { - $this->prefetchData = null; - } if (!headers_sent() && ini_get('session.use_cookies')) { if (!$this->sessionName) { throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', get_class($this))); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php index 3ac081e3884c1..6566d6eee4f7a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php @@ -13,9 +13,6 @@ use PHPUnit\Framework\TestCase; -/** - * @requires PHP 7.0 - */ class AbstractSessionHandlerTest extends TestCase { private static $server; From b6bb84b8f1358f283ad297dc08ccceab2ade2a12 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Thu, 19 Oct 2017 14:36:34 +0200 Subject: [PATCH 21/92] [Security] Fix BC layer for AbstractGuardAuthenticator subclasses --- .../Firewall/GuardAuthenticationListener.php | 9 +++++- .../GuardAuthenticationListenerTest.php | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 4ec0b8f32630d..1cac3c4b7be6b 100644 --- a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; use Symfony\Component\Security\Guard\GuardAuthenticatorInterface; use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; @@ -124,7 +125,13 @@ private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorIn return; } - throw new \UnexpectedValueException(sprintf('The return value of "%s::getCredentials()" must not be null. Return false from "%s::supports()" instead.', get_class($guardAuthenticator), get_class($guardAuthenticator))); + if ($guardAuthenticator instanceof AbstractGuardAuthenticator) { + @trigger_error(sprintf('Returning null from "%1$s::getCredentials()" is deprecated since version 3.4 and will throw an \UnexpectedValueException in 4.0. Return false from "%1$s::supports()" instead.', get_class($guardAuthenticator)), E_USER_DEPRECATED); + + return; + } + + throw new \UnexpectedValueException(sprintf('The return value of "%1$s::getCredentials()" must not be null. Return false from "%1$s::supports()" instead.', get_class($guardAuthenticator))); } // create a token with the unique key, so that the provider knows which authenticator to use diff --git a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php index 5af9f130f8645..626b1cd4098ec 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php @@ -15,6 +15,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; use Symfony\Component\Security\Guard\AuthenticatorInterface; use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener; use Symfony\Component\Security\Guard\GuardAuthenticatorInterface; @@ -388,6 +389,37 @@ public function testReturnNullFromGetCredentials() $listener->handle($this->event); } + /** + * @group legacy + * @expectedDeprecation Returning null from "%s::getCredentials()" is deprecated since version 3.4 and will throw an \UnexpectedValueException in 4.0. Return false from "%s::supports()" instead. + */ + public function testReturnNullFromGetCredentialsTriggersForAbstractGuardAuthenticatorInstances() + { + $authenticator = $this->getMockBuilder(AbstractGuardAuthenticator::class)->getMock(); + $providerKey = 'my_firewall4'; + + $authenticator + ->expects($this->once()) + ->method('supports') + ->will($this->returnValue(true)); + + // this will raise exception + $authenticator + ->expects($this->once()) + ->method('getCredentials') + ->will($this->returnValue(null)); + + $listener = new GuardAuthenticationListener( + $this->guardAuthenticatorHandler, + $this->authenticationManager, + $providerKey, + array($authenticator), + $this->logger + ); + + $listener->handle($this->event); + } + protected function setUp() { $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager') From c22d783696d65f36384f166b6d1a56c426517ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Thu, 19 Oct 2017 17:12:11 +0200 Subject: [PATCH 22/92] [Form] Add useDefaultThemes flag to the interfaces --- UPGRADE-4.0.md | 2 ++ src/Symfony/Component/Form/AbstractRendererEngine.php | 6 ++---- src/Symfony/Component/Form/FormRenderer.php | 5 ++--- src/Symfony/Component/Form/FormRendererEngineInterface.php | 4 ++-- src/Symfony/Component/Form/FormRendererInterface.php | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 000fd2fc059d8..8bbaef3642e84 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -326,6 +326,8 @@ Form } ``` + * `FormRendererInterface::setTheme` and `FormRendererEngineInterface::setTheme` have a new optional argument `$useDefaultThemes` with a default value set to `true`. + FrameworkBundle --------------- diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony/Component/Form/AbstractRendererEngine.php index ab39f1fed309b..ceed974c6f020 100644 --- a/src/Symfony/Component/Form/AbstractRendererEngine.php +++ b/src/Symfony/Component/Form/AbstractRendererEngine.php @@ -62,15 +62,13 @@ public function __construct(array $defaultThemes = array()) /** * {@inheritdoc} */ - public function setTheme(FormView $view, $themes /*, $useDefaultThemes = true */) + public function setTheme(FormView $view, $themes, $useDefaultThemes = true) { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; // Do not cast, as casting turns objects into arrays of properties $this->themes[$cacheKey] = is_array($themes) ? $themes : array($themes); - - $args = func_get_args(); - $this->useDefaultThemes[$cacheKey] = isset($args[2]) ? (bool) $args[2] : true; + $this->useDefaultThemes[$cacheKey] = (bool) $useDefaultThemes; // Unset instead of resetting to an empty array, in order to allow // implementations (like TwigRendererEngine) to check whether $cacheKey diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index c8a9d1812eb8b..3797873acb94f 100644 --- a/src/Symfony/Component/Form/FormRenderer.php +++ b/src/Symfony/Component/Form/FormRenderer.php @@ -70,10 +70,9 @@ public function getEngine() /** * {@inheritdoc} */ - public function setTheme(FormView $view, $themes /*, $useDefaultThemes = true */) + public function setTheme(FormView $view, $themes, $useDefaultThemes = true) { - $args = func_get_args(); - $this->engine->setTheme($view, $themes, isset($args[2]) ? (bool) $args[2] : true); + $this->engine->setTheme($view, $themes, $useDefaultThemes); } /** diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Symfony/Component/Form/FormRendererEngineInterface.php index dcc15b6a2450f..fd8f6b4023220 100644 --- a/src/Symfony/Component/Form/FormRendererEngineInterface.php +++ b/src/Symfony/Component/Form/FormRendererEngineInterface.php @@ -25,9 +25,9 @@ interface FormRendererEngineInterface * @param mixed $themes The theme(s). The type of these themes * is open to the implementation. * @param bool $useDefaultThemes If true, will use default themes specified - * in the engine, will be added to the interface in 4.0 + * in the engine */ - public function setTheme(FormView $view, $themes /*, $useDefaultThemes = true */); + public function setTheme(FormView $view, $themes, $useDefaultThemes = true); /** * Returns the resource for a block name. diff --git a/src/Symfony/Component/Form/FormRendererInterface.php b/src/Symfony/Component/Form/FormRendererInterface.php index 33530aeb82c47..432892dbbc2ad 100644 --- a/src/Symfony/Component/Form/FormRendererInterface.php +++ b/src/Symfony/Component/Form/FormRendererInterface.php @@ -32,9 +32,9 @@ public function getEngine(); * @param mixed $themes The theme(s). The type of these themes * is open to the implementation. * @param bool $useDefaultThemes If true, will use default themes specified - * in the renderer, will be added to the interface in 4.0 + * in the renderer */ - public function setTheme(FormView $view, $themes /*, $useDefaultThemes = true */); + public function setTheme(FormView $view, $themes, $useDefaultThemes = true); /** * Renders a named block of the form theme. From 0fc2282fc2242f0ecb4b13437383d9f62cb5bd6b Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Thu, 19 Oct 2017 12:41:04 -0400 Subject: [PATCH 23/92] fix the constant value to be consistent with the name --- src/Symfony/Component/Form/FormEvents.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index b795f95dcfafc..c9b01736d495f 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -31,7 +31,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\FormEvent") */ - const PRE_SUBMIT = 'form.pre_bind'; + const PRE_SUBMIT = 'form.pre_submit'; /** * The SUBMIT event is dispatched just before the Form::submit() method @@ -41,7 +41,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\FormEvent") */ - const SUBMIT = 'form.bind'; + const SUBMIT = 'form.submit'; /** * The FormEvents::POST_SUBMIT event is dispatched after the Form::submit() @@ -51,7 +51,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\FormEvent") */ - const POST_SUBMIT = 'form.post_bind'; + const POST_SUBMIT = 'form.post_submit'; /** * The FormEvents::PRE_SET_DATA event is dispatched at the beginning of the Form::setData() method. From 57b7d832d9387cba4cd48231d72b1195e7f17f21 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Thu, 19 Oct 2017 18:26:19 +0200 Subject: [PATCH 24/92] [WebServerBundle] Prevent commands from being registered by convention --- .../Command/ServerLogCommand.php | 4 +-- .../Command/ServerRunCommand.php | 3 +- .../Command/ServerStartCommand.php | 3 +- .../Command/ServerStatusCommand.php | 3 +- .../Command/ServerStopCommand.php | 3 +- .../Resources/config/webserver.xml | 4 +++ .../WebServerExtensionTest.php | 31 +++++++++++++++++++ .../Bundle/WebServerBundle/composer.json | 7 ++--- 8 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php index eed32c5a2055f..2a92d62eeea8d 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php @@ -29,6 +29,8 @@ class ServerLogCommand extends Command private $el; private $handler; + protected static $defaultName = 'server:log'; + public function isEnabled() { if (!class_exists(ConsoleFormatter::class)) { @@ -40,8 +42,6 @@ public function isEnabled() protected function configure() { - $this->setName('server:log'); - if (!class_exists(ConsoleFormatter::class)) { return; } diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php index 4c228ad93bee0..5c59a97662ef8 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php @@ -31,6 +31,8 @@ class ServerRunCommand extends ServerCommand private $documentRoot; private $environment; + protected static $defaultName = 'server:run'; + public function __construct($documentRoot = null, $environment = null) { $this->documentRoot = $documentRoot; @@ -50,7 +52,6 @@ protected function configure() new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root, usually where your front controllers are stored'), new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), )) - ->setName('server:run') ->setDescription('Runs a local web server') ->setHelp(<<<'EOF' %command.name% runs a local web server: By default, the server diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php index af90a53f32c99..c762292303116 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php @@ -30,6 +30,8 @@ class ServerStartCommand extends ServerCommand private $documentRoot; private $environment; + protected static $defaultName = 'server:start'; + public function __construct($documentRoot = null, $environment = null) { $this->documentRoot = $documentRoot; @@ -44,7 +46,6 @@ public function __construct($documentRoot = null, $environment = null) protected function configure() { $this - ->setName('server:start') ->setDefinition(array( new InputArgument('addressport', InputArgument::OPTIONAL, 'The address to listen to (can be address:port, address, or port)'), new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root'), diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php index 3e7d4c7ec4fd4..6a01ebed79a3d 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php @@ -26,13 +26,14 @@ */ class ServerStatusCommand extends ServerCommand { + protected static $defaultName = 'server:status'; + /** * {@inheritdoc} */ protected function configure() { $this - ->setName('server:status') ->setDefinition(array( new InputOption('pidfile', null, InputOption::VALUE_REQUIRED, 'PID file'), new InputOption('filter', null, InputOption::VALUE_REQUIRED, 'The value to display (one of port, host, or address)'), diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php index ccfb733066b80..f3f7bb60fe9ee 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php @@ -25,13 +25,14 @@ */ class ServerStopCommand extends ServerCommand { + protected static $defaultName = 'server:stop'; + /** * {@inheritdoc} */ protected function configure() { $this - ->setName('server:stop') ->setDefinition(array( new InputOption('pidfile', null, InputOption::VALUE_REQUIRED, 'PID file'), )) diff --git a/src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml b/src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml index 1aef987ceb6d5..21bbc969a53b2 100644 --- a/src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml +++ b/src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml @@ -26,5 +26,9 @@ + + + + diff --git a/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php b/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php new file mode 100644 index 0000000000000..17c41139fe649 --- /dev/null +++ b/src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\WebServerBundle\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Bundle\WebServerBundle\DependencyInjection\WebServerExtension; +use Symfony\Component\DependencyInjection\ContainerBuilder; + +class WebServerExtensionTest extends TestCase +{ + public function testLoad() + { + $container = new ContainerBuilder(); + (new WebServerExtension())->load(array(), $container); + + $this->assertTrue($container->hasDefinition('web_server.command.server_run')); + $this->assertTrue($container->hasDefinition('web_server.command.server_start')); + $this->assertTrue($container->hasDefinition('web_server.command.server_stop')); + $this->assertTrue($container->hasDefinition('web_server.command.server_status')); + $this->assertTrue($container->hasDefinition('web_server.command.server_log')); + } +} diff --git a/src/Symfony/Bundle/WebServerBundle/composer.json b/src/Symfony/Bundle/WebServerBundle/composer.json index 731f4178e70dc..659b4adafc8f6 100644 --- a/src/Symfony/Bundle/WebServerBundle/composer.json +++ b/src/Symfony/Bundle/WebServerBundle/composer.json @@ -17,7 +17,9 @@ ], "require": { "php": "^5.5.9|>=7.0.8", - "symfony/console": "~3.3|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", "symfony/http-kernel": "~3.3|~4.0", "symfony/process": "~3.3|~4.0" }, @@ -27,9 +29,6 @@ "/Tests/" ] }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, "minimum-stability": "dev", "extra": { "branch-alias": { From 0ee856add1f641e1f21aac30a69dceaa464bd9c4 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Thu, 19 Oct 2017 13:35:16 -0400 Subject: [PATCH 25/92] Update UPGRADE-4.0.md --- UPGRADE-4.0.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 000fd2fc059d8..307d12f1a4b67 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -226,6 +226,9 @@ Finder Form ---- + * The constant values of `FormEvents::*` have been renamed to match with its name. + May break rare cases where the event name is used rather than the constant. + * The `choices_as_values` option of the `ChoiceType` has been removed. * Support for data objects that implements both `Traversable` and From 944931af633ba6fe0d5a27763a563a0d798f0252 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 19 Oct 2017 20:08:49 +0200 Subject: [PATCH 26/92] Minor reword --- UPGRADE-4.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 307d12f1a4b67..c2f3753d2a7b6 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -226,8 +226,9 @@ Finder Form ---- - * The constant values of `FormEvents::*` have been renamed to match with its name. - May break rare cases where the event name is used rather than the constant. +* The values of the `FormEvents::*` constants have been updated to match the + constant names. You should only update your application if you relied on the + constant values instead of their names. * The `choices_as_values` option of the `ChoiceType` has been removed. From df086fd9b3c535bdc5f0b441e88768878dbb379b Mon Sep 17 00:00:00 2001 From: DQNEO Date: Thu, 19 Oct 2017 20:43:06 +0900 Subject: [PATCH 27/92] $isClientIpsVali is not used --- src/Symfony/Component/HttpFoundation/Request.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index ac3ec7171e6e6..4947904776a27 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -221,7 +221,6 @@ class Request protected static $requestFactory; private $isHostValid = true; - private $isClientIpsValid = true; private $isForwardedValid = true; private static $trustedHeaderSet = -1; From 058fb84554d2cd2d25490f90cee02e76de6d715c Mon Sep 17 00:00:00 2001 From: DQNEO Date: Thu, 19 Oct 2017 22:42:56 +0900 Subject: [PATCH 28/92] streamed response should return $this --- .../Component/HttpFoundation/StreamedResponse.php | 8 +++++--- .../HttpFoundation/Tests/StreamedResponseTest.php | 11 +++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index d6b7b9e53aba2..01e8cf8c36df2 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -83,12 +83,12 @@ public function setCallback($callback) public function sendHeaders() { if ($this->headersSent) { - return; + return $this; } $this->headersSent = true; - parent::sendHeaders(); + return parent::sendHeaders(); } /** @@ -99,7 +99,7 @@ public function sendHeaders() public function sendContent() { if ($this->streamed) { - return; + return $this; } $this->streamed = true; @@ -109,6 +109,8 @@ public function sendContent() } call_user_func($this->callback); + + return $this; } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php index 5874145348eab..2ccb6841ad84b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php @@ -121,4 +121,15 @@ public function testCreate() $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response); $this->assertEquals(204, $response->getStatusCode()); } + + public function testReturnThis() + { + $response = new StreamedResponse(function () {}); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendContent()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendContent()); + + $response = new StreamedResponse(function () {}); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendHeaders()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendHeaders()); + } } From c4f64a6260098e07259c9513e7eacd7846ba0ac0 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Thu, 19 Oct 2017 15:31:27 -0400 Subject: [PATCH 29/92] Update UPGRADE-4.0.md --- UPGRADE-4.0.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 77959fa48bab1..4132d06ab6146 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -226,6 +226,10 @@ Finder Form ---- +* The values of the `FormEvents::*` constants have been updated to match the + constant names. You should only update your application if you relied on the + constant values instead of their names. + * The `choices_as_values` option of the `ChoiceType` has been removed. * Support for data objects that implements both `Traversable` and @@ -326,6 +330,8 @@ Form } ``` + * `FormRendererInterface::setTheme` and `FormRendererEngineInterface::setTheme` have a new optional argument `$useDefaultThemes` with a default value set to `true`. + FrameworkBundle --------------- @@ -662,7 +668,7 @@ Process * Extending `Process::run()`, `Process::mustRun()` and `Process::restart()` is not supported anymore. - + * The `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class have been removed. Profiler From 0d7657b306b79bc2f6657f64d5ee543f0cc6ca26 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Thu, 19 Oct 2017 20:21:06 +0200 Subject: [PATCH 30/92] [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks --- .../FrameworkExtension.php | 40 +------------------ .../Resources/config/serializer.xml | 23 +++++++++++ .../FrameworkExtensionTest.php | 17 -------- 3 files changed, 24 insertions(+), 56 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 234b2d0cb2684..f19884017d4d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -47,15 +47,10 @@ use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Security\Core\Security; -use Symfony\Component\Serializer\Encoder\CsvEncoder; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; -use Symfony\Component\Serializer\Encoder\YamlEncoder; use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; -use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; -use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\ObjectInitializerInterface; @@ -1278,39 +1273,6 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild */ private function registerSerializerConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { - if (class_exists('Symfony\Component\Serializer\Normalizer\DataUriNormalizer')) { - // Run before serializer.normalizer.object - $definition = $container->register('serializer.normalizer.data_uri', DataUriNormalizer::class); - $definition->setPublic(false); - $definition->addTag('serializer.normalizer', array('priority' => -920)); - } - - if (class_exists('Symfony\Component\Serializer\Normalizer\DateTimeNormalizer')) { - // Run before serializer.normalizer.object - $definition = $container->register('serializer.normalizer.datetime', DateTimeNormalizer::class); - $definition->setPublic(false); - $definition->addTag('serializer.normalizer', array('priority' => -910)); - } - - if (class_exists('Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer')) { - // Run before serializer.normalizer.object - $definition = $container->register('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class); - $definition->setPublic(false); - $definition->addTag('serializer.normalizer', array('priority' => -900)); - } - - if (class_exists(YamlEncoder::class) && defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) { - $definition = $container->register('serializer.encoder.yaml', YamlEncoder::class); - $definition->setPublic(false); - $definition->addTag('serializer.encoder'); - } - - if (class_exists(CsvEncoder::class)) { - $definition = $container->register('serializer.encoder.csv', CsvEncoder::class); - $definition->setPublic(false); - $definition->addTag('serializer.encoder'); - } - $loader->load('serializer.xml'); $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); @@ -1367,7 +1329,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $container->getDefinition('serializer.mapping.class_metadata_factory')->replaceArgument( 1, new Reference($config['cache']) ); - } elseif (!$container->getParameter('kernel.debug') && class_exists(CacheClassMetadataFactory::class)) { + } elseif (!$container->getParameter('kernel.debug')) { $cacheMetadataFactory = new Definition( CacheClassMetadataFactory::class, array( diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml index d350091a01820..d49feadf9b904 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml @@ -25,6 +25,21 @@ + + + + + + + + + + + + + + + null @@ -86,6 +101,14 @@ + + + + + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 11795e54cb6bd..44a853dd148eb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -35,7 +35,6 @@ use Symfony\Component\PropertyAccess\PropertyAccessor; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; @@ -728,10 +727,6 @@ public function testRegisterSerializerExtractor() public function testDataUriNormalizerRegistered() { - if (!class_exists('Symfony\Component\Serializer\Normalizer\DataUriNormalizer')) { - $this->markTestSkipped('The DataUriNormalizer has been introduced in the Serializer Component version 3.1.'); - } - $container = $this->createContainerFromFile('full'); $definition = $container->getDefinition('serializer.normalizer.data_uri'); @@ -743,10 +738,6 @@ public function testDataUriNormalizerRegistered() public function testDateTimeNormalizerRegistered() { - if (!class_exists('Symfony\Component\Serializer\Normalizer\DateTimeNormalizer')) { - $this->markTestSkipped('The DateTimeNormalizer has been introduced in the Serializer Component version 3.1.'); - } - $container = $this->createContainerFromFile('full'); $definition = $container->getDefinition('serializer.normalizer.datetime'); @@ -758,10 +749,6 @@ public function testDateTimeNormalizerRegistered() public function testJsonSerializableNormalizerRegistered() { - if (!class_exists('Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer')) { - $this->markTestSkipped('The JsonSerializableNormalizer has been introduced in the Serializer Component version 3.1.'); - } - $container = $this->createContainerFromFile('full'); $definition = $container->getDefinition('serializer.normalizer.json_serializable'); @@ -784,10 +771,6 @@ public function testObjectNormalizerRegistered() public function testSerializerCacheActivated() { - if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { - $this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.'); - } - $container = $this->createContainerFromFile('serializer_enabled'); $this->assertTrue($container->hasDefinition('serializer.mapping.cache_class_metadata_factory')); From ce4cf471b9db43cfccb300bb92716315a99a2e16 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Thu, 19 Oct 2017 19:10:28 -0400 Subject: [PATCH 31/92] Improving annotation loader message --- .../Component/Config/Exception/FileLoaderLoadException.php | 2 +- .../Config/Tests/Exception/FileLoaderLoadExceptionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php b/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php index 564f75ce60b8c..a19069a6aeb0e 100644 --- a/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php +++ b/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php @@ -64,7 +64,7 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr } elseif (null !== $type) { // maybe there is no loader for this specific type if ('annotation' === $type) { - $message .= ' Make sure annotations are enabled.'; + $message .= ' Make sure annotations are installed and enabled.'; } else { $message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type); } diff --git a/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php b/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php index 7c5e167c44086..8363084c19a22 100644 --- a/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php +++ b/src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php @@ -31,7 +31,7 @@ public function testMessageCannotLoadResourceWithType() public function testMessageCannotLoadResourceWithAnnotationType() { $exception = new FileLoaderLoadException('resource', null, null, null, 'annotation'); - $this->assertEquals('Cannot load resource "resource". Make sure annotations are enabled.', $exception->getMessage()); + $this->assertEquals('Cannot load resource "resource". Make sure annotations are installed and enabled.', $exception->getMessage()); } public function testMessageCannotImportResourceFromSource() From ab8f5be40c5996bdc09b4163e077659a859c301d Mon Sep 17 00:00:00 2001 From: DQNEO Date: Thu, 19 Oct 2017 21:29:08 +0900 Subject: [PATCH 32/92] declare argument type --- src/Symfony/Component/HttpFoundation/AcceptHeader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/AcceptHeader.php b/src/Symfony/Component/HttpFoundation/AcceptHeader.php index 99be6768f9b72..c6fd85f9474a1 100644 --- a/src/Symfony/Component/HttpFoundation/AcceptHeader.php +++ b/src/Symfony/Component/HttpFoundation/AcceptHeader.php @@ -153,7 +153,7 @@ public function first() private function sort() { if (!$this->sorted) { - uasort($this->items, function ($a, $b) { + uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) { $qA = $a->getQuality(); $qB = $b->getQuality(); From 11244d51ee45df06d688d7048c12e6cce1dce827 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Fri, 20 Oct 2017 09:39:07 +0200 Subject: [PATCH 33/92] [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml --- .../DependencyInjection/FrameworkExtension.php | 11 ++++------- .../FrameworkBundle/Resources/config/serializer.xml | 5 +++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 5eb3c24dff08f..07df3ff889819 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1540,13 +1540,6 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $definition->addTag('serializer.normalizer', array('priority' => -920)); } - if (class_exists(DateIntervalNormalizer::class)) { - // Run before serializer.normalizer.object - $definition = $container->register('serializer.normalizer.dateinterval', DateIntervalNormalizer::class); - $definition->setPublic(false); - $definition->addTag('serializer.normalizer', array('priority' => -915)); - } - if (class_exists('Symfony\Component\Serializer\Normalizer\DateTimeNormalizer')) { // Run before serializer.normalizer.object $definition = $container->register('serializer.normalizer.datetime', DateTimeNormalizer::class); @@ -1575,6 +1568,10 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $loader->load('serializer.xml'); + if (!class_exists(DateIntervalNormalizer::class)) { + $container->removeDefinition('serializer.normalizer.dateinterval'); + } + $container->getDefinition('serializer.mapping.cache.symfony')->setPrivate(true); $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml index 5fed443127d5a..16edff5446e35 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml @@ -25,6 +25,11 @@ + + + + + null From da617e8624c9c0e5eaa9d342f78a324256de17b2 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 17 Oct 2017 19:11:27 +0200 Subject: [PATCH 34/92] fix deprecation triggering test detection --- .../Bridge/PhpUnit/DeprecationErrorHandler.php | 12 ++++++++++-- .../PhpUnit/Legacy/SymfonyTestsListenerTrait.php | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index a7dbc08e0c6c2..011c28e948f2e 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -116,8 +116,16 @@ public static function register($mode = 0) } if (isset($trace[$i]['object']) || isset($trace[$i]['class'])) { - $class = isset($trace[$i]['object']) ? get_class($trace[$i]['object']) : $trace[$i]['class']; - $method = $trace[$i]['function']; + if (isset($trace[$i]['class']) && in_array($trace[$i]['class'], array('Symfony\Bridge\PhpUnit\SymfonyTestsListener', 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListener'), true)) { + $parsedMsg = unserialize($msg); + $msg = $parsedMsg['deprecation']; + $class = $parsedMsg['class']; + $method = $parsedMsg['method']; + } else { + $class = isset($trace[$i]['object']) ? get_class($trace[$i]['object']) : $trace[$i]['class']; + $method = $trace[$i]['function']; + } + $Test = $UtilPrefix.'Test'; if (0 !== error_reporting()) { diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php index 4d9b48dfc7e56..532ce202af194 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php @@ -264,9 +264,9 @@ public function endTest($test, $time) unlink($this->runsInSeparateProcess); foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) { if ($deprecation[0]) { - trigger_error($deprecation[1], E_USER_DEPRECATED); + trigger_error(serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false))), E_USER_DEPRECATED); } else { - @trigger_error($deprecation[1], E_USER_DEPRECATED); + @trigger_error(serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false))), E_USER_DEPRECATED); } } $this->runsInSeparateProcess = false; From c8012f0448054dd8a7de757b60c375c16f34ac0a Mon Sep 17 00:00:00 2001 From: Lesnykh Ilia Date: Fri, 20 Oct 2017 12:44:28 +0300 Subject: [PATCH 35/92] Remove redundant sprintf arguments. --- src/Symfony/Bridge/Twig/Extension/CodeExtension.php | 4 ++-- src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php | 4 ++-- .../Twig/Tests/Node/SearchAndRenderBlockNodeTest.php | 4 ++-- src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php | 10 +++++----- .../FrameworkBundle/Templating/Helper/CodeHelper.php | 4 ++-- .../Component/BrowserKit/Tests/CookieJarTest.php | 4 ++-- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- src/Symfony/Component/DomCrawler/Form.php | 2 +- .../Component/PropertyAccess/PropertyAccessor.php | 6 +++--- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php index 84e150e3ef1c9..75e386c6ada95 100644 --- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -68,9 +68,9 @@ public function abbrMethod($method) list($class, $method) = explode('::', $method, 2); $result = sprintf('%s::%s()', $this->abbrClass($class), $method); } elseif ('Closure' === $method) { - $result = sprintf('%s', $method, $method); + $result = sprintf('%1$s', $method); } else { - $result = sprintf('%s()', $method, $method); + $result = sprintf('%1$s()', $method); } return $result; diff --git a/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php b/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php index 48bbdab98cf1b..e29863907652d 100644 --- a/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php @@ -74,11 +74,11 @@ public function testCompile() protected function getVariableGetter($name) { if (\PHP_VERSION_ID >= 70000) { - return sprintf('($context["%s"] ?? null)', $name, $name); + return sprintf('($context["%s"] ?? null)', $name); } if (\PHP_VERSION_ID >= 50400) { - return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name); } return sprintf('$this->getContext($context, "%s")', $name); diff --git a/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php b/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php index a603576f30274..bb04c2f245626 100644 --- a/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php @@ -272,11 +272,11 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes() protected function getVariableGetter($name) { if (\PHP_VERSION_ID >= 70000) { - return sprintf('($context["%s"] ?? null)', $name, $name); + return sprintf('($context["%s"] ?? null)', $name); } if (\PHP_VERSION_ID >= 50400) { - return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name); } return sprintf('$this->getContext($context, "%s")', $name); diff --git a/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php b/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php index c4d67fc962666..4b356b2a8d655 100644 --- a/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php @@ -45,11 +45,11 @@ public function testCompileStrict() protected function getVariableGetterWithoutStrictCheck($name) { if (\PHP_VERSION_ID >= 70000) { - return sprintf('($context["%s"] ?? null)', $name, $name); + return sprintf('($context["%s"] ?? null)', $name); } if (\PHP_VERSION_ID >= 50400) { - return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); + return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name); } return sprintf('$this->getContext($context, "%s", true)', $name); @@ -58,15 +58,15 @@ protected function getVariableGetterWithoutStrictCheck($name) protected function getVariableGetterWithStrictCheck($name) { if (Environment::MAJOR_VERSION >= 2) { - return sprintf('(isset($context["%s"]) || array_key_exists("%s", $context) ? $context["%s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%s" does not exist.\', 0, $this->getSourceContext()); })())', $name, $name, $name, $name); + return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->getSourceContext()); })())', $name); } if (\PHP_VERSION_ID >= 70000) { - return sprintf('($context["%s"] ?? $this->getContext($context, "%s"))', $name, $name, $name); + return sprintf('($context["%s"] ?? $this->getContext($context, "%1$s"))', $name); } if (\PHP_VERSION_ID >= 50400) { - return sprintf('(isset($context["%s"]) ? $context["%s"] : $this->getContext($context, "%s"))', $name, $name, $name); + return sprintf('(isset($context["%s"]) ? $context["%1$s"] : $this->getContext($context, "%1$s"))', $name); } return sprintf('$this->getContext($context, "%s")', $name); diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php index aac7ec85cc2f7..b27c6663c766d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php @@ -60,9 +60,9 @@ public function abbrMethod($method) list($class, $method) = explode('::', $method, 2); $result = sprintf('%s::%s()', $this->abbrClass($class), $method); } elseif ('Closure' === $method) { - $result = sprintf('%s', $method, $method); + $result = sprintf('%1$s', $method); } else { - $result = sprintf('%s()', $method, $method); + $result = sprintf('%1$s()', $method); } return $result; diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php index ae9f6a7ae5c9c..9c9e122e86b71 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\BrowserKit\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\Cookie; +use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\Response; class CookieJarTest extends TestCase @@ -94,7 +94,7 @@ public function testUpdateFromSetCookieWithMultipleCookies() { $timestamp = time() + 3600; $date = gmdate('D, d M Y H:i:s \G\M\T', $timestamp); - $setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%s', $date, $date)); + $setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%1$s', $date)); $cookieJar = new CookieJar(); $cookieJar->updateFromSetCookie($setCookies); diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 0db4a442a8b69..aa711bf1a45e7 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -684,7 +684,7 @@ public function selectLink($value) public function selectButton($value) { $translate = 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'; - $xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, $translate, static::xpathLiteral(' '.$value.' ')). + $xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%1$s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, static::xpathLiteral(' '.$value.' ')). sprintf('or (contains(%s, "image") and contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)) or @id=%s or @name=%s] ', $translate, static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)). sprintf('| descendant-or-self::button[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) or @id=%s or @name=%s]', static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)); diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index 2cff979ed8ef0..1388bfc6ea168 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -437,7 +437,7 @@ private function initialize() // corresponding elements are either descendants or have a matching HTML5 form attribute $formId = Crawler::xpathLiteral($this->node->getAttribute('id')); - $fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%s] | descendant::textarea[@form=%s] | descendant::select[@form=%s] | //form[@id=%s]//input[not(@form)] | //form[@id=%s]//button[not(@form)] | //form[@id=%s]//textarea[not(@form)] | //form[@id=%s]//select[not(@form)]', $formId, $formId, $formId, $formId, $formId, $formId, $formId, $formId)); + $fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)]', $formId)); foreach ($fieldNodes as $node) { $this->addField($node); } diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 03dc617782f2d..06198b4a3f720 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -13,8 +13,8 @@ use Symfony\Component\PropertyAccess\Exception\AccessException; use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; +use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; /** @@ -453,7 +453,7 @@ private function readIndex($zval, $index) private function readProperty($zval, $property) { if (!is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%s]" instead.', $property, $property)); + throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%1$s]" instead.', $property)); } $result = self::$resultProto; @@ -595,7 +595,7 @@ private function writeIndex($zval, $index, $value) private function writeProperty($zval, $property, $value) { if (!is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%s]" instead?', $property, $property)); + throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%1$s]" instead?', $property)); } $object = $zval[self::VALUE]; From 6e18b56b779ea14802c4b0c41f832c3731a6ab51 Mon Sep 17 00:00:00 2001 From: Gunnstein Lye Date: Fri, 20 Oct 2017 15:38:08 +0200 Subject: [PATCH 36/92] [Security] Fixed auth provider authenticate() cannot return void The AuthenticationManagerInterface requires that authenticate() must return a TokenInterface, never null. Several authentication providers are violating this. Changed to throw exception instead. --- .../Provider/AnonymousAuthenticationProvider.php | 3 ++- .../Provider/PreAuthenticatedAuthenticationProvider.php | 3 ++- .../Provider/RememberMeAuthenticationProvider.php | 3 ++- .../Authentication/Provider/UserAuthenticationProvider.php | 2 +- .../Provider/AnonymousAuthenticationProviderTest.php | 6 +++++- .../Provider/PreAuthenticatedAuthenticationProviderTest.php | 6 +++++- .../Provider/RememberMeAuthenticationProviderTest.php | 6 +++++- .../Provider/UserAuthenticationProviderTest.php | 6 +++++- 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php index 882443a013970..39e6ad8005435 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Core\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; @@ -38,7 +39,7 @@ public function __construct($key) public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { - return; + throw new AuthenticationException('The token is not supported by this authentication provider.'); } if ($this->key !== $token->getKey()) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php index b871f1f5a3591..d03fcb460fe38 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -13,6 +13,7 @@ use Symfony\Component\Security\Core\User\UserProviderInterface; use Symfony\Component\Security\Core\User\UserCheckerInterface; +use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; @@ -51,7 +52,7 @@ public function __construct(UserProviderInterface $userProvider, UserCheckerInte public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { - return; + throw new AuthenticationException('The token is not supported by this authentication provider.'); } if (!$user = $token->getUser()) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php index 1e51f6b8fdcce..0342c26f13715 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php @@ -14,6 +14,7 @@ use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\BadCredentialsException; class RememberMeAuthenticationProvider implements AuthenticationProviderInterface @@ -40,7 +41,7 @@ public function __construct(UserCheckerInterface $userChecker, $key, $providerKe public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { - return; + throw new AuthenticationException('The token is not supported by this authentication provider.'); } if ($this->key !== $token->getKey()) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php index 7527128cc7d3f..28d057ef3b251 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php @@ -56,7 +56,7 @@ public function __construct(UserCheckerInterface $userChecker, $providerKey, $hi public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { - return; + throw new AuthenticationException('The token is not supported by this authentication provider.'); } $username = $token->getUsername(); diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php index b7fa4d6b54949..a7367e320b4d2 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php @@ -24,11 +24,15 @@ public function testSupports() $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); } + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedExceptionMessage The token is not supported by this authentication provider. + */ public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider('foo'); - $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + $provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); } /** diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php index 5a78d0ebb9119..5a6b04d5b4862 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php @@ -36,11 +36,15 @@ public function testSupports() $this->assertFalse($provider->supports($token)); } + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedExceptionMessage The token is not supported by this authentication provider. + */ public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider(); - $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + $provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); } /** diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php index 241076755e768..733123fbc026a 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -26,12 +26,16 @@ public function testSupports() $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); } + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedExceptionMessage The token is not supported by this authentication provider. + */ public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider(); $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); - $this->assertNull($provider->authenticate($token)); + $provider->authenticate($token); } /** diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php index da6136f22151f..a08ca3f813c87 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -29,11 +29,15 @@ public function testSupports() $this->assertFalse($provider->supports($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); } + /** + * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException + * @expectedExceptionMessage The token is not supported by this authentication provider. + */ public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider(); - $this->assertNull($provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock())); + $provider->authenticate($this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); } /** From 6610c25cd64b85c3b41eeabddfefe0e7a70ae030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 20 Oct 2017 09:35:09 +0200 Subject: [PATCH 37/92] [Routing] Fix resource miss --- .../Component/Routing/RouteCollectionBuilder.php | 6 +++--- .../Routing/Tests/RouteCollectionBuilderTest.php | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/src/Symfony/Component/Routing/RouteCollectionBuilder.php index 2c9e031723871..bf996ea4e049f 100644 --- a/src/Symfony/Component/Routing/RouteCollectionBuilder.php +++ b/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -312,10 +312,10 @@ public function build() $routeCollection->addCollection($subCollection); } + } - foreach ($this->resources as $resource) { - $routeCollection->addResource($resource); - } + foreach ($this->resources as $resource) { + $routeCollection->addResource($resource); } return $routeCollection; diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php index 058a100d1f689..6fc592affc607 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -12,7 +12,9 @@ namespace Symfony\Component\Routing\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Loader\YamlFileLoader; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouteCollectionBuilder; @@ -59,7 +61,18 @@ public function testImport() $this->assertCount(1, $addedCollection->getResources()); // make sure the routes were imported into the top-level builder + $routeCollection = $routes->build(); $this->assertCount(1, $routes->build()); + $this->assertCount(1, $routeCollection->getResources()); + } + + public function testImportAddResources() + { + $routeCollectionBuilder = new RouteCollectionBuilder(new YamlFileLoader(new FileLocator(array(__DIR__.'/Fixtures/')))); + $routeCollectionBuilder->import('file_resource.yml'); + $routeCollection = $routeCollectionBuilder->build(); + + $this->assertCount(1, $routeCollection->getResources()); } /** From 9e758470909646448ba0e75b2f4da523866a5cfa Mon Sep 17 00:00:00 2001 From: "hubert.lenoir" Date: Thu, 19 Oct 2017 11:03:54 +0200 Subject: [PATCH 38/92] [FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command --- .../FrameworkBundle/Command/WorkflowDumpCommand.php | 10 ---------- .../DependencyInjection/FrameworkExtension.php | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php index 9923f657794f8..3d72226c677c3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php @@ -27,16 +27,6 @@ class WorkflowDumpCommand extends ContainerAwareCommand { protected static $defaultName = 'workflow:dump'; - /** - * {@inheritdoc} - * - * BC to be removed in 4.0 - */ - public function isEnabled() - { - return $this->getContainer()->has('workflow.registry'); - } - /** * {@inheritdoc} */ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 5eb3c24dff08f..fd5dd49e9ddc0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -624,9 +624,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $ private function registerWorkflowConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$config['enabled']) { - if (!class_exists(Workflow\Workflow::class)) { - $container->removeDefinition(WorkflowDumpCommand::class); - } + $container->removeDefinition(WorkflowDumpCommand::class); return; } From e64baf5d4151f7c39e6fc9a1b85c366356967762 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:28:08 -0700 Subject: [PATCH 39/92] Fix phpdoc and unnecessary sprintf --- .../Loader/Configurator/DefaultsConfigurator.php | 2 +- .../Routing/Loader/Configurator/CollectionConfigurator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php index 4c3f1dc0f8c31..adf294b9928d9 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php @@ -40,7 +40,7 @@ class DefaultsConfigurator extends AbstractServiceConfigurator final public function tag($name, array $attributes = array()) { if (!is_string($name) || '' === $name) { - throw new InvalidArgumentException(sprintf('The tag name in "_defaults" must be a non-empty string.')); + throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); } foreach ($attributes as $attribute => $value) { diff --git a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php index 67d5c77de5459..38d86cb895cb4 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php @@ -42,7 +42,7 @@ public function __destruct() * Adds a route. * * @param string $name - * @param string $value + * @param string $path * * @return RouteConfigurator */ From d0ce099b409d5ed152b653d78e7256736ce60f02 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:49:04 -0700 Subject: [PATCH 40/92] Fix an invalid printf format string in symfony 4 test case `%1$::` should be `%1$s::` (`1$` means the first parameter, `s` meaning string) Detected by static analysis --- src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index a400e1b377634..87d91f79acbe6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -38,7 +38,7 @@ abstract class KernelTestCase extends TestCase protected static function getKernelClass() { if (!isset($_SERVER['KERNEL_CLASS']) && !isset($_ENV['KERNEL_CLASS'])) { - throw new \LogicException(sprintf('You must set the KERNEL_CLASS environment variable to the fully-qualified class name of your Kernel in phpunit.xml / phpunit.xml.dist or override the %1$::createKernel() or %1$::getKernelClass() method.', static::class)); + throw new \LogicException(sprintf('You must set the KERNEL_CLASS environment variable to the fully-qualified class name of your Kernel in phpunit.xml / phpunit.xml.dist or override the %1$s::createKernel() or %1$s::getKernelClass() method.', static::class)); } if (!class_exists($class = $_SERVER['KERNEL_CLASS'] ?? $_ENV['KERNEL_CLASS'])) { From 3cee7a65ded33882b196489e6a5f22cb73ef6cf0 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Thu, 19 Oct 2017 20:59:09 +0200 Subject: [PATCH 41/92] [DI] Register default env var provided types --- .../Compiler/RegisterEnvVarProcessorsPass.php | 13 ++++++++++--- .../Compiler/RegisterEnvVarProcessorsPassTest.php | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php index 38349f06569a6..b99c252fef8d0 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php @@ -13,6 +13,7 @@ use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\EnvVarProcessor; use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; @@ -45,10 +46,16 @@ public function process(ContainerBuilder $container) } } - if ($processors) { - if ($bag instanceof EnvPlaceholderParameterBag) { - $bag->setProvidedTypes($types); + if ($bag instanceof EnvPlaceholderParameterBag) { + foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) { + if (!isset($types[$prefix])) { + $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class); + } } + $bag->setProvidedTypes($types); + } + + if ($processors) { $container->register('container.env_var_processors_locator', ServiceLocator::class) ->setPublic(true) ->setArguments(array($processors)) diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php index dc3a1f1834f5e..d807a6fa41ba9 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php @@ -28,7 +28,20 @@ public function testSimpleProcessor() $this->assertTrue($container->has('container.env_var_processors_locator')); $this->assertInstanceof(SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo')); - $this->assertSame(array('foo' => array('string')), $container->getParameterBag()->getProvidedTypes()); + $expected = array( + 'foo' => array('string'), + 'base64' => array('string'), + 'bool' => array('bool'), + 'const' => array('bool', 'int', 'float', 'string', 'array'), + 'file' => array('string'), + 'float' => array('float'), + 'int' => array('int'), + 'json' => array('array'), + 'resolve' => array('string'), + 'string' => array('string'), + ); + + $this->assertSame($expected, $container->getParameterBag()->getProvidedTypes()); } public function testNoProcessor() From f3585335d9e72b89faa657f077b7c2cb4028629c Mon Sep 17 00:00:00 2001 From: Shawn Iwinski Date: Sat, 21 Oct 2017 16:09:18 -0400 Subject: [PATCH 42/92] [HttpKernel] Remove composer require-dev "symfony/class-loader" --- src/Symfony/Component/HttpKernel/composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 79b6848a47517..9630dbdd42c93 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -24,7 +24,6 @@ }, "require-dev": { "symfony/browser-kit": "~3.4|~4.0", - "symfony/class-loader": "~3.4|~4.0", "symfony/config": "~3.4|~4.0", "symfony/console": "~3.4|~4.0", "symfony/css-selector": "~3.4|~4.0", From 44a21cd1951214ba9f554637888b41eede2cacab Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:28:08 -0700 Subject: [PATCH 43/92] nit: Fix phpdoc inconsistency and unreachable statement (detected by static analysis) --- src/Symfony/Component/Console/Helper/Table.php | 2 +- src/Symfony/Component/Translation/PluralizationRules.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 11bed884c2aca..59a1723b8809f 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -46,7 +46,7 @@ class Table /** * Number of columns cache. * - * @var array + * @var int */ private $numberOfColumns; diff --git a/src/Symfony/Component/Translation/PluralizationRules.php b/src/Symfony/Component/Translation/PluralizationRules.php index 847ffe3c44f76..e5ece89620b7f 100644 --- a/src/Symfony/Component/Translation/PluralizationRules.php +++ b/src/Symfony/Component/Translation/PluralizationRules.php @@ -71,7 +71,6 @@ public static function get($number, $locale) case 'vi': case 'zh': return 0; - break; case 'af': case 'bn': From 7a7bda7de757b2c28773e26a1604057521a94a4a Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:28:08 -0700 Subject: [PATCH 44/92] Remove inapplicable phpdoc comment --- .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 1b35f8c565fff..c9b21f032b405 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -377,9 +377,6 @@ protected function describeCallable($callable, array $options = array()) $this->writeText($this->formatCallable($callable), $options); } - /** - * @param array $array - */ private function renderEventListenerTable(EventDispatcherInterface $eventDispatcher, $event, array $eventListeners, SymfonyStyle $io) { $tableHeaders = array('Order', 'Callable', 'Priority'); From c9ddd68ea63c5397a3a49358620a044e4e659a07 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:28:08 -0700 Subject: [PATCH 45/92] Fix phpdoc inconsistencies, simplify no-op sprintf. (detected by static analysis) --- src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php | 2 +- .../Component/HttpKernel/Controller/ControllerResolver.php | 2 +- .../Serializer/Normalizer/AbstractObjectNormalizer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php index 2d19857c96a00..54c12f16d4cb5 100644 --- a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @@ -85,7 +85,7 @@ public function hasMarkedPlace($subject, $placeName, $name = null) * Returns marked places. * * @param object $subject A subject - * @param string $placesNameOnly If true, returns only places name. If false returns the raw representation + * @param bool $placesNameOnly If true, returns only places name. If false returns the raw representation * @param string $name A workflow name * * @return string[]|int[] diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 7d93cc56c7563..ddac84a7fef94 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -219,7 +219,7 @@ private function getControllerError($callable) } if (2 !== count($callable)) { - return sprintf('Invalid format for controller, expected array(controller, method) or controller::method.'); + return 'Invalid format for controller, expected array(controller, method) or controller::method.'; } list($controller, $method) = $callable; diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index a8c51de7ce1c9..c1b2382a89996 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -108,7 +108,7 @@ public function normalize($object, $format = null, array $context = array()) * * @return string[] */ - protected function getAttributes($object, $format = null, array $context) + protected function getAttributes($object, $format, array $context) { $class = get_class($object); $key = $class.'-'.$context['cache_key']; From 3cdf4ebba436f7b61c154ecba2fa3f7cd6032ecf Mon Sep 17 00:00:00 2001 From: Shawn Iwinski Date: Sat, 21 Oct 2017 16:32:46 -0400 Subject: [PATCH 46/92] Add "doctrine/annotations" to top-level composer.json Adding to top-level composer.json as require-dev since it is already dev-required by the following: * src/Symfony/Bundle/FrameworkBundle/composer.json: "doctrine/annotations": "~1.0" * src/Symfony/Bundle/TwigBundle/composer.json: "doctrine/annotations": "~1.0" * src/Symfony/Component/PropertyInfo/composer.json: "doctrine/annotations": "~1.0" * src/Symfony/Component/Routing/composer.json: "doctrine/annotations": "~1.0", * src/Symfony/Component/Serializer/composer.json: "doctrine/annotations": "~1.0", * src/Symfony/Component/Validator/composer.json: "doctrine/annotations": "~1.0", --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index a7f3bbf9078d9..f067b4bbe20b2 100644 --- a/composer.json +++ b/composer.json @@ -72,6 +72,7 @@ "symfony/yaml": "self.version" }, "require-dev": { + "doctrine/annotations": "~1.0", "doctrine/data-fixtures": "1.0.*", "doctrine/dbal": "~2.4", "doctrine/orm": "~2.4,>=2.4.5", From b93ed8d8fa12e5d4cbcfe9b6e8cdc88bedc1744d Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Sun, 22 Oct 2017 01:30:07 +0200 Subject: [PATCH 47/92] [FrameworkBundle][Serializer] Remove outdated condition --- .../FrameworkBundle/Tests/Functional/SerializerTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php index ee79850c47dfb..bc7dc12ebfbca 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php @@ -11,8 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; - /** * @author Kévin Dunglas */ @@ -20,10 +18,6 @@ class SerializerTest extends WebTestCase { public function testDeserializeArrayOfObject() { - if (!class_exists(DataUriNormalizer::class)) { - $this->markTestSkipped('This test is only applicable when using the Symfony Serializer Component version 3.1 or superior.'); - } - static::bootKernel(array('test_case' => 'Serializer')); $container = static::$kernel->getContainer(); From 0c0f1da67df4fc6ef6b0fc31e56806338aa72dcd Mon Sep 17 00:00:00 2001 From: Alexander Kurilo Date: Sun, 22 Oct 2017 13:11:39 +0300 Subject: [PATCH 48/92] Escape trailing \ in QuestionHelper autocompletion Fixes symfony/symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion --- .../Console/Helper/QuestionHelper.php | 3 +- .../Tests/Helper/QuestionHelperTest.php | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 4cdecfd41a49a..1edc2d68cbbcd 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -303,7 +304,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu // Save cursor position $output->write("\0337"); // Write highlighted text - $output->write(''.substr($matches[$ofs], $i).''); + $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $i)).''); // Restore cursor position $output->write("\0338"); } diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index 4fb462cc1048d..69a2256efad2b 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -156,6 +156,46 @@ public function testAskWithAutocompleteWithNonSequentialKeys() $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); } + public function testAutocompleteWithTrailingBackslash() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + $inputStream = $this->getInputStream('E'); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($inputStream); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new Question(''); + $expectedCompletion = 'ExampleNamespace\\'; + $question->setAutocompleterValues(array($expectedCompletion)); + + $output = $this->createOutputInterface(); + $dialog->ask($this->createInputInterfaceMock(), $output, $question); + + $outputStream = $output->getStream(); + rewind($outputStream); + $actualOutput = stream_get_contents($outputStream); + + // Shell control (esc) sequences are not so important: we only care that + // tag is interpreted correctly and replaced + $irrelevantEscSequences = array( + "\0337" => '', // Save cursor position + "\0338" => '', // Restore cursor position + "\033[K" => '', // Clear line from cursor till the end + ); + + $importantActualOutput = strtr($actualOutput, $irrelevantEscSequences); + + // Remove colors (e.g. "\033[30m", "\033[31;41m") + $importantActualOutput = preg_replace('/\033\[\d+(;\d+)?m/', '', $importantActualOutput); + + $this->assertEquals($expectedCompletion, $importantActualOutput); + } + public function testAskHiddenResponse() { if ('\\' === DIRECTORY_SEPARATOR) { From 1cfd7de0dcd6003d8b8c8fda47087c55d352820b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 22 Oct 2017 09:49:36 -0700 Subject: [PATCH 49/92] [2.8] Fix some docblocks --- src/Symfony/Component/Routing/RouteCollectionBuilder.php | 3 --- .../Component/Security/Guard/GuardAuthenticatorHandler.php | 3 --- .../Serializer/Tests/Encoder/ChainEncoderTest.php | 7 ++++++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/src/Symfony/Component/Routing/RouteCollectionBuilder.php index bf996ea4e049f..4503eca5a85b3 100644 --- a/src/Symfony/Component/Routing/RouteCollectionBuilder.php +++ b/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -38,9 +38,6 @@ class RouteCollectionBuilder private $methods; private $resources = array(); - /** - * @param LoaderInterface $loader - */ public function __construct(LoaderInterface $loader = null) { $this->loader = $loader; diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index 5e1351dcc25ee..507e5362123b6 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -44,9 +44,6 @@ public function __construct(TokenStorageInterface $tokenStorage, EventDispatcher /** * Authenticates the given token in the system. - * - * @param TokenInterface $token - * @param Request $request */ public function authenticateWithToken(TokenInterface $token, Request $request) { diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php index 2bdce84080fe1..96dce432b7ffd 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Encoder\ChainEncoder; +use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; class ChainEncoderTest extends TestCase @@ -121,10 +122,14 @@ class ChainNormalizationAwareEncoder extends ChainEncoder implements Normalizati { } -class NormalizationAwareEncoder implements NormalizationAwareInterface +class NormalizationAwareEncoder implements EncoderInterface, NormalizationAwareInterface { public function supportsEncoding($format) { return true; } + + public function encode($data, $format, array $context = array()) + { + } } From a4a0ae20ca25f089f31eb274ac4b1cd55584e534 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 23 Oct 2017 17:00:45 +0200 Subject: [PATCH 50/92] [DI] Handle container.autowiring.strict_mode to opt-out from legacy autowiring --- .../DependencyInjection/Compiler/AutowirePass.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 98293a3198223..0b7305d5a8ada 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -34,6 +34,7 @@ class AutowirePass extends AbstractRecursivePass private $lastFailure; private $throwOnAutowiringException; private $autowiringExceptions = array(); + private $strictMode; /** * @param bool $throwOnAutowireException Errors can be retrieved via Definition::getErrors() @@ -62,6 +63,7 @@ public function process(ContainerBuilder $container) { // clear out any possibly stored exceptions from before $this->autowiringExceptions = array(); + $this->strictMode = $container->hasParameter('container.autowiring.strict_mode') && $container->getParameter('container.autowiring.strict_mode'); try { parent::process($container); @@ -290,7 +292,7 @@ private function getAutowiredReference(TypedReference $reference, $deprecationMe return new TypedReference($this->types[$type], $type); } - if (isset($this->types[$type])) { + if (!$this->strictMode && isset($this->types[$type])) { $message = 'Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won\'t be supported in version 4.0.'; if ($aliasSuggestion = $this->getAliasesSuggestionForType($type = $reference->getType(), $deprecationMessage)) { $message .= ' '.$aliasSuggestion; @@ -311,7 +313,9 @@ private function getAutowiredReference(TypedReference $reference, $deprecationMe return $this->autowired[$type] ? new TypedReference($this->autowired[$type], $type) : null; } - return $this->createAutowiredDefinition($type); + if (!$this->strictMode) { + return $this->createAutowiredDefinition($type); + } } /** From 0c9edaf33628071b74fd86a10f8149b32666b123 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 22 Oct 2017 09:42:21 -0700 Subject: [PATCH 51/92] [DI] minor docblock fixes --- .../Doctrine/CacheWarmer/ProxyCacheWarmer.php | 3 - .../Doctrine/ContainerAwareEventManager.php | 2 - .../DataFixtures/ContainerAwareLoader.php | 6 - .../AbstractDoctrineExtension.php | 13 -- .../CompilerPass/RegisterMappingsPass.php | 10 -- .../Form/ChoiceList/EntityChoiceList.php | 4 - .../CollectionToArrayTransformer.php | 2 - .../Bridge/Doctrine/Form/Type/EntityType.php | 2 - .../Bridge/Doctrine/Logger/DbalLogger.php | 4 - .../RememberMe/DoctrineTokenProvider.php | 5 - .../DoctrineExtensionTest.php | 2 - .../Monolog/Handler/ChromePhpHandler.php | 3 - .../Bridge/Monolog/Handler/ConsoleHandler.php | 13 -- .../Bridge/Monolog/Handler/FirePHPHandler.php | 3 - .../Monolog/Handler/SwiftMailerHandler.php | 7 -- .../LazyProxy/PhpDumper/ProxyDumper.php | 4 - .../Twig/Extension/HttpKernelExtension.php | 3 - src/Symfony/Bridge/Twig/NodeVisitor/Scope.php | 14 --- .../NodeVisitor/TranslationNodeVisitor.php | 2 - .../Twig/TokenParser/FormThemeTokenParser.php | 2 - .../TokenParser/TransChoiceTokenParser.php | 2 - .../TransDefaultDomainTokenParser.php | 2 - .../Twig/TokenParser/TransTokenParser.php | 2 - .../CacheWarmer/RouterCacheWarmer.php | 3 - .../CacheWarmer/TemplatePathsCacheWarmer.php | 4 - .../Command/ContainerDebugCommand.php | 2 - .../FrameworkBundle/Console/Application.php | 6 - .../Console/Descriptor/Descriptor.php | 27 ----- .../Console/Descriptor/JsonDescriptor.php | 7 -- .../Console/Descriptor/MarkdownDescriptor.php | 2 - .../Console/Descriptor/TextDescriptor.php | 2 - .../Console/Descriptor/XmlDescriptor.php | 9 -- .../Controller/ControllerNameParser.php | 3 - .../Controller/ControllerResolver.php | 5 - .../FrameworkExtension.php | 111 +----------------- .../Routing/DelegatingLoader.php | 5 - .../Bundle/FrameworkBundle/Routing/Router.php | 2 - .../FrameworkBundle/Templating/Debugger.php | 3 - .../Templating/DelegatingEngine.php | 4 - .../Templating/GlobalVariables.php | 3 - .../Templating/Helper/ActionsHelper.php | 3 - .../Templating/Helper/FormHelper.php | 8 -- .../Templating/Helper/RouterHelper.php | 3 - .../Templating/Helper/TranslatorHelper.php | 3 - .../Templating/Loader/FilesystemLoader.php | 3 - .../Templating/Loader/TemplateLocator.php | 2 - .../FrameworkBundle/Templating/PhpEngine.php | 6 - .../Templating/TemplateNameParser.php | 3 - .../Templating/TimedPhpEngine.php | 7 -- .../FrameworkBundle/Test/KernelTestCase.php | 4 - .../Tests/Routing/RouterTest.php | 2 - .../Translation/PhpExtractor.php | 4 - .../Validator/ConstraintValidatorFactory.php | 2 - .../DataCollector/SecurityDataCollector.php | 4 - .../DependencyInjection/MainConfiguration.php | 4 - .../Security/Factory/AbstractFactory.php | 2 - .../DependencyInjection/SecurityExtension.php | 5 +- .../MainConfigurationTest.php | 2 - .../Form/UserLoginFormType.php | 3 - .../CacheWarmer/TemplateCacheCacheWarmer.php | 4 - .../Controller/ExceptionController.php | 4 - .../DependencyInjection/TwigExtension.php | 3 - .../TwigBundle/Loader/FilesystemLoader.php | 4 - .../TokenParser/RenderTokenParser.php | 2 - .../Controller/ProfilerController.php | 4 - .../Profiler/TemplateManager.php | 4 - src/Symfony/Component/Asset/Packages.php | 5 - src/Symfony/Component/BrowserKit/Client.php | 2 - src/Symfony/Component/BrowserKit/Cookie.php | 2 - .../Component/BrowserKit/CookieJar.php | 5 - src/Symfony/Component/BrowserKit/History.php | 2 - .../ClassLoader/ClassCollectionLoader.php | 2 - .../Component/ClassLoader/Psr4ClassLoader.php | 3 - .../Component/Config/Definition/ArrayNode.php | 2 - .../Builder/ArrayNodeDefinition.php | 8 -- .../Definition/Builder/EnumNodeDefinition.php | 2 - .../Config/Definition/Builder/ExprBuilder.php | 13 -- .../Definition/Builder/MergeBuilder.php | 3 - .../Config/Definition/Builder/NodeBuilder.php | 4 - .../Definition/Builder/NodeDefinition.php | 6 - .../Builder/NormalizationBuilder.php | 5 - .../Definition/Builder/ValidationBuilder.php | 5 - .../Config/Definition/PrototypedArrayNode.php | 4 - .../Config/Loader/DelegatingLoader.php | 3 - .../Component/Config/Loader/FileLoader.php | 9 -- .../Config/Loader/LoaderInterface.php | 2 - .../Config/Loader/LoaderResolver.php | 5 - src/Symfony/Component/Console/Application.php | 30 ----- .../Component/Console/Command/Command.php | 22 ---- .../Component/Console/Command/HelpCommand.php | 5 - .../Descriptor/ApplicationDescription.php | 13 -- .../Console/Descriptor/Descriptor.php | 15 --- .../Console/Descriptor/JsonDescriptor.php | 11 -- .../Console/Descriptor/TextDescriptor.php | 2 +- .../Console/Descriptor/XmlDescriptor.php | 13 -- .../Formatter/OutputFormatterStyle.php | 4 +- .../OutputFormatterStyleInterface.php | 2 - .../Formatter/OutputFormatterStyleStack.php | 12 -- .../Component/Console/Helper/Helper.php | 8 +- .../Console/Helper/HelperInterface.php | 2 - .../Component/Console/Helper/HelperSet.php | 5 - .../Console/Helper/QuestionHelper.php | 13 -- .../Component/Console/Helper/Table.php | 18 +-- .../Component/Console/Helper/TableCell.php | 7 -- .../Component/Console/Helper/TableHelper.php | 2 - .../Console/Helper/TableSeparator.php | 3 - .../Component/Console/Input/ArrayInput.php | 4 - src/Symfony/Component/Console/Input/Input.php | 6 - .../Console/Input/InputDefinition.php | 10 -- .../Console/Input/InputInterface.php | 2 - .../Component/Console/Input/InputOption.php | 2 - .../Console/Logger/ConsoleLogger.php | 14 --- .../Console/Output/ConsoleOutputInterface.php | 5 - .../Console/Output/OutputInterface.php | 5 - src/Symfony/Component/Console/Shell.php | 2 - .../Component/Console/Style/OutputStyle.php | 3 - .../Console/Style/StyleInterface.php | 5 - .../Component/Console/Style/SymfonyStyle.php | 6 - .../Console/Tester/ApplicationTester.php | 3 - .../Console/Tester/CommandTester.php | 3 - .../CssSelector/Node/AttributeNode.php | 19 --- .../Component/CssSelector/Node/ClassNode.php | 7 -- .../CssSelector/Node/CombinedSelectorNode.php | 11 -- .../CssSelector/Node/FunctionNode.php | 11 -- .../Component/CssSelector/Node/HashNode.php | 7 -- .../CssSelector/Node/NegationNode.php | 11 -- .../Component/CssSelector/Node/PseudoNode.php | 7 -- .../CssSelector/Node/SelectorNode.php | 7 -- .../CssSelector/Node/Specificity.php | 15 --- .../Parser/Handler/HandlerInterface.php | 3 - .../Parser/Handler/HashHandler.php | 11 -- .../Parser/Handler/IdentifierHandler.php | 11 -- .../Parser/Handler/NumberHandler.php | 6 - .../Parser/Handler/StringHandler.php | 11 -- .../Component/CssSelector/Parser/Parser.php | 15 --- .../Component/CssSelector/Parser/Token.php | 2 - .../CssSelector/Parser/TokenStream.php | 2 - .../Parser/Tokenizer/Tokenizer.php | 2 - .../Parser/Tokenizer/TokenizerEscaping.php | 6 - .../XPath/Extension/CombinationExtension.php | 12 -- .../XPath/Extension/FunctionExtension.php | 15 --- .../XPath/Extension/HtmlExtension.php | 22 ---- .../XPath/Extension/NodeExtension.php | 26 ---- .../XPath/Extension/PseudoClassExtension.php | 16 --- .../CssSelector/XPath/Translator.php | 33 +----- .../Component/Debug/ExceptionHandler.php | 6 - .../Compiler/AnalyzeServiceReferencesPass.php | 2 - .../Compiler/CheckCircularReferencesPass.php | 2 - .../Compiler/CheckDefinitionValidityPass.php | 2 - .../Compiler/CheckReferenceValidityPass.php | 5 - .../DependencyInjection/Compiler/Compiler.php | 2 - .../Compiler/CompilerPassInterface.php | 2 - .../Compiler/InlineServiceDefinitionsPass.php | 2 - .../Compiler/PassConfig.php | 5 - .../RemoveAbstractDefinitionsPass.php | 2 - .../Compiler/RemovePrivateAliasesPass.php | 2 - .../Compiler/RemoveUnusedDefinitionsPass.php | 2 - .../Compiler/RepeatablePassInterface.php | 5 - .../Compiler/RepeatedPass.php | 2 - .../ReplaceAliasByActualDefinitionPass.php | 2 - .../ResolveDefinitionTemplatesPass.php | 2 - .../Compiler/ResolveInvalidReferencesPass.php | 2 - .../ResolveParameterPlaceHoldersPass.php | 2 - .../ResolveReferencesToAliasesPass.php | 2 - .../Compiler/ServiceReferenceGraph.php | 9 +- .../Compiler/ServiceReferenceGraphEdge.php | 2 +- .../Compiler/ServiceReferenceGraphNode.php | 10 -- .../DependencyInjection/Container.php | 9 -- .../ContainerAwareInterface.php | 5 - .../ContainerAwareTrait.php | 5 - .../DependencyInjection/ContainerBuilder.php | 19 --- .../DependencyInjection/Definition.php | 8 -- .../DependencyInjection/Dumper/Dumper.php | 3 - .../DependencyInjection/Dumper/PhpDumper.php | 20 +--- .../DependencyInjection/Dumper/XmlDumper.php | 20 ---- .../DependencyInjection/Dumper/YamlDumper.php | 8 +- .../ConfigurationExtensionInterface.php | 3 - .../Extension/Extension.php | 3 - .../Extension/ExtensionInterface.php | 3 - .../Extension/PrependExtensionInterface.php | 2 - .../LazyProxy/PhpDumper/DumperInterface.php | 4 - .../Loader/ClosureLoader.php | 3 - .../DependencyInjection/Loader/FileLoader.php | 4 - .../Loader/YamlFileLoader.php | 2 - src/Symfony/Component/DomCrawler/Form.php | 4 - .../DomCrawler/FormFieldRegistry.php | 2 - .../ContainerAwareEventDispatcher.php | 12 -- .../Debug/TraceableEventDispatcher.php | 5 - .../EventDispatcherInterface.php | 7 -- .../EventDispatcher/GenericEvent.php | 2 - .../ImmutableEventDispatcher.php | 10 -- .../Component/ExpressionLanguage/Compiler.php | 2 - .../ExpressionLanguage/Node/ArrayNode.php | 2 - .../ParserCache/ArrayParserCache.php | 3 - .../Finder/Adapter/AdapterInterface.php | 22 ---- .../Exception/AdapterFailureException.php | 3 - .../ShellCommandFailureException.php | 8 -- .../Component/Finder/Expression/Regex.php | 4 +- src/Symfony/Component/Finder/Finder.php | 6 - .../Component/Finder/Shell/Command.php | 18 --- .../Component/Form/AbstractRendererEngine.php | 14 --- .../Component/Form/AbstractTypeExtension.php | 2 - src/Symfony/Component/Form/Button.php | 2 - src/Symfony/Component/Form/ButtonBuilder.php | 10 -- .../Factory/CachingFactoryDecorator.php | 8 -- .../Factory/PropertyAccessDecorator.php | 13 -- .../Form/ChoiceList/View/ChoiceView.php | 2 - .../Extension/Core/ChoiceList/ChoiceList.php | 8 -- .../Core/DataMapper/PropertyPathMapper.php | 8 -- .../ChoiceToValueTransformer.php | 3 - .../ChoicesToValuesTransformer.php | 7 -- .../DataTransformer/DataTransformerChain.php | 7 +- .../ValueToDuplicatesTransformer.php | 2 - .../Core/EventListener/ResizeFormListener.php | 29 ++--- .../EventListener/DataCollectorListener.php | 4 - .../DataCollector/FormDataCollector.php | 3 - .../FormDataCollectorInterface.php | 16 --- .../DataCollector/FormDataExtractor.php | 2 - .../FormDataExtractorInterface.php | 8 -- .../Type/FormTypeHttpFoundationExtension.php | 10 -- .../Validator/Constraints/FormValidator.php | 2 - .../Validator/ValidatorTypeGuesser.php | 8 -- .../ViolationMapper/ViolationMapper.php | 2 - src/Symfony/Component/Form/Form.php | 2 - .../Form/FormConfigBuilderInterface.php | 12 -- src/Symfony/Component/Form/FormError.php | 28 +---- src/Symfony/Component/Form/FormFactory.php | 2 - .../Form/FormFactoryBuilderInterface.php | 10 -- src/Symfony/Component/Form/FormInterface.php | 4 - src/Symfony/Component/Form/FormRenderer.php | 22 ---- .../Form/FormTypeExtensionInterface.php | 11 -- src/Symfony/Component/Form/FormView.php | 4 - .../Component/Form/Guess/TypeGuess.php | 11 -- .../Component/Form/NativeRequestHandler.php | 7 -- .../Component/Form/ReversedTransformer.php | 10 -- .../Component/HttpFoundation/AcceptHeader.php | 2 - .../File/MimeType/ExtensionGuesser.php | 2 - .../MimeType/MimeTypeExtensionGuesser.php | 2 - .../File/MimeType/MimeTypeGuesser.php | 2 - .../Component/HttpFoundation/FileBag.php | 2 - .../Component/HttpFoundation/ParameterBag.php | 2 - .../RequestMatcherInterface.php | 2 - .../Component/HttpFoundation/Response.php | 6 - .../HttpFoundation/ResponseHeaderBag.php | 19 --- .../Session/Attribute/AttributeBag.php | 7 -- .../Session/Flash/AutoExpireFlashBag.php | 12 -- .../HttpFoundation/Session/Flash/FlashBag.php | 12 -- .../Session/Flash/FlashBagInterface.php | 2 - .../Session/SessionBagInterface.php | 2 - .../Session/SessionInterface.php | 2 - .../Storage/MockArraySessionStorage.php | 10 -- .../Session/Storage/NativeSessionStorage.php | 7 -- .../Storage/SessionStorageInterface.php | 2 - .../Session/Attribute/AttributeBagTest.php | 5 +- .../Attribute/NamespacedAttributeBagTest.php | 5 +- .../Session/Flash/AutoExpireFlashBagTest.php | 3 - .../Tests/Session/Flash/FlashBagTest.php | 3 - .../Tests/Session/Storage/MetadataBagTest.php | 3 - .../Storage/NativeSessionStorageTest.php | 2 - .../Component/HttpKernel/Bundle/Bundle.php | 4 - .../HttpKernel/Bundle/BundleInterface.php | 2 - .../CacheClearer/ChainCacheClearer.php | 5 - src/Symfony/Component/HttpKernel/Client.php | 10 -- .../Controller/ControllerResolver.php | 3 - .../ControllerResolverInterface.php | 2 - .../TraceableControllerResolver.php | 4 - .../DataCollector/ConfigDataCollector.php | 2 - .../DataCollector/DataCollectorInterface.php | 4 - .../DataCollector/RouterDataCollector.php | 2 - .../ConfigurableExtension.php | 3 - .../HttpKernel/Event/FilterResponseEvent.php | 7 -- .../HttpKernel/Event/GetResponseEvent.php | 7 -- .../AddRequestFormatsListener.php | 8 -- .../EventListener/DebugHandlersListener.php | 2 - .../HttpKernel/EventListener/DumpListener.php | 4 - .../EventListener/FragmentListener.php | 2 - .../EventListener/ProfilerListener.php | 4 - .../EventListener/ResponseListener.php | 2 - .../StreamedResponseListener.php | 2 - .../EventListener/SurrogateListener.php | 5 - .../EventListener/TestSessionListener.php | 2 - .../EventListener/ValidateRequestListener.php | 2 - .../HttpKernel/Fragment/FragmentHandler.php | 4 - .../Fragment/InlineFragmentRenderer.php | 4 - .../Component/HttpKernel/HttpCache/Esi.php | 11 -- .../HttpKernel/HttpCache/HttpCache.php | 14 --- .../ResponseCacheStrategyInterface.php | 4 - .../Component/HttpKernel/HttpCache/Store.php | 21 ---- .../HttpKernel/HttpCache/StoreInterface.php | 13 -- .../HttpCache/SurrogateInterface.php | 11 -- .../Component/HttpKernel/HttpKernel.php | 5 - src/Symfony/Component/HttpKernel/Kernel.php | 4 - .../Component/HttpKernel/KernelInterface.php | 2 - .../Profiler/MongoDbProfilerStorage.php | 6 - .../Component/HttpKernel/Profiler/Profile.php | 6 - .../HttpKernel/Profiler/Profiler.php | 22 ---- .../Profiler/ProfilerStorageInterface.php | 2 - .../Profiler/RedisProfilerStorage.php | 2 - .../HttpKernel/TerminableInterface.php | 3 - .../Data/Bundle/Reader/BundleEntryReader.php | 7 -- .../Data/Generator/CurrencyDataGenerator.php | 4 - .../Data/Generator/LanguageDataGenerator.php | 2 - .../Data/Generator/RegionDataGenerator.php | 4 - .../DateFormat/FullTransformer.php | 4 - .../DateFormat/MonthTransformer.php | 9 -- .../Intl/DateFormatter/IntlDateFormatter.php | 4 - .../DateFormatter/IntlDateFormatterTest.php | 2 - src/Symfony/Component/Locale/Locale.php | 6 - .../Component/Process/ExecutableFinder.php | 2 - src/Symfony/Component/Process/Process.php | 2 - .../PropertyAccess/PropertyAccessor.php | 16 +-- .../PropertyAccess/PropertyPathBuilder.php | 7 -- .../PropertyAccess/PropertyPathIterator.php | 5 - .../Component/PropertyAccess/StringUtil.php | 2 - .../Exception/MethodNotAllowedException.php | 3 - .../Generator/Dumper/GeneratorDumper.php | 6 - .../Routing/Generator/UrlGenerator.php | 15 --- .../Routing/Loader/AnnotationClassLoader.php | 6 - .../Routing/Loader/AnnotationFileLoader.php | 3 - .../Matcher/Dumper/ApacheMatcherDumper.php | 6 - .../Matcher/Dumper/DumperCollection.php | 2 - .../Matcher/Dumper/DumperPrefixCollection.php | 2 - .../Routing/Matcher/Dumper/MatcherDumper.php | 6 - .../Matcher/Dumper/PhpMatcherDumper.php | 2 - .../Matcher/RequestMatcherInterface.php | 2 - .../Component/Routing/Matcher/UrlMatcher.php | 16 --- .../Component/Routing/RequestContext.php | 6 - .../Routing/RequestContextAwareInterface.php | 2 - src/Symfony/Component/Routing/Route.php | 33 +----- .../Component/Routing/RouteCollection.php | 4 - .../Routing/RouteCompilerInterface.php | 2 - src/Symfony/Component/Routing/Router.php | 2 - .../Security/Acl/Dbal/AclProvider.php | 26 ---- .../Security/Acl/Dbal/MutableAclProvider.php | 16 --- .../Component/Security/Acl/Dbal/Schema.php | 2 - .../Component/Security/Acl/Domain/Acl.php | 5 - .../Acl/Domain/AclCollectionCache.php | 5 - .../Security/Acl/Domain/DoctrineAclCache.php | 2 - .../Acl/Domain/PermissionGrantingStrategy.php | 5 - .../SecurityIdentityRetrievalStrategy.php | 4 - .../Acl/Domain/UserSecurityIdentity.php | 4 - .../Security/Acl/Model/AclCacheInterface.php | 6 - .../Acl/Model/MutableAclProviderInterface.php | 6 - .../Acl/Model/ObjectIdentityInterface.php | 2 - .../Acl/Model/SecurityIdentityInterface.php | 2 - ...rityIdentityRetrievalStrategyInterface.php | 2 - .../Acl/Tests/Dbal/MutableAclProviderTest.php | 3 - .../AuthenticationTrustResolverInterface.php | 6 - .../AuthenticationProviderInterface.php | 2 - ...PreAuthenticatedAuthenticationProvider.php | 5 - .../Provider/UserAuthenticationProvider.php | 6 - .../RememberMe/TokenProviderInterface.php | 2 - .../Voter/AuthenticatedVoter.php | 3 - .../Authorization/Voter/ExpressionVoter.php | 5 - .../Security/Core/Encoder/EncoderFactory.php | 2 - .../Core/Encoder/UserPasswordEncoder.php | 6 - .../Core/Exception/AccountStatusException.php | 5 - .../Exception/AuthenticationException.php | 5 - .../Security/Core/User/EquatableInterface.php | 2 - .../Core/User/InMemoryUserProvider.php | 2 - .../Core/User/UserCheckerInterface.php | 4 - .../Core/User/UserProviderInterface.php | 2 - .../Security/Csrf/CsrfTokenManager.php | 14 --- .../Csrf/CsrfTokenManagerInterface.php | 2 - .../Security/Http/AccessMapInterface.php | 2 - .../AuthenticationFailureHandlerInterface.php | 3 - .../AuthenticationSuccessHandlerInterface.php | 3 - .../Authentication/AuthenticationUtils.php | 6 - .../DefaultAuthenticationFailureHandler.php | 5 - .../DefaultAuthenticationSuccessHandler.php | 7 -- .../AccessDeniedHandlerInterface.php | 3 - .../Http/Event/InteractiveLoginEvent.php | 4 - .../Component/Security/Http/Firewall.php | 9 -- .../AbstractAuthenticationListener.php | 8 -- .../AbstractPreAuthenticatedListener.php | 6 - .../Security/Http/Firewall/AccessListener.php | 2 - .../AnonymousAuthenticationListener.php | 2 - .../Firewall/BasicAuthenticationListener.php | 2 - .../Http/Firewall/ChannelListener.php | 2 - .../Http/Firewall/ContextListener.php | 6 - .../Firewall/DigestAuthenticationListener.php | 2 - .../Http/Firewall/ExceptionListener.php | 12 -- .../Http/Firewall/ListenerInterface.php | 5 - .../Security/Http/Firewall/LogoutListener.php | 9 -- .../Http/Firewall/RememberMeListener.php | 2 - .../SimplePreAuthenticationListener.php | 2 - .../Http/Firewall/SwitchUserListener.php | 8 -- .../Component/Security/Http/FirewallMap.php | 5 - .../Security/Http/FirewallMapInterface.php | 2 - .../Logout/CookieClearingLogoutHandler.php | 4 - .../Http/Logout/LogoutHandlerInterface.php | 4 - .../Logout/LogoutSuccessHandlerInterface.php | 2 - .../Http/Logout/SessionLogoutHandler.php | 4 - .../RememberMe/AbstractRememberMeServices.php | 28 ----- ...PersistentTokenBasedRememberMeServices.php | 5 - .../RememberMeServicesInterface.php | 8 -- .../Http/RememberMe/ResponseListener.php | 3 - ...SessionAuthenticationStrategyInterface.php | 3 - .../Serializer/Annotation/Groups.php | 2 - .../Serializer/Encoder/JsonDecode.php | 2 - .../Serializer/Encoder/JsonEncode.php | 2 - .../Serializer/Encoder/XmlEncoder.php | 2 - .../Serializer/Mapping/AttributeMetadata.php | 4 - .../Mapping/AttributeMetadataInterface.php | 2 - .../Mapping/ClassMetadataInterface.php | 4 - .../Mapping/Factory/ClassMetadataFactory.php | 15 --- .../Mapping/Loader/AnnotationLoader.php | 6 - .../Mapping/Loader/LoaderInterface.php | 4 - .../Normalizer/AbstractNormalizer.php | 5 - .../Serializer/SerializerAwareInterface.php | 2 - .../Component/Templating/DelegatingEngine.php | 5 - .../Templating/Helper/CoreAssetsHelper.php | 5 - .../Templating/Loader/CacheLoader.php | 2 - .../Templating/Loader/ChainLoader.php | 4 - .../Templating/Loader/FilesystemLoader.php | 2 - .../Component/Templating/Loader/Loader.php | 2 - .../Templating/Loader/LoaderInterface.php | 2 - .../Catalogue/AbstractOperation.php | 14 --- .../TranslationDataCollector.php | 6 - .../Translation/DataCollectorTranslator.php | 3 - .../Translation/Loader/PoFileLoader.php | 3 - .../Translation/MessageCatalogueInterface.php | 6 - .../Component/Translation/Translator.php | 5 - .../Translation/Writer/TranslationWriter.php | 5 - .../ConstraintValidatorFactoryInterface.php | 2 - .../Validator/ConstraintViolation.php | 39 ------ .../ConstraintViolationListInterface.php | 4 - .../Validator/Constraints/IbanValidator.php | 2 - .../Mapping/Cache/CacheInterface.php | 2 - .../Validator/Mapping/Cache/DoctrineCache.php | 10 -- .../Validator/Mapping/ClassMetadata.php | 7 -- .../Validator/Mapping/GenericMetadata.php | 2 - .../Mapping/Loader/AbstractLoader.php | 3 - .../Mapping/Loader/LoaderInterface.php | 2 - .../Tests/Validator/Abstract2Dot5ApiTest.php | 3 - .../Validator/ValidatorInterface.php | 2 - .../Validator/ValidatorBuilderInterface.php | 20 +--- .../VarDumper/Dumper/DataDumperInterface.php | 5 - 438 files changed, 41 insertions(+), 2685 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php index 9725fdcc088f9..9bf22357df895 100644 --- a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php +++ b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php @@ -26,9 +26,6 @@ class ProxyCacheWarmer implements CacheWarmerInterface { private $registry; - /** - * @param ManagerRegistry $registry A ManagerRegistry instance - */ public function __construct(ManagerRegistry $registry) { $this->registry = $registry; diff --git a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php index 0888f97ca91d8..895ade5fe740e 100644 --- a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php +++ b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php @@ -26,8 +26,6 @@ class ContainerAwareEventManager extends EventManager * Map of registered listeners. * * => - * - * @var array */ private $listeners = array(); private $initialized = array(); diff --git a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php index 93cd2c11f9a4d..7ccd1df106f70 100644 --- a/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php +++ b/src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php @@ -25,14 +25,8 @@ */ class ContainerAwareLoader extends Loader { - /** - * @var ContainerInterface - */ private $container; - /** - * @param ContainerInterface $container A ContainerInterface instance - */ public function __construct(ContainerInterface $container) { $this->container = $container; diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index c0623572ec606..8426d307da5da 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -27,15 +27,11 @@ abstract class AbstractDoctrineExtension extends Extension { /** * Used inside metadata driver method to simplify aggregation of data. - * - * @var array */ protected $aliasMap = array(); /** * Used inside metadata driver method to simplify aggregation of data. - * - * @var array */ protected $drivers = array(); @@ -142,10 +138,6 @@ protected function setMappingDriverConfig(array $mappingConfig, $mappingName) * * Returns false when autodetection failed, an array of the completed information otherwise. * - * @param array $bundleConfig - * @param \ReflectionClass $bundle - * @param ContainerBuilder $container A ContainerBuilder instance - * * @return array|false */ protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container) @@ -402,9 +394,6 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD * * The manager called $autoMappedManager will map all bundles that are not mapped by other managers. * - * @param array $managerConfigs - * @param array $bundles - * * @return array The modified version of $managerConfigs */ protected function fixManagersAutoMappings(array $managerConfigs, array $bundles) @@ -464,8 +453,6 @@ abstract protected function getMappingResourceExtension(); /** * Search for a manager that is declared as 'auto_mapping' = true. * - * @param array $managerConfigs - * * @return null|string The name of the manager. If no one manager is found, returns null * * @throws \LogicException diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php index cd7612fe23dd6..c1d505722aa5b 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php @@ -134,8 +134,6 @@ public function __construct($driver, array $namespaces, array $managerParameters /** * Register mappings and alias with the metadata drivers. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { @@ -167,8 +165,6 @@ public function process(ContainerBuilder $container) * Get the service name of the metadata chain driver that the mappings * should be registered with. * - * @param ContainerBuilder $container - * * @return string The name of the chain driver service * * @throws ParameterNotFoundException if non of the managerParameters has a @@ -195,8 +191,6 @@ protected function getDriver(ContainerBuilder $container) /** * Get the service name from the pattern and the configured manager name. * - * @param ContainerBuilder $container - * * @return string a service definition name * * @throws ParameterNotFoundException if none of the managerParameters has a @@ -213,8 +207,6 @@ private function getConfigurationServiceName(ContainerBuilder $container) * The default implementation loops over the managerParameters and returns * the first non-empty parameter. * - * @param ContainerBuilder $container - * * @return string The name of the active manager * * @throws ParameterNotFoundException if none of the managerParameters is found in the container @@ -240,8 +232,6 @@ private function getManagerName(ContainerBuilder $container) * This default implementation checks if the class has the enabledParameter * configured and if so if that parameter is present in the container. * - * @param ContainerBuilder $container - * * @return bool whether this compiler pass really should register the mappings */ protected function enabled(ContainerBuilder $container) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index 72d7a6f10bd4f..082206f60b889 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -214,8 +214,6 @@ public function getRemainingViews() /** * Returns the entities corresponding to the given values. * - * @param array $values - * * @return array * * @see ChoiceListInterface @@ -267,8 +265,6 @@ public function getChoicesForValues(array $values) /** * Returns the values corresponding to the given entities. * - * @param array $entities - * * @return array * * @see ChoiceListInterface diff --git a/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php b/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php index e56674be351c5..307361a52a3ef 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php +++ b/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php @@ -24,8 +24,6 @@ class CollectionToArrayTransformer implements DataTransformerInterface /** * Transforms a collection into an array. * - * @param Collection $collection A collection of entities - * * @return mixed An array of entities * * @throws TransformationFailedException diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index fef097d3ea60d..aeea2425206c1 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -84,8 +84,6 @@ public function getQueryBuilderPartsForCachingHash($queryBuilder) /** * Converts a query parameter to an array. * - * @param Parameter $parameter The query parameter - * * @return array The array representation of the parameter */ private function parameterToArray(Parameter $parameter) diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index 9fab65a12c039..cc07076f9e2a5 100644 --- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -26,10 +26,6 @@ class DbalLogger implements SQLLogger protected $logger; protected $stopwatch; - /** - * @param LoggerInterface $logger A LoggerInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - */ public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null) { $this->logger = $logger; diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index b2216b7ae31df..089ec7810580b 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -45,11 +45,6 @@ class DoctrineTokenProvider implements TokenProviderInterface */ private $conn; - /** - * new DoctrineTokenProvider for the RememberMe authentication service. - * - * @param Connection $conn - */ public function __construct(Connection $conn) { $this->conn = $conn; diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index 860162a77d5d2..0a9dae3b200fe 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -267,8 +267,6 @@ protected function invokeLoadCacheDriver(array $objectManager, ContainerBuilder } /** - * @param array $data - * * @return \Symfony\Component\DependencyInjection\ContainerBuilder */ protected function createContainer(array $data = array()) diff --git a/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php b/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php index a60a4ec479042..1203a0d999c99 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php @@ -22,9 +22,6 @@ */ class ChromePhpHandler extends BaseChromePhpHandler { - /** - * @var array - */ private $headers = array(); /** diff --git a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php index 2b3bafa8b7794..263b2b7a6879b 100644 --- a/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php @@ -40,14 +40,7 @@ */ class ConsoleHandler extends AbstractProcessingHandler implements EventSubscriberInterface { - /** - * @var OutputInterface|null - */ private $output; - - /** - * @var array - */ private $verbosityLevelMap = array( OutputInterface::VERBOSITY_NORMAL => Logger::WARNING, OutputInterface::VERBOSITY_VERBOSE => Logger::NOTICE, @@ -92,8 +85,6 @@ public function handle(array $record) /** * Sets the console output to use for printing logs. - * - * @param OutputInterface $output The console output to use */ public function setOutput(OutputInterface $output) { @@ -113,8 +104,6 @@ public function close() /** * Before a command is executed, the handler gets activated and the console output * is set in order to know where to write the logs. - * - * @param ConsoleCommandEvent $event */ public function onCommand(ConsoleCommandEvent $event) { @@ -128,8 +117,6 @@ public function onCommand(ConsoleCommandEvent $event) /** * After a command has been executed, it disables the output. - * - * @param ConsoleTerminateEvent $event */ public function onTerminate(ConsoleTerminateEvent $event) { diff --git a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php index 339843c1d4ff5..056496ae1325a 100644 --- a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php @@ -22,9 +22,6 @@ */ class FirePHPHandler extends BaseFirePHPHandler { - /** - * @var array - */ private $headers = array(); /** diff --git a/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php b/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php index 0412e94f223a3..fcbd98ac7dc64 100644 --- a/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php @@ -26,9 +26,6 @@ class SwiftMailerHandler extends BaseSwiftMailerHandler protected $instantFlush = false; - /** - * @param \Swift_Transport $transport - */ public function setTransport(\Swift_Transport $transport) { $this->transport = $transport; @@ -36,8 +33,6 @@ public function setTransport(\Swift_Transport $transport) /** * After the kernel has been terminated we will always flush messages. - * - * @param PostResponseEvent $event */ public function onKernelTerminate(PostResponseEvent $event) { @@ -46,8 +41,6 @@ public function onKernelTerminate(PostResponseEvent $event) /** * After the CLI application has been terminated we will always flush messages. - * - * @param ConsoleTerminateEvent $event */ public function onCliTerminate(ConsoleTerminateEvent $event) { diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index 45509058c051e..629b556c4bc9e 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -110,8 +110,6 @@ public function getProxyCode(Definition $definition) /** * Produces the proxy class name for the given definition. * - * @param Definition $definition - * * @return string */ private function getProxyClassName(Definition $definition) @@ -120,8 +118,6 @@ private function getProxyClassName(Definition $definition) } /** - * @param Definition $definition - * * @return ClassGenerator */ private function generateProxyClass(Definition $definition) diff --git a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php index bbf6fea639815..7878247edb376 100644 --- a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php @@ -25,9 +25,6 @@ class HttpKernelExtension extends AbstractExtension { private $handler; - /** - * @param FragmentHandler $handler A FragmentHandler instance - */ public function __construct(FragmentHandler $handler) { $this->handler = $handler; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php b/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php index 1284cf52a20b7..1c3451bbebf46 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php @@ -16,24 +16,10 @@ */ class Scope { - /** - * @var Scope|null - */ private $parent; - - /** - * @var array - */ private $data = array(); - - /** - * @var bool - */ private $left = false; - /** - * @param Scope $parent - */ public function __construct(Scope $parent = null) { $this->parent = $parent; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index 01f230b9efdff..1fbce9c6af811 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -123,8 +123,6 @@ private function getReadDomainFromArguments(Node $arguments, $index) } /** - * @param Node $node - * * @return string|null */ private function getReadDomainFromNode(Node $node) diff --git a/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php index 12c2541851e63..7301813d5911c 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @@ -27,8 +27,6 @@ class FormThemeTokenParser extends AbstractTokenParser /** * Parses a token and returns a node. * - * @param Token $token - * * @return Node */ public function parse(Token $token) diff --git a/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php index 2b4a9f3fc4636..5261d7ad52cee 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php @@ -29,8 +29,6 @@ class TransChoiceTokenParser extends TransTokenParser /** * Parses a token and returns a node. * - * @param Token $token - * * @return Node * * @throws SyntaxError diff --git a/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php index 4096a011a300d..ee546e05f0125 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php @@ -26,8 +26,6 @@ class TransDefaultDomainTokenParser extends AbstractTokenParser /** * Parses a token and returns a node. * - * @param Token $token - * * @return Node */ public function parse(Token $token) diff --git a/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php index 848a080710fa1..76c8dc06100c1 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php @@ -30,8 +30,6 @@ class TransTokenParser extends AbstractTokenParser /** * Parses a token and returns a node. * - * @param Token $token - * * @return Node * * @throws SyntaxError diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php index 3515cfc7f3225..47c5d2f677783 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php @@ -24,9 +24,6 @@ class RouterCacheWarmer implements CacheWarmerInterface { protected $router; - /** - * @param RouterInterface $router A Router instance - */ public function __construct(RouterInterface $router) { $this->router = $router; diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php index 2cb19d9df20b0..d2a21949a9814 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php @@ -24,10 +24,6 @@ class TemplatePathsCacheWarmer extends CacheWarmer protected $finder; protected $locator; - /** - * @param TemplateFinderInterface $finder A template finder - * @param TemplateLocator $locator The template locator - */ public function __construct(TemplateFinderInterface $finder, TemplateLocator $locator) { $this->finder = $finder; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index dd85c2456abc7..127a75fbcd3fe 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -130,8 +130,6 @@ protected function execute(InputInterface $input, OutputInterface $output) /** * Validates input arguments and options. * - * @param InputInterface $input - * * @throws \InvalidArgumentException */ protected function validateInput(InputInterface $input) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php index 54cce9a45954c..54383aad94aae 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php @@ -29,9 +29,6 @@ class Application extends BaseApplication private $kernel; private $commandsRegistered = false; - /** - * @param KernelInterface $kernel A KernelInterface instance - */ public function __construct(KernelInterface $kernel) { $this->kernel = $kernel; @@ -57,9 +54,6 @@ public function getKernel() /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ public function doRun(InputInterface $input, OutputInterface $output) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index 33334e79920c9..3d1bbd831da19 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -120,33 +120,21 @@ protected function renderTable(Table $table, $decorated = false) /** * Describes an InputArgument instance. - * - * @param RouteCollection $routes - * @param array $options */ abstract protected function describeRouteCollection(RouteCollection $routes, array $options = array()); /** * Describes an InputOption instance. - * - * @param Route $route - * @param array $options */ abstract protected function describeRoute(Route $route, array $options = array()); /** * Describes container parameters. - * - * @param ParameterBag $parameters - * @param array $options */ abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = array()); /** * Describes container tags. - * - * @param ContainerBuilder $builder - * @param array $options */ abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = array()); @@ -166,33 +154,21 @@ abstract protected function describeContainerService($service, array $options = * * Common options are: * * tag: filters described services by given tag - * - * @param ContainerBuilder $builder - * @param array $options */ abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = array()); /** * Describes a service definition. - * - * @param Definition $definition - * @param array $options */ abstract protected function describeContainerDefinition(Definition $definition, array $options = array()); /** * Describes a service alias. - * - * @param Alias $alias - * @param array $options */ abstract protected function describeContainerAlias(Alias $alias, array $options = array()); /** * Describes a container parameter. - * - * @param string $parameter - * @param array $options */ abstract protected function describeContainerParameter($parameter, array $options = array()); @@ -201,9 +177,6 @@ abstract protected function describeContainerParameter($parameter, array $option * * Common options are: * * name: name of listened event - * - * @param EventDispatcherInterface $eventDispatcher - * @param array $options */ abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 791593de07fe8..e50a2fc0b20ba 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -163,9 +163,6 @@ protected function describeContainerParameter($parameter, array $options = array /** * Writes data as json. * - * @param array $data - * @param array $options - * * @return array|string */ private function writeData(array $data, array $options) @@ -180,8 +177,6 @@ private function writeData(array $data, array $options) } /** - * @param Route $route - * * @return array */ protected function getRouteData(Route $route) @@ -268,8 +263,6 @@ private function getContainerDefinitionData(Definition $definition, $omitTags = } /** - * @param Alias $alias - * * @return array */ private function getContainerAliasData(Alias $alias) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 2cefe9f03a2ac..fd522005af0d0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -351,8 +351,6 @@ protected function describeCallable($callable, array $options = array()) } /** - * @param array $array - * * @return string */ private function formatRouterConfig(array $array) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 0fe5fa70f59bb..388c3e70845cf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -375,8 +375,6 @@ protected function describeCallable($callable, array $options = array()) } /** - * @param array $array - * * @return string */ private function formatRouterConfig(array $array) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index c37a9009fcff5..e2bf073f6df3c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -122,8 +122,6 @@ protected function describeContainerParameter($parameter, array $options = array /** * Writes DOM document. * - * @param \DOMDocument $dom - * * @return \DOMDocument|string */ private function writeDocument(\DOMDocument $dom) @@ -133,8 +131,6 @@ private function writeDocument(\DOMDocument $dom) } /** - * @param RouteCollection $routes - * * @return \DOMDocument */ private function getRouteCollectionDocument(RouteCollection $routes) @@ -220,8 +216,6 @@ private function getRouteDocument(Route $route, $name = null) } /** - * @param ParameterBag $parameters - * * @return \DOMDocument */ private function getContainerParametersDocument(ParameterBag $parameters) @@ -416,9 +410,6 @@ private function getContainerAliasDocument(Alias $alias, $id = null) } /** - * @param string $parameter - * @param array $options - * * @return \DOMDocument */ private function getContainerParameterDocument($parameter, $options = array()) diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php index 8d6203a06fb68..8de32f1a7b4ea 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php @@ -24,9 +24,6 @@ class ControllerNameParser { protected $kernel; - /** - * @param KernelInterface $kernel A KernelInterface instance - */ public function __construct(KernelInterface $kernel) { $this->kernel = $kernel; diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php index 00f4f1ed148c3..b7bb8abde686d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php @@ -24,11 +24,6 @@ class ControllerResolver extends BaseControllerResolver protected $container; protected $parser; - /** - * @param ContainerInterface $container A ContainerInterface instance - * @param ControllerNameParser $parser A ControllerNameParser instance - * @param LoggerInterface $logger A LoggerInterface instance - */ public function __construct(ContainerInterface $container, ControllerNameParser $parser, LoggerInterface $logger = null) { $this->container = $container; diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 85a1a9ba208f3..10bcf210add86 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -45,9 +45,6 @@ class FrameworkExtension extends Extension /** * Responds to the app.config configuration parameter. * - * @param array $configs - * @param ContainerBuilder $container - * * @throws LogicException */ public function load(array $configs, ContainerBuilder $container) @@ -194,16 +191,7 @@ public function getConfiguration(array $config, ContainerBuilder $container) return new Configuration($container->getParameter('kernel.debug')); } - /** - * Loads Form configuration. - * - * @param array $config A configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - * - * @throws \LogicException - */ - private function registerFormConfiguration($config, ContainerBuilder $container, XmlFileLoader $loader) + private function registerFormConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('form.xml'); if (null === $config['form']['csrf_protection']['enabled']) { @@ -225,13 +213,6 @@ private function registerFormConfiguration($config, ContainerBuilder $container, } } - /** - * Loads the ESI configuration. - * - * @param array $config An ESI configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerEsiConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -241,13 +222,6 @@ private function registerEsiConfiguration(array $config, ContainerBuilder $conta $loader->load('esi.xml'); } - /** - * Loads the SSI configuration. - * - * @param array $config An SSI configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerSsiConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -257,13 +231,6 @@ private function registerSsiConfiguration(array $config, ContainerBuilder $conta $loader->load('ssi.xml'); } - /** - * Loads the fragments configuration. - * - * @param array $config A fragments configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerFragmentsConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -274,15 +241,6 @@ private function registerFragmentsConfiguration(array $config, ContainerBuilder $container->setParameter('fragment.path', $config['path']); } - /** - * Loads the profiler configuration. - * - * @param array $config A profiler configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - * - * @throws \LogicException - */ private function registerProfilerConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -355,13 +313,6 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $ } } - /** - * Loads the router configuration. - * - * @param array $config A router configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerRouterConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('routing.xml'); @@ -388,13 +339,6 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co )); } - /** - * Loads the session configuration. - * - * @param array $config A session configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerSessionConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('session.xml'); @@ -447,13 +391,6 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c $container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']); } - /** - * Loads the request configuration. - * - * @param array $config A request configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerRequestConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if ($config['formats']) { @@ -465,14 +402,6 @@ private function registerRequestConfiguration(array $config, ContainerBuilder $c } } - /** - * Loads the templating configuration. - * - * @param array $config A templating configuration array - * @param string $ide - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerTemplatingConfiguration(array $config, $ide, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('templating.xml'); @@ -575,13 +504,6 @@ private function registerTemplatingConfiguration(array $config, $ide, ContainerB } } - /** - * Loads the assets configuration. - * - * @param array $config A assets configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerAssetsConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('assets.xml'); @@ -645,12 +567,6 @@ private function createVersion(ContainerBuilder $container, $version, $format, $ return new Reference('assets._version_'.$name); } - /** - * Loads the translator configuration. - * - * @param array $config A translator configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - */ private function registerTranslatorConfiguration(array $config, ContainerBuilder $container) { if (!$this->isConfigEnabled($container, $config)) { @@ -728,13 +644,6 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder } } - /** - * Loads the validator configuration. - * - * @param array $config A validation configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerValidationConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -861,15 +770,6 @@ private function registerPropertyAccessConfiguration(array $config, ContainerBui ; } - /** - * Loads the security configuration. - * - * @param array $config A CSRF configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - * - * @throws \LogicException - */ private function registerSecurityCsrfConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$this->isConfigEnabled($container, $config)) { @@ -884,13 +784,6 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild $loader->load('security_csrf.xml'); } - /** - * Loads the serializer configuration. - * - * @param array $config A serializer configuration array - * @param ContainerBuilder $container A ContainerBuilder instance - * @param XmlFileLoader $loader An XmlFileLoader instance - */ private function registerSerializerConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { if (!$config['enabled']) { @@ -965,8 +858,6 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder /** * Gets a hash of the kernel root directory. * - * @param ContainerBuilder $container - * * @return string */ private function getKernelRootHash(ContainerBuilder $container) diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php index 3bbe82ca264b4..397528d2b5c71 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php @@ -31,11 +31,6 @@ class DelegatingLoader extends BaseDelegatingLoader protected $logger; private $loading = false; - /** - * @param ControllerNameParser $parser A ControllerNameParser instance - * @param LoggerInterface $logger A LoggerInterface instance - * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance - */ public function __construct(ControllerNameParser $parser, LoggerInterface $logger = null, LoaderResolverInterface $resolver) { $this->parser = $parser; diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php index ec37ca3067cbf..47b279ce8fbe5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -79,8 +79,6 @@ public function warmUp($cacheDir) * - the route host, * - the route schemes, * - the route methods. - * - * @param RouteCollection $collection */ private function resolveParameters(RouteCollection $collection) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php index 7dcdec2b4bc79..00d422ef383ab 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php @@ -28,9 +28,6 @@ class Debugger implements DebuggerInterface { protected $logger; - /** - * @param LoggerInterface $logger A LoggerInterface instance - */ public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php b/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php index a6a0b508fbda2..0a8e451894700 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php @@ -24,10 +24,6 @@ class DelegatingEngine extends BaseDelegatingEngine implements EngineInterface { protected $container; - /** - * @param ContainerInterface $container The DI container - * @param array $engineIds An array of engine Ids - */ public function __construct(ContainerInterface $container, array $engineIds) { $this->container = $container; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php index 687588b1b91ce..d387bb17abf91 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -25,9 +25,6 @@ class GlobalVariables { protected $container; - /** - * @param ContainerInterface $container The DI container - */ public function __construct(ContainerInterface $container) { $this->container = $container; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php index 8e1e242f01ac4..c0879c97f059f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -24,9 +24,6 @@ class ActionsHelper extends Helper { private $handler; - /** - * @param FragmentHandler $handler A FragmentHandler instance - */ public function __construct(FragmentHandler $handler) { $this->handler = $handler; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php index 8375fb0235a0c..954878f946b43 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @@ -23,14 +23,8 @@ */ class FormHelper extends Helper { - /** - * @var FormRendererInterface - */ private $renderer; - /** - * @param FormRendererInterface $renderer - */ public function __construct(FormRendererInterface $renderer) { $this->renderer = $renderer; @@ -198,8 +192,6 @@ public function label(FormView $view, $label = null, array $variables = array()) /** * Renders the errors of the given view. * - * @param FormView $view The view to render the errors for - * * @return string The HTML markup */ public function errors(FormView $view) diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php index e9d5d03c71859..32db60c2758c9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php @@ -23,9 +23,6 @@ class RouterHelper extends Helper { protected $generator; - /** - * @param UrlGeneratorInterface $router A Router instance - */ public function __construct(UrlGeneratorInterface $router) { $this->generator = $router; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php index 9893c5e35c9c5..5c4a9ae0fa1c5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php @@ -21,9 +21,6 @@ class TranslatorHelper extends Helper { protected $translator; - /** - * @param TranslatorInterface $translator A TranslatorInterface instance - */ public function __construct(TranslatorInterface $translator) { $this->translator = $translator; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php index 402778bd76857..29031d03db31b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php @@ -25,9 +25,6 @@ class FilesystemLoader implements LoaderInterface { protected $locator; - /** - * @param FileLocatorInterface $locator A FileLocatorInterface instance - */ public function __construct(FileLocatorInterface $locator) { $this->locator = $locator; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php index c74322d6814fd..01b255ff0827e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php @@ -42,8 +42,6 @@ public function __construct(FileLocatorInterface $locator, $cacheDir = null) /** * Returns a full path for a given file. * - * @param TemplateReferenceInterface $template A template - * * @return string The full path for the file */ protected function getCacheKey($template) diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php b/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php index 0725e010e979c..17651c00a0cb6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php @@ -26,12 +26,6 @@ class PhpEngine extends BasePhpEngine implements EngineInterface { protected $container; - /** - * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance - * @param ContainerInterface $container The DI container - * @param LoaderInterface $loader A loader instance - * @param GlobalVariables|null $globals A GlobalVariables instance or null - */ public function __construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, GlobalVariables $globals = null) { $this->container = $container; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php b/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php index 3ae8fccd202c9..1b2899291d293 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php @@ -27,9 +27,6 @@ class TemplateNameParser extends BaseTemplateNameParser protected $kernel; protected $cache = array(); - /** - * @param KernelInterface $kernel A KernelInterface instance - */ public function __construct(KernelInterface $kernel) { $this->kernel = $kernel; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php b/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php index ccfbcf7408f4f..75f8bc40a6e43 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php @@ -25,13 +25,6 @@ class TimedPhpEngine extends PhpEngine { protected $stopwatch; - /** - * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance - * @param ContainerInterface $container A ContainerInterface instance - * @param LoaderInterface $loader A LoaderInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - * @param GlobalVariables $globals A GlobalVariables instance - */ public function __construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, Stopwatch $stopwatch, GlobalVariables $globals = null) { parent::__construct($parser, $container, $loader, $globals); diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index 6b979c4f36118..045e05f534f04 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -135,8 +135,6 @@ protected static function getKernelClass() /** * Boots the Kernel for this test. - * - * @param array $options */ protected static function bootKernel(array $options = array()) { @@ -154,8 +152,6 @@ protected static function bootKernel(array $options = array()) * * environment * * debug * - * @param array $options An array of options - * * @return KernelInterface A KernelInterface instance */ protected static function createKernel(array $options = array()) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php index c9a3b282ce9e6..f16cf15d81da3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php @@ -209,8 +209,6 @@ public function getNonStringValues() } /** - * @param RouteCollection $routes - * * @return \Symfony\Component\DependencyInjection\Container */ private function getServiceContainer(RouteCollection $routes) diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php index 70658f67232d3..6258878e50d56 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php @@ -29,15 +29,11 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface /** * Prefix for new found message. - * - * @var string */ private $prefix = ''; /** * The sequence that captures translation messages. - * - * @var array */ protected $sequences = array( array( diff --git a/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php b/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php index ce4efcbb1bea7..6634b9e2ab4a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php +++ b/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php @@ -56,8 +56,6 @@ public function __construct(ContainerInterface $container, array $validators = a /** * Returns the validator for the supplied constraint. * - * @param Constraint $constraint A constraint - * * @return ConstraintValidatorInterface A validator for the supplied constraint * * @throws ValidatorException When the validator class does not exist diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index 285d5993a27c5..ca2c8d6db3c75 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -26,10 +26,6 @@ class SecurityDataCollector extends DataCollector private $tokenStorage; private $roleHierarchy; - /** - * @param TokenStorageInterface|null $tokenStorage - * @param RoleHierarchyInterface|null $roleHierarchy - */ public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null) { $this->tokenStorage = $tokenStorage; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 2f4ab6891f452..43bd560588fa6 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -36,10 +36,6 @@ class MainConfiguration implements ConfigurationInterface private $factories; private $userProviderFactories; - /** - * @param array $factories - * @param array $userProviderFactories - */ public function __construct(array $factories, array $userProviderFactories) { $this->factories = $factories; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php index cdb0a96fe4175..f415642801142 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php @@ -144,8 +144,6 @@ protected function createEntryPoint($container, $id, $config, $defaultEntryPoint * Subclasses may disable remember-me features for the listener, by * always returning false from this method. * - * @param array $config - * * @return bool Whether a possibly configured RememberMeServices should be set for this listener */ protected function isRememberMeAware($config) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index 2fd12c9436c39..9b082d6a9bada 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -160,11 +160,8 @@ private function configureDbalAclProvider(array $config, ContainerBuilder $conta /** * Loads the web configuration. - * - * @param array $config An array of configuration settings - * @param ContainerBuilder $container A ContainerBuilder instance */ - private function createRoleHierarchy($config, ContainerBuilder $container) + private function createRoleHierarchy(array $config, ContainerBuilder $container) { if (!isset($config['role_hierarchy'])) { $container->removeDefinition('security.access.role_hierarchy_voter'); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php index 5d2fe28e9e05a..c56a4d8bcb145 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php @@ -20,8 +20,6 @@ class MainConfigurationTest extends TestCase /** * The minimal, required config needed to not have any required validation * issues. - * - * @var array */ protected static $minimalConfig = array( 'providers' => array( diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php index d76d8fd629bba..ecaf9ed068839 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php @@ -31,9 +31,6 @@ class UserLoginFormType extends AbstractType { private $request; - /** - * @param Request $request A request instance - */ public function __construct(Request $request) { $this->request = $request; diff --git a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php index 328c7318f5ef7..42fc34ea4d63b 100644 --- a/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php +++ b/src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php @@ -29,10 +29,6 @@ class TemplateCacheCacheWarmer implements CacheWarmerInterface protected $container; protected $finder; - /** - * @param ContainerInterface $container The dependency injection container - * @param TemplateFinderInterface|null $finder The template paths cache warmer - */ public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null) { // We don't inject the Twig environment directly as it depends on the diff --git a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php index 1878204003b62..8dd9cfee03abc 100644 --- a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php @@ -50,10 +50,6 @@ public function __construct(Environment $twig, $debug) * the exception page (when true). If it is not present, the "debug" value passed into the constructor will * be used. * - * @param Request $request The request - * @param FlattenException $exception A FlattenException instance - * @param DebugLoggerInterface $logger A DebugLoggerInterface instance - * * @return Response * * @throws \InvalidArgumentException When the exception template does not exist diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 286c8f6bfabdc..22fbe70a034f1 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -27,9 +27,6 @@ class TwigExtension extends Extension { /** * Responds to the twig configuration parameter. - * - * @param array $configs - * @param ContainerBuilder $container */ public function load(array $configs, ContainerBuilder $container) { diff --git a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php index a1e5bbc609233..dcd312b30ea1b 100644 --- a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php +++ b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php @@ -28,10 +28,6 @@ class FilesystemLoader extends BaseFilesystemLoader protected $locator; protected $parser; - /** - * @param FileLocatorInterface $locator A FileLocatorInterface instance - * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance - */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) { parent::__construct(array()); diff --git a/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php b/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php index cef083df3dc42..347cb66b8b6af 100644 --- a/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php +++ b/src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php @@ -29,8 +29,6 @@ class RenderTokenParser extends AbstractTokenParser /** * Parses a token and returns a node. * - * @param Token $token - * * @return Node */ public function parse(Token $token) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index ef6624195e17a..6793a48bf36bd 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -206,8 +206,6 @@ public function toolbarAction(Request $request, $token) /** * Renders the profiler search bar. * - * @param Request $request The current HTTP Request - * * @return Response A Response instance * * @throws NotFoundHttpException @@ -298,8 +296,6 @@ public function searchResultsAction(Request $request, $token) /** * Narrows the search bar. * - * @param Request $request The current HTTP Request - * * @return Response A Response instance * * @throws NotFoundHttpException diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 91cd1fb837f28..1e0b42b13d9fb 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -63,8 +63,6 @@ public function getName(Profile $profile, $panel) /** * Gets the templates for a given profile. * - * @param Profile $profile - * * @return Template[] * * @deprecated not used anymore internally @@ -82,8 +80,6 @@ public function getTemplates(Profile $profile) /** * Gets template names of templates that are present in the viewed profile. * - * @param Profile $profile - * * @return array * * @throws \UnexpectedValueException diff --git a/src/Symfony/Component/Asset/Packages.php b/src/Symfony/Component/Asset/Packages.php index 0a8c96354967c..63808d90786c0 100644 --- a/src/Symfony/Component/Asset/Packages.php +++ b/src/Symfony/Component/Asset/Packages.php @@ -38,11 +38,6 @@ public function __construct(PackageInterface $defaultPackage = null, array $pack } } - /** - * Sets the default package. - * - * @param PackageInterface $defaultPackage The default package - */ public function setDefaultPackage(PackageInterface $defaultPackage) { $this->defaultPackage = $defaultPackage; diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index ecd6d65ee688b..675a608d8dccf 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -212,8 +212,6 @@ public function getRequest() /** * Clicks on a given link. * - * @param Link $link A Link instance - * * @return Crawler */ public function click(Link $link) diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index c042c6a525295..4030ae4c62eef 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -21,8 +21,6 @@ class Cookie /** * Handles dates as defined by RFC 2616 section 3.3.1, and also some other * non-standard, but common formats. - * - * @var array */ private static $dateFormats = array( 'D, d M Y H:i:s T', diff --git a/src/Symfony/Component/BrowserKit/CookieJar.php b/src/Symfony/Component/BrowserKit/CookieJar.php index 4b9661b63fbd2..232cefc8b6647 100644 --- a/src/Symfony/Component/BrowserKit/CookieJar.php +++ b/src/Symfony/Component/BrowserKit/CookieJar.php @@ -20,11 +20,6 @@ class CookieJar { protected $cookieJar = array(); - /** - * Sets a cookie. - * - * @param Cookie $cookie A Cookie instance - */ public function set(Cookie $cookie) { $this->cookieJar[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; diff --git a/src/Symfony/Component/BrowserKit/History.php b/src/Symfony/Component/BrowserKit/History.php index 13af2b4f37927..aeca3277341c7 100644 --- a/src/Symfony/Component/BrowserKit/History.php +++ b/src/Symfony/Component/BrowserKit/History.php @@ -32,8 +32,6 @@ public function clear() /** * Adds a Request to the history. - * - * @param Request $request A Request instance */ public function add(Request $request) { diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 3f2a8ab1c99fc..ec2b075f663a7 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -294,8 +294,6 @@ private static function writeCacheFile($file, $content) /** * Gets an ordered array of passed classes including all their dependencies. * - * @param array $classes - * * @return \ReflectionClass[] An array of sorted \ReflectionClass instances (dependencies added if needed) * * @throws \InvalidArgumentException When a class can't be loaded diff --git a/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php b/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php index a00cf7b83c621..d9c4c3abbe27f 100644 --- a/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php +++ b/src/Symfony/Component/ClassLoader/Psr4ClassLoader.php @@ -20,9 +20,6 @@ */ class Psr4ClassLoader { - /** - * @var array - */ private $prefixes = array(); /** diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php index e5237f8414a27..bd3984b8257c0 100644 --- a/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -195,8 +195,6 @@ public function getDefaultValue() /** * Adds a child node. * - * @param NodeInterface $node The child node to add - * * @throws \InvalidArgumentException when the child node has no name * @throws \InvalidArgumentException when the child node's name is not unique */ diff --git a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php index f2d22fd1f5c54..c052c3df432a4 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -48,8 +48,6 @@ public function __construct($name, NodeParentInterface $parent = null) /** * Sets a custom children builder. - * - * @param NodeBuilder $builder A custom NodeBuilder */ public function setBuilder(NodeBuilder $builder) { @@ -318,8 +316,6 @@ public function normalizeKeys($bool) * ->append($this->getBarNodeDefinition()) * ; * - * @param NodeDefinition $node A NodeDefinition instance - * * @return $this */ public function append(NodeDefinition $node) @@ -416,8 +412,6 @@ protected function createNode() /** * Validate the configuration of a concrete node. * - * @param ArrayNode $node The related node - * * @throws InvalidDefinitionException */ protected function validateConcreteNode(ArrayNode $node) @@ -452,8 +446,6 @@ protected function validateConcreteNode(ArrayNode $node) /** * Validate the configuration of a prototype node. * - * @param PrototypedArrayNode $node The related node - * * @throws InvalidDefinitionException */ protected function validatePrototypeNode(PrototypedArrayNode $node) diff --git a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php index 97f67094625c2..900fb4eba5c45 100644 --- a/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php @@ -23,8 +23,6 @@ class EnumNodeDefinition extends ScalarNodeDefinition private $values; /** - * @param array $values - * * @return $this */ public function values(array $values) diff --git a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php index 3b55958309164..004042817afa5 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php @@ -25,9 +25,6 @@ class ExprBuilder public $ifPart; public $thenPart; - /** - * @param NodeDefinition $node The related node - */ public function __construct(NodeDefinition $node) { $this->node = $node; @@ -36,8 +33,6 @@ public function __construct(NodeDefinition $node) /** * Marks the expression as being always used. * - * @param \Closure $then - * * @return $this */ public function always(\Closure $then = null) @@ -56,8 +51,6 @@ public function always(\Closure $then = null) * * The default one tests if the value is true. * - * @param \Closure $closure - * * @return $this */ public function ifTrue(\Closure $closure = null) @@ -110,8 +103,6 @@ public function ifArray() /** * Tests if the value is in an array. * - * @param array $array - * * @return $this */ public function ifInArray(array $array) @@ -124,8 +115,6 @@ public function ifInArray(array $array) /** * Tests if the value is not in an array. * - * @param array $array - * * @return $this */ public function ifNotInArray(array $array) @@ -138,8 +127,6 @@ public function ifNotInArray(array $array) /** * Sets the closure to run if the test pass. * - * @param \Closure $closure - * * @return $this */ public function then(\Closure $closure) diff --git a/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php index 09327a6db6768..105e2d64709b1 100644 --- a/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php @@ -22,9 +22,6 @@ class MergeBuilder public $allowFalse = false; public $allowOverwrite = true; - /** - * @param NodeDefinition $node The related node - */ public function __construct(NodeDefinition $node) { $this->node = $node; diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index d795f8ff84865..9b325f189b841 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -37,8 +37,6 @@ public function __construct() /** * Set the parent node. * - * @param ParentNodeDefinitionInterface $parent The parent node - * * @return $this */ public function setParent(ParentNodeDefinitionInterface $parent = null) @@ -177,8 +175,6 @@ public function node($name, $type) * ->end() * ; * - * @param NodeDefinition $node - * * @return $this */ public function append(NodeDefinition $node) diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php index 9dcba444ac479..3c2610b5d1157 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php @@ -32,10 +32,6 @@ abstract class NodeDefinition implements NodeParentInterface protected $nullEquivalent; protected $trueEquivalent = true; protected $falseEquivalent = false; - - /** - * @var NodeParentInterface|null - */ protected $parent; protected $attributes = array(); @@ -52,8 +48,6 @@ public function __construct($name, NodeParentInterface $parent = null) /** * Sets the parent node. * - * @param NodeParentInterface $parent The parent - * * @return $this */ public function setParent(NodeParentInterface $parent) diff --git a/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php index 8ff1d8a045103..35e30487a60eb 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php @@ -22,9 +22,6 @@ class NormalizationBuilder public $before = array(); public $remappings = array(); - /** - * @param NodeDefinition $node The related node - */ public function __construct(NodeDefinition $node) { $this->node = $node; @@ -48,8 +45,6 @@ public function remap($key, $plural = null) /** * Registers a closure to run before the normalization or an expression builder to build it if null is provided. * - * @param \Closure $closure - * * @return ExprBuilder|$this */ public function before(\Closure $closure = null) diff --git a/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php b/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php index 0acd7343910e3..bb2b9eb33924b 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php @@ -21,9 +21,6 @@ class ValidationBuilder protected $node; public $rules = array(); - /** - * @param NodeDefinition $node The related node - */ public function __construct(NodeDefinition $node) { $this->node = $node; @@ -32,8 +29,6 @@ public function __construct(NodeDefinition $node) /** * Registers a closure to run as normalization or an expression builder to build it if null is provided. * - * @param \Closure $closure - * * @return ExprBuilder|$this */ public function rule(\Closure $closure = null) diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index 1c3c2188326be..08f335a015f30 100644 --- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -150,8 +150,6 @@ public function getDefaultValue() /** * Sets the node prototype. - * - * @param PrototypeNodeInterface $node */ public function setPrototype(PrototypeNodeInterface $node) { @@ -171,8 +169,6 @@ public function getPrototype() /** * Disable adding concrete children for prototyped nodes. * - * @param NodeInterface $node The child node to add - * * @throws Exception */ public function addChild(NodeInterface $node) diff --git a/src/Symfony/Component/Config/Loader/DelegatingLoader.php b/src/Symfony/Component/Config/Loader/DelegatingLoader.php index 24a00be201c01..237009d45e6d1 100644 --- a/src/Symfony/Component/Config/Loader/DelegatingLoader.php +++ b/src/Symfony/Component/Config/Loader/DelegatingLoader.php @@ -23,9 +23,6 @@ */ class DelegatingLoader extends Loader { - /** - * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance - */ public function __construct(LoaderResolverInterface $resolver) { $this->resolver = $resolver; diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php index fd6947c75a057..b058e485d302c 100644 --- a/src/Symfony/Component/Config/Loader/FileLoader.php +++ b/src/Symfony/Component/Config/Loader/FileLoader.php @@ -22,21 +22,12 @@ */ abstract class FileLoader extends Loader { - /** - * @var array - */ protected static $loading = array(); - /** - * @var FileLocatorInterface - */ protected $locator; private $currentDir; - /** - * @param FileLocatorInterface $locator A FileLocatorInterface instance - */ public function __construct(FileLocatorInterface $locator) { $this->locator = $locator; diff --git a/src/Symfony/Component/Config/Loader/LoaderInterface.php b/src/Symfony/Component/Config/Loader/LoaderInterface.php index dd0a85a6b08c7..dfca9dd27bf0d 100644 --- a/src/Symfony/Component/Config/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Config/Loader/LoaderInterface.php @@ -47,8 +47,6 @@ public function getResolver(); /** * Sets the loader resolver. - * - * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance */ public function setResolver(LoaderResolverInterface $resolver); } diff --git a/src/Symfony/Component/Config/Loader/LoaderResolver.php b/src/Symfony/Component/Config/Loader/LoaderResolver.php index 288feb865bd1b..9299bc000f5f4 100644 --- a/src/Symfony/Component/Config/Loader/LoaderResolver.php +++ b/src/Symfony/Component/Config/Loader/LoaderResolver.php @@ -50,11 +50,6 @@ public function resolve($resource, $type = null) return false; } - /** - * Adds a loader. - * - * @param LoaderInterface $loader A LoaderInterface instance - */ public function addLoader(LoaderInterface $loader) { $this->loaders[] = $loader; diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 6168929beaf7d..a64543cfa4394 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -93,9 +93,6 @@ public function setDispatcher(EventDispatcherInterface $dispatcher) /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code * * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. @@ -157,9 +154,6 @@ public function run(InputInterface $input = null, OutputInterface $output = null /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ public function doRun(InputInterface $input, OutputInterface $output) @@ -202,11 +196,6 @@ public function doRun(InputInterface $input, OutputInterface $output) return $exitCode; } - /** - * Set a helper set to be used with the command. - * - * @param HelperSet $helperSet The helper set - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -226,11 +215,6 @@ public function getHelperSet() return $this->helperSet; } - /** - * Set an input definition to be used with this application. - * - * @param InputDefinition $definition The input definition - */ public function setDefinition(InputDefinition $definition) { $this->definition = $definition; @@ -370,8 +354,6 @@ public function addCommands(array $commands) * If a command with the same name already exists, it will be overridden. * If the command is not enabled it will not be added. * - * @param Command $command A Command object - * * @return Command|null The registered command if enabled or null */ public function add(Command $command) @@ -660,9 +642,6 @@ public function asXml($namespace = null, $asDom = false) /** * Renders a caught exception. - * - * @param \Exception $e An exception instance - * @param OutputInterface $output An OutputInterface instance */ public function renderException($e, $output) { @@ -811,9 +790,6 @@ public function setTerminalDimensions($width, $height) /** * Configures the input and output instances based on the user arguments and options. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function configureIO(InputInterface $input, OutputInterface $output) { @@ -852,10 +828,6 @@ protected function configureIO(InputInterface $input, OutputInterface $output) * If an event dispatcher has been attached to the application, * events are also dispatched during the life-cycle of the command. * - * @param Command $command A Command instance - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) @@ -908,8 +880,6 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI /** * Gets the name of the command based on input. * - * @param InputInterface $input The input interface - * * @return string The command name */ protected function getCommandName(InputInterface $input) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index ceddc75da765d..dfbb1da86e7ba 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -74,11 +74,6 @@ public function ignoreValidationErrors() $this->ignoreValidationErrors = true; } - /** - * Sets the application instance for this command. - * - * @param Application $application An Application instance - */ public function setApplication(Application $application = null) { $this->application = $application; @@ -89,11 +84,6 @@ public function setApplication(Application $application = null) } } - /** - * Sets the helper set. - * - * @param HelperSet $helperSet A HelperSet instance - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -147,9 +137,6 @@ protected function configure() * execute() method, you set the code to execute by passing * a Closure to the setCode() method. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * * @return null|int null or 0 if everything went fine, or an error code * * @throws \LogicException When this abstract method is not implemented @@ -167,9 +154,6 @@ protected function execute(InputInterface $input, OutputInterface $output) * This method is executed before the InputDefinition is validated. * This means that this is the only place where the command can * interactively ask for values of missing required arguments. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function interact(InputInterface $input, OutputInterface $output) { @@ -180,9 +164,6 @@ protected function interact(InputInterface $input, OutputInterface $output) * * This is mainly useful when a lot of commands extends one main command * where some things need to be initialized based on the input arguments and options. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function initialize(InputInterface $input, OutputInterface $output) { @@ -195,9 +176,6 @@ protected function initialize(InputInterface $input, OutputInterface $output) * setCode() method or by overriding the execute() method * in a sub-class. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * * @return int The command exit code * * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index c0e7b38843902..27e23e1af7f9f 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -57,11 +57,6 @@ protected function configure() ; } - /** - * Sets the command. - * - * @param Command $command The command to set - */ public function setCommand(Command $command) { $this->command = $command; diff --git a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php index 90018a14f37b9..2100b9403497d 100644 --- a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php +++ b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php @@ -23,14 +23,7 @@ class ApplicationDescription { const GLOBAL_NAMESPACE = '_global'; - /** - * @var Application - */ private $application; - - /** - * @var null|string - */ private $namespace; /** @@ -48,10 +41,6 @@ class ApplicationDescription */ private $aliases; - /** - * @param Application $application - * @param string|null $namespace - */ public function __construct(Application $application, $namespace = null) { $this->application = $application; @@ -127,8 +116,6 @@ private function inspectApplication() } /** - * @param array $commands - * * @return array */ private function sortCommands(array $commands) diff --git a/src/Symfony/Component/Console/Descriptor/Descriptor.php b/src/Symfony/Component/Console/Descriptor/Descriptor.php index 49e21939f9052..469bbd7e38ad6 100644 --- a/src/Symfony/Component/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Component/Console/Descriptor/Descriptor.php @@ -72,9 +72,6 @@ protected function write($content, $decorated = false) /** * Describes an InputArgument instance. * - * @param InputArgument $argument - * @param array $options - * * @return string|mixed */ abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); @@ -82,9 +79,6 @@ abstract protected function describeInputArgument(InputArgument $argument, array /** * Describes an InputOption instance. * - * @param InputOption $option - * @param array $options - * * @return string|mixed */ abstract protected function describeInputOption(InputOption $option, array $options = array()); @@ -92,9 +86,6 @@ abstract protected function describeInputOption(InputOption $option, array $opti /** * Describes an InputDefinition instance. * - * @param InputDefinition $definition - * @param array $options - * * @return string|mixed */ abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); @@ -102,9 +93,6 @@ abstract protected function describeInputDefinition(InputDefinition $definition, /** * Describes a Command instance. * - * @param Command $command - * @param array $options - * * @return string|mixed */ abstract protected function describeCommand(Command $command, array $options = array()); @@ -112,9 +100,6 @@ abstract protected function describeCommand(Command $command, array $options = a /** * Describes an Application instance. * - * @param Application $application - * @param array $options - * * @return string|mixed */ abstract protected function describeApplication(Application $application, array $options = array()); diff --git a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php index 942fdc96226ac..51c4d2ef0e619 100644 --- a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -81,9 +81,6 @@ protected function describeApplication(Application $application, array $options /** * Writes data as json. * - * @param array $data - * @param array $options - * * @return array|string */ private function writeData(array $data, array $options) @@ -92,8 +89,6 @@ private function writeData(array $data, array $options) } /** - * @param InputArgument $argument - * * @return array */ private function getInputArgumentData(InputArgument $argument) @@ -108,8 +103,6 @@ private function getInputArgumentData(InputArgument $argument) } /** - * @param InputOption $option - * * @return array */ private function getInputOptionData(InputOption $option) @@ -126,8 +119,6 @@ private function getInputOptionData(InputOption $option) } /** - * @param InputDefinition $definition - * * @return array */ private function getInputDefinitionData(InputDefinition $definition) @@ -146,8 +137,6 @@ private function getInputDefinitionData(InputDefinition $definition) } /** - * @param Command $command - * * @return array */ private function getCommandData(Command $command) diff --git a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php index 249eb9cb840aa..1d6432428c205 100644 --- a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php @@ -282,7 +282,7 @@ private function getColumnWidth(array $commands) * * @return int */ - private function calculateTotalWidthForOptions($options) + private function calculateTotalWidthForOptions(array $options) { $totalWidth = 0; foreach ($options as $option) { diff --git a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php index 0f1fb472c25c8..177a054cc18d1 100644 --- a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php @@ -27,8 +27,6 @@ class XmlDescriptor extends Descriptor { /** - * @param InputDefinition $definition - * * @return \DOMDocument */ public function getInputDefinitionDocument(InputDefinition $definition) @@ -50,8 +48,6 @@ public function getInputDefinitionDocument(InputDefinition $definition) } /** - * @param Command $command - * * @return \DOMDocument */ public function getCommandDocument(Command $command) @@ -172,9 +168,6 @@ protected function describeApplication(Application $application, array $options /** * Appends document children to parent node. - * - * @param \DOMNode $parentNode - * @param \DOMNode $importedParent */ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) { @@ -186,8 +179,6 @@ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) /** * Writes DOM document. * - * @param \DOMDocument $dom - * * @return \DOMDocument|string */ private function writeDocument(\DOMDocument $dom) @@ -197,8 +188,6 @@ private function writeDocument(\DOMDocument $dom) } /** - * @param InputArgument $argument - * * @return \DOMDocument */ private function getInputArgumentDocument(InputArgument $argument) @@ -223,8 +212,6 @@ private function getInputArgumentDocument(InputArgument $argument) } /** - * @param InputOption $option - * * @return \DOMDocument */ private function getInputOptionDocument(InputOption $option) diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 4d3eda34189bf..e15b13297c71d 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -170,9 +170,7 @@ public function unsetOption($option) } /** - * Sets multiple style options at once. - * - * @param array $options + * {@inheritdoc} */ public function setOptions(array $options) { diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php index c36fda80708d0..4c7dc4134d723 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php @@ -48,8 +48,6 @@ public function unsetOption($option); /** * Sets multiple style options at once. - * - * @param array $options */ public function setOptions(array $options); diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php index c21a569622400..b560087080568 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -21,14 +21,8 @@ class OutputFormatterStyleStack */ private $styles; - /** - * @var OutputFormatterStyleInterface - */ private $emptyStyle; - /** - * @param OutputFormatterStyleInterface|null $emptyStyle - */ public function __construct(OutputFormatterStyleInterface $emptyStyle = null) { $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle(); @@ -45,8 +39,6 @@ public function reset() /** * Pushes a style in the stack. - * - * @param OutputFormatterStyleInterface $style */ public function push(OutputFormatterStyleInterface $style) { @@ -56,8 +48,6 @@ public function push(OutputFormatterStyleInterface $style) /** * Pops a style from the stack. * - * @param OutputFormatterStyleInterface|null $style - * * @return OutputFormatterStyleInterface * * @throws \InvalidArgumentException When style tags incorrectly nested @@ -98,8 +88,6 @@ public function getCurrent() } /** - * @param OutputFormatterStyleInterface $emptyStyle - * * @return $this */ public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) diff --git a/src/Symfony/Component/Console/Helper/Helper.php b/src/Symfony/Component/Console/Helper/Helper.php index b429e630c7217..8bf82a148732a 100644 --- a/src/Symfony/Component/Console/Helper/Helper.php +++ b/src/Symfony/Component/Console/Helper/Helper.php @@ -23,9 +23,7 @@ abstract class Helper implements HelperInterface protected $helperSet = null; /** - * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance + * {@inheritdoc} */ public function setHelperSet(HelperSet $helperSet = null) { @@ -33,9 +31,7 @@ public function setHelperSet(HelperSet $helperSet = null) } /** - * Gets the helper set associated with this helper. - * - * @return HelperSet|null + * {@inheritdoc} */ public function getHelperSet() { diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symfony/Component/Console/Helper/HelperInterface.php index 5a923e0a88cb9..1ce823587e4a7 100644 --- a/src/Symfony/Component/Console/Helper/HelperInterface.php +++ b/src/Symfony/Component/Console/Helper/HelperInterface.php @@ -20,8 +20,6 @@ interface HelperInterface { /** * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance */ public function setHelperSet(HelperSet $helperSet = null); diff --git a/src/Symfony/Component/Console/Helper/HelperSet.php b/src/Symfony/Component/Console/Helper/HelperSet.php index 3bf15525a9c61..86e4a5c997a21 100644 --- a/src/Symfony/Component/Console/Helper/HelperSet.php +++ b/src/Symfony/Component/Console/Helper/HelperSet.php @@ -90,11 +90,6 @@ public function get($name) return $this->helpers[$name]; } - /** - * Sets the command associated with this helper set. - * - * @param Command $command A Command instance - */ public function setCommand(Command $command = null) { $this->command = $command; diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 4cdecfd41a49a..3b10ebf810949 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -33,10 +33,6 @@ class QuestionHelper extends Helper /** * Asks a question to the user. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * @param Question $question The question to ask - * * @return mixed The user answer * * @throws \RuntimeException If there is no data to read in the input stream @@ -105,9 +101,6 @@ public function getName() * * This method is public for PHP 5.3 compatibility, it should be private. * - * @param OutputInterface $output - * @param Question $question - * * @return bool|mixed|null|string * * @throws \Exception @@ -154,9 +147,6 @@ public function doAsk(OutputInterface $output, Question $question) /** * Outputs the question prompt. - * - * @param OutputInterface $output - * @param Question $question */ protected function writePrompt(OutputInterface $output, Question $question) { @@ -181,9 +171,6 @@ protected function writePrompt(OutputInterface $output, Question $question) /** * Outputs an error message. - * - * @param OutputInterface $output - * @param \Exception $error */ protected function writeError(OutputInterface $output, \Exception $error) { diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 59a1723b8809f..f719475670f08 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -24,22 +24,16 @@ class Table { /** * Table headers. - * - * @var array */ private $headers = array(); /** * Table rows. - * - * @var array */ private $rows = array(); /** * Column widths cache. - * - * @var array */ private $columnWidths = array(); @@ -374,7 +368,7 @@ private function buildTableRows($rows) * * @return array */ - private function fillNextRows($rows, $line) + private function fillNextRows(array $rows, $line) { $unmergedRows = array(); foreach ($rows[$line] as $column => $cell) { @@ -425,7 +419,7 @@ private function fillNextRows($rows, $line) /** * fill cells for a row that contains colspan > 1. * - * @param array $row + * @param array|\Traversable $row * * @return array */ @@ -451,7 +445,7 @@ private function fillCells($row) * * @return array */ - private function copyRow($rows, $line) + private function copyRow(array $rows, $line) { $row = $rows[$line]; foreach ($row as $cellKey => $cellValue) { @@ -467,8 +461,6 @@ private function copyRow($rows, $line) /** * Gets number of columns by row. * - * @param array $row - * * @return int */ private function getNumberOfColumns(array $row) @@ -484,11 +476,9 @@ private function getNumberOfColumns(array $row) /** * Gets list of columns for the given row. * - * @param array $row - * * @return array */ - private function getRowColumns($row) + private function getRowColumns(array $row) { $columns = range(0, $this->numberOfColumns - 1); foreach ($row as $cellKey => $cell) { diff --git a/src/Symfony/Component/Console/Helper/TableCell.php b/src/Symfony/Component/Console/Helper/TableCell.php index 1b34774f26516..8562f72fe23d0 100644 --- a/src/Symfony/Component/Console/Helper/TableCell.php +++ b/src/Symfony/Component/Console/Helper/TableCell.php @@ -16,14 +16,7 @@ */ class TableCell { - /** - * @var string - */ private $value; - - /** - * @var array - */ private $options = array( 'rowspan' => 1, 'colspan' => 1, diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php index 52989c5cfc7f5..fc29abb370d83 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -246,8 +246,6 @@ public function setPadType($padType) * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | * +---------------+-----------------------+------------------+ - * - * @param OutputInterface $output */ public function render(OutputInterface $output) { diff --git a/src/Symfony/Component/Console/Helper/TableSeparator.php b/src/Symfony/Component/Console/Helper/TableSeparator.php index 8cc73e69a25f4..c7b8dc9c22339 100644 --- a/src/Symfony/Component/Console/Helper/TableSeparator.php +++ b/src/Symfony/Component/Console/Helper/TableSeparator.php @@ -18,9 +18,6 @@ */ class TableSeparator extends TableCell { - /** - * @param array $options - */ public function __construct(array $options = array()) { parent::__construct('', $options); diff --git a/src/Symfony/Component/Console/Input/ArrayInput.php b/src/Symfony/Component/Console/Input/ArrayInput.php index eb91f3690e3b2..bf987f98e1197 100644 --- a/src/Symfony/Component/Console/Input/ArrayInput.php +++ b/src/Symfony/Component/Console/Input/ArrayInput.php @@ -24,10 +24,6 @@ class ArrayInput extends Input { private $parameters; - /** - * @param array $parameters An array of parameters - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(array $parameters, InputDefinition $definition = null) { $this->parameters = $parameters; diff --git a/src/Symfony/Component/Console/Input/Input.php b/src/Symfony/Component/Console/Input/Input.php index c9073b9e2438d..16f82790d278a 100644 --- a/src/Symfony/Component/Console/Input/Input.php +++ b/src/Symfony/Component/Console/Input/Input.php @@ -24,17 +24,11 @@ */ abstract class Input implements InputInterface { - /** - * @var InputDefinition - */ protected $definition; protected $options = array(); protected $arguments = array(); protected $interactive = true; - /** - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(InputDefinition $definition = null) { if (null === $definition) { diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index 2fb5e492ebbe0..d7a1f2d0fdbc8 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -46,8 +46,6 @@ public function __construct(array $definition = array()) /** * Sets the definition of the input. - * - * @param array $definition The definition array */ public function setDefinition(array $definition) { @@ -94,10 +92,6 @@ public function addArguments($arguments = array()) } /** - * Adds an InputArgument object. - * - * @param InputArgument $argument An InputArgument object - * * @throws \LogicException When incorrect argument is given */ public function addArgument(InputArgument $argument) @@ -231,10 +225,6 @@ public function addOptions($options = array()) } /** - * Adds an InputOption object. - * - * @param InputOption $option An InputOption object - * * @throws \LogicException When option given already exist */ public function addOption(InputOption $option) diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 5ba1604048322..04912e9f594c5 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -52,8 +52,6 @@ public function getParameterOption($values, $default = false); /** * Binds the current Input instance with the given arguments and options. - * - * @param InputDefinition $definition A InputDefinition instance */ public function bind(InputDefinition $definition); diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 6f7d68a9bad13..e6ca45aa42c56 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -190,8 +190,6 @@ public function getDescription() /** * Checks whether the given option equals this one. * - * @param InputOption $option option to compare - * * @return bool */ public function equals(InputOption $option) diff --git a/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/Symfony/Component/Console/Logger/ConsoleLogger.php index 4b237c17c6904..d1aba10ac0d46 100644 --- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -29,13 +29,7 @@ class ConsoleLogger extends AbstractLogger const INFO = 'info'; const ERROR = 'error'; - /** - * @var OutputInterface - */ private $output; - /** - * @var array - */ private $verbosityLevelMap = array( LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, @@ -46,9 +40,6 @@ class ConsoleLogger extends AbstractLogger LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, ); - /** - * @var array - */ private $formatLevelMap = array( LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, @@ -60,11 +51,6 @@ class ConsoleLogger extends AbstractLogger LogLevel::DEBUG => self::INFO, ); - /** - * @param OutputInterface $output - * @param array $verbosityLevelMap - * @param array $formatLevelMap - */ public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) { $this->output = $output; diff --git a/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php b/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php index 5eb4fc7acde2b..b44ea7e058de6 100644 --- a/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php +++ b/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php @@ -26,10 +26,5 @@ interface ConsoleOutputInterface extends OutputInterface */ public function getErrorOutput(); - /** - * Sets the OutputInterface used for errors. - * - * @param OutputInterface $error - */ public function setErrorOutput(OutputInterface $error); } diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symfony/Component/Console/Output/OutputInterface.php index 9a956e25dbff8..ff007e629190a 100644 --- a/src/Symfony/Component/Console/Output/OutputInterface.php +++ b/src/Symfony/Component/Console/Output/OutputInterface.php @@ -79,11 +79,6 @@ public function setDecorated($decorated); */ public function isDecorated(); - /** - * Sets output formatter. - * - * @param OutputFormatterInterface $formatter - */ public function setFormatter(OutputFormatterInterface $formatter); /** diff --git a/src/Symfony/Component/Console/Shell.php b/src/Symfony/Component/Console/Shell.php index c4967236d6da2..b2e234cd59e5e 100644 --- a/src/Symfony/Component/Console/Shell.php +++ b/src/Symfony/Component/Console/Shell.php @@ -36,8 +36,6 @@ class Shell /** * If there is no readline support for the current PHP executable * a \RuntimeException exception is thrown. - * - * @param Application $application An application instance */ public function __construct(Application $application) { diff --git a/src/Symfony/Component/Console/Style/OutputStyle.php b/src/Symfony/Component/Console/Style/OutputStyle.php index 8371bb533551e..f3bf2912c9563 100644 --- a/src/Symfony/Component/Console/Style/OutputStyle.php +++ b/src/Symfony/Component/Console/Style/OutputStyle.php @@ -24,9 +24,6 @@ abstract class OutputStyle implements OutputInterface, StyleInterface { private $output; - /** - * @param OutputInterface $output - */ public function __construct(OutputInterface $output) { $this->output = $output; diff --git a/src/Symfony/Component/Console/Style/StyleInterface.php b/src/Symfony/Component/Console/Style/StyleInterface.php index 2448547f855aa..a9205e5a70623 100644 --- a/src/Symfony/Component/Console/Style/StyleInterface.php +++ b/src/Symfony/Component/Console/Style/StyleInterface.php @@ -34,8 +34,6 @@ public function section($message); /** * Formats a list. - * - * @param array $elements */ public function listing(array $elements); @@ -83,9 +81,6 @@ public function caution($message); /** * Formats a table. - * - * @param array $headers - * @param array $rows */ public function table(array $headers, array $rows); diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php index a1a0fb8c2ee4a..bfb23ac8eb8b2 100644 --- a/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -39,10 +39,6 @@ class SymfonyStyle extends OutputStyle private $lineLength; private $bufferedOutput; - /** - * @param InputInterface $input - * @param OutputInterface $output - */ public function __construct(InputInterface $input, OutputInterface $output) { $this->input = $input; @@ -318,8 +314,6 @@ public function createProgressBar($max = 0) } /** - * @param Question $question - * * @return string */ public function askQuestion(Question $question) diff --git a/src/Symfony/Component/Console/Tester/ApplicationTester.php b/src/Symfony/Component/Console/Tester/ApplicationTester.php index a8f8dd9702893..dc121645e23ed 100644 --- a/src/Symfony/Component/Console/Tester/ApplicationTester.php +++ b/src/Symfony/Component/Console/Tester/ApplicationTester.php @@ -34,9 +34,6 @@ class ApplicationTester private $output; private $statusCode; - /** - * @param Application $application An Application instance to test - */ public function __construct(Application $application) { $this->application = $application; diff --git a/src/Symfony/Component/Console/Tester/CommandTester.php b/src/Symfony/Component/Console/Tester/CommandTester.php index 3619281cbb273..a194949041939 100644 --- a/src/Symfony/Component/Console/Tester/CommandTester.php +++ b/src/Symfony/Component/Console/Tester/CommandTester.php @@ -29,9 +29,6 @@ class CommandTester private $output; private $statusCode; - /** - * @param Command $command A Command instance to test - */ public function __construct(Command $command) { $this->command = $command; diff --git a/src/Symfony/Component/CssSelector/Node/AttributeNode.php b/src/Symfony/Component/CssSelector/Node/AttributeNode.php index b10a4dd5b341f..ae327d1f8d03b 100644 --- a/src/Symfony/Component/CssSelector/Node/AttributeNode.php +++ b/src/Symfony/Component/CssSelector/Node/AttributeNode.php @@ -21,29 +21,10 @@ */ class AttributeNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $namespace; - - /** - * @var string - */ private $attribute; - - /** - * @var string - */ private $operator; - - /** - * @var string - */ private $value; /** diff --git a/src/Symfony/Component/CssSelector/Node/ClassNode.php b/src/Symfony/Component/CssSelector/Node/ClassNode.php index 544342f871f67..1ff2ee3549e61 100644 --- a/src/Symfony/Component/CssSelector/Node/ClassNode.php +++ b/src/Symfony/Component/CssSelector/Node/ClassNode.php @@ -21,14 +21,7 @@ */ class ClassNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $name; /** diff --git a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php index 6d00db431c5b5..f29867e49bd17 100644 --- a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php @@ -21,19 +21,8 @@ */ class CombinedSelectorNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $combinator; - - /** - * @var NodeInterface - */ private $subSelector; /** diff --git a/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/src/Symfony/Component/CssSelector/Node/FunctionNode.php index f94af8dafce56..08931d3560f86 100644 --- a/src/Symfony/Component/CssSelector/Node/FunctionNode.php +++ b/src/Symfony/Component/CssSelector/Node/FunctionNode.php @@ -23,19 +23,8 @@ */ class FunctionNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $name; - - /** - * @var Token[] - */ private $arguments; /** diff --git a/src/Symfony/Component/CssSelector/Node/HashNode.php b/src/Symfony/Component/CssSelector/Node/HashNode.php index ddbe76477adc5..eb24ae2f5952b 100644 --- a/src/Symfony/Component/CssSelector/Node/HashNode.php +++ b/src/Symfony/Component/CssSelector/Node/HashNode.php @@ -21,14 +21,7 @@ */ class HashNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $id; /** diff --git a/src/Symfony/Component/CssSelector/Node/NegationNode.php b/src/Symfony/Component/CssSelector/Node/NegationNode.php index 0fafb0a120bc7..21deb88fc6590 100644 --- a/src/Symfony/Component/CssSelector/Node/NegationNode.php +++ b/src/Symfony/Component/CssSelector/Node/NegationNode.php @@ -21,20 +21,9 @@ */ class NegationNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var NodeInterface - */ private $subSelector; - /** - * @param NodeInterface $selector - * @param NodeInterface $subSelector - */ public function __construct(NodeInterface $selector, NodeInterface $subSelector) { $this->selector = $selector; diff --git a/src/Symfony/Component/CssSelector/Node/PseudoNode.php b/src/Symfony/Component/CssSelector/Node/PseudoNode.php index 0e413adc5488d..d888c254a190f 100644 --- a/src/Symfony/Component/CssSelector/Node/PseudoNode.php +++ b/src/Symfony/Component/CssSelector/Node/PseudoNode.php @@ -21,14 +21,7 @@ */ class PseudoNode extends AbstractNode { - /** - * @var NodeInterface - */ private $selector; - - /** - * @var string - */ private $identifier; /** diff --git a/src/Symfony/Component/CssSelector/Node/SelectorNode.php b/src/Symfony/Component/CssSelector/Node/SelectorNode.php index 4958da55afaf7..bb9ef2871408d 100644 --- a/src/Symfony/Component/CssSelector/Node/SelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/SelectorNode.php @@ -21,14 +21,7 @@ */ class SelectorNode extends AbstractNode { - /** - * @var NodeInterface - */ private $tree; - - /** - * @var null|string - */ private $pseudoElement; /** diff --git a/src/Symfony/Component/CssSelector/Node/Specificity.php b/src/Symfony/Component/CssSelector/Node/Specificity.php index 6adadfb6ff0d0..c7299c8dfa40c 100644 --- a/src/Symfony/Component/CssSelector/Node/Specificity.php +++ b/src/Symfony/Component/CssSelector/Node/Specificity.php @@ -27,19 +27,8 @@ class Specificity const B_FACTOR = 10; const C_FACTOR = 1; - /** - * @var int - */ private $a; - - /** - * @var int - */ private $b; - - /** - * @var int - */ private $c; /** @@ -55,8 +44,6 @@ public function __construct($a, $b, $c) } /** - * @param Specificity $specificity - * * @return self */ public function plus(Specificity $specificity) @@ -78,8 +65,6 @@ public function getValue() * Returns -1 if the object specificity is lower than the argument, * 0 if they are equal, and 1 if the argument is lower. * - * @param Specificity $specificity - * * @return int */ public function compareTo(Specificity $specificity) diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php b/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php index 049ddd3ec4ca7..ba6866239bdc6 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php @@ -25,9 +25,6 @@ interface HandlerInterface { /** - * @param Reader $reader - * @param TokenStream $stream - * * @return bool */ public function handle(Reader $reader, TokenStream $stream); diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php index b144223fbd6fe..67462082b4f0f 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php @@ -27,20 +27,9 @@ */ class HashHandler implements HandlerInterface { - /** - * @var TokenizerPatterns - */ private $patterns; - - /** - * @var TokenizerEscaping - */ private $escaping; - /** - * @param TokenizerPatterns $patterns - * @param TokenizerEscaping $escaping - */ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) { $this->patterns = $patterns; diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php index 86739eab99aca..d07f7d679d595 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php @@ -27,20 +27,9 @@ */ class IdentifierHandler implements HandlerInterface { - /** - * @var TokenizerPatterns - */ private $patterns; - - /** - * @var TokenizerEscaping - */ private $escaping; - /** - * @param TokenizerPatterns $patterns - * @param TokenizerEscaping $escaping - */ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) { $this->patterns = $patterns; diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php index 97a9387b18532..121bdff7b8c39 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php @@ -26,14 +26,8 @@ */ class NumberHandler implements HandlerInterface { - /** - * @var TokenizerPatterns - */ private $patterns; - /** - * @param TokenizerPatterns $patterns - */ public function __construct(TokenizerPatterns $patterns) { $this->patterns = $patterns; diff --git a/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php b/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php index 9f7a5946b02b1..b14dbf314834a 100644 --- a/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php +++ b/src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php @@ -29,20 +29,9 @@ */ class StringHandler implements HandlerInterface { - /** - * @var TokenizerPatterns - */ private $patterns; - - /** - * @var TokenizerEscaping - */ private $escaping; - /** - * @param TokenizerPatterns $patterns - * @param TokenizerEscaping $escaping - */ public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) { $this->patterns = $patterns; diff --git a/src/Symfony/Component/CssSelector/Parser/Parser.php b/src/Symfony/Component/CssSelector/Parser/Parser.php index 722a32f22f371..861338235a2a5 100644 --- a/src/Symfony/Component/CssSelector/Parser/Parser.php +++ b/src/Symfony/Component/CssSelector/Parser/Parser.php @@ -25,14 +25,8 @@ */ class Parser implements ParserInterface { - /** - * @var Tokenizer - */ private $tokenizer; - /** - * @param null|Tokenizer $tokenizer - */ public function __construct(Tokenizer $tokenizer = null) { $this->tokenizer = $tokenizer ?: new Tokenizer(); @@ -101,8 +95,6 @@ public static function parseSeries(array $tokens) /** * Parses selector nodes. * - * @param TokenStream $stream - * * @return array */ private function parseSelectorList(TokenStream $stream) @@ -127,8 +119,6 @@ private function parseSelectorList(TokenStream $stream) /** * Parses next selector or combined node. * - * @param TokenStream $stream - * * @return Node\SelectorNode * * @throws SyntaxErrorException @@ -290,8 +280,6 @@ private function parseSimpleSelector(TokenStream $stream, $insideNegation = fals /** * Parses next element node. * - * @param TokenStream $stream - * * @return Node\ElementNode */ private function parseElementNode(TokenStream $stream) @@ -323,9 +311,6 @@ private function parseElementNode(TokenStream $stream) /** * Parses next attribute node. * - * @param Node\NodeInterface $selector - * @param TokenStream $stream - * * @return Node\AttributeNode * * @throws SyntaxErrorException diff --git a/src/Symfony/Component/CssSelector/Parser/Token.php b/src/Symfony/Component/CssSelector/Parser/Token.php index 6f7586f612ed2..bcc31a23c57ae 100644 --- a/src/Symfony/Component/CssSelector/Parser/Token.php +++ b/src/Symfony/Component/CssSelector/Parser/Token.php @@ -89,8 +89,6 @@ public function isFileEnd() } /** - * @param array $values - * * @return bool */ public function isDelimiter(array $values = array()) diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php index c4dd3375e10cf..ac87d313c9e80 100644 --- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -57,8 +57,6 @@ class TokenStream /** * Pushes a token. * - * @param Token $token - * * @return $this */ public function push(Token $token) diff --git a/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php b/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php index d549f9338abc7..a723b9669c04d 100644 --- a/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php +++ b/src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php @@ -49,8 +49,6 @@ public function __construct() /** * Tokenize selector source code. * - * @param Reader $reader - * * @return TokenStream */ public function tokenize(Reader $reader) diff --git a/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php b/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php index bf5096be9fde8..186bd4d761dd0 100644 --- a/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php +++ b/src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php @@ -21,14 +21,8 @@ */ class TokenizerEscaping { - /** - * @var TokenizerPatterns - */ private $patterns; - /** - * @param TokenizerPatterns $patterns - */ public function __construct(TokenizerPatterns $patterns) { $this->patterns = $patterns; diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php index 9ce018f13a73b..619f53eeca8e6 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php @@ -37,9 +37,6 @@ public function getCombinationTranslators() } /** - * @param XPathExpr $xpath - * @param XPathExpr $combinedXpath - * * @return XPathExpr */ public function translateDescendant(XPathExpr $xpath, XPathExpr $combinedXpath) @@ -48,9 +45,6 @@ public function translateDescendant(XPathExpr $xpath, XPathExpr $combinedXpath) } /** - * @param XPathExpr $xpath - * @param XPathExpr $combinedXpath - * * @return XPathExpr */ public function translateChild(XPathExpr $xpath, XPathExpr $combinedXpath) @@ -59,9 +53,6 @@ public function translateChild(XPathExpr $xpath, XPathExpr $combinedXpath) } /** - * @param XPathExpr $xpath - * @param XPathExpr $combinedXpath - * * @return XPathExpr */ public function translateDirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath) @@ -73,9 +64,6 @@ public function translateDirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpa } /** - * @param XPathExpr $xpath - * @param XPathExpr $combinedXpath - * * @return XPathExpr */ public function translateIndirectAdjacent(XPathExpr $xpath, XPathExpr $combinedXpath) diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php index 41ece8a42208c..73567b27a1634 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -109,9 +109,6 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $las } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr */ public function translateNthLastChild(XPathExpr $xpath, FunctionNode $function) @@ -120,9 +117,6 @@ public function translateNthLastChild(XPathExpr $xpath, FunctionNode $function) } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr */ public function translateNthOfType(XPathExpr $xpath, FunctionNode $function) @@ -131,9 +125,6 @@ public function translateNthOfType(XPathExpr $xpath, FunctionNode $function) } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr * * @throws ExpressionErrorException @@ -148,9 +139,6 @@ public function translateNthLastOfType(XPathExpr $xpath, FunctionNode $function) } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr * * @throws ExpressionErrorException @@ -174,9 +162,6 @@ public function translateContains(XPathExpr $xpath, FunctionNode $function) } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr * * @throws ExpressionErrorException diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php index 1ed05bd6b89d9..fbfb98792f9fa 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -26,9 +26,6 @@ */ class HtmlExtension extends AbstractExtension { - /** - * @param Translator $translator - */ public function __construct(Translator $translator) { $translator @@ -65,8 +62,6 @@ public function getFunctionTranslators() } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateChecked(XPathExpr $xpath) @@ -79,8 +74,6 @@ public function translateChecked(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateLink(XPathExpr $xpath) @@ -89,8 +82,6 @@ public function translateLink(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateDisabled(XPathExpr $xpath) @@ -120,8 +111,6 @@ public function translateDisabled(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateEnabled(XPathExpr $xpath) @@ -158,9 +147,6 @@ public function translateEnabled(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr * * @throws ExpressionErrorException @@ -187,8 +173,6 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateSelected(XPathExpr $xpath) @@ -197,8 +181,6 @@ public function translateSelected(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateInvalid(XPathExpr $xpath) @@ -207,8 +189,6 @@ public function translateInvalid(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateHover(XPathExpr $xpath) @@ -217,8 +197,6 @@ public function translateHover(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateVisited(XPathExpr $xpath) diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php index 49c77823cf598..8a42d7f650402 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -90,9 +90,6 @@ public function getNodeTranslators() } /** - * @param Node\SelectorNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateSelector(Node\SelectorNode $node, Translator $translator) @@ -101,9 +98,6 @@ public function translateSelector(Node\SelectorNode $node, Translator $translato } /** - * @param Node\CombinedSelectorNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateCombinedSelector(Node\CombinedSelectorNode $node, Translator $translator) @@ -112,9 +106,6 @@ public function translateCombinedSelector(Node\CombinedSelectorNode $node, Trans } /** - * @param Node\NegationNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateNegation(Node\NegationNode $node, Translator $translator) @@ -131,9 +122,6 @@ public function translateNegation(Node\NegationNode $node, Translator $translato } /** - * @param Node\FunctionNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateFunction(Node\FunctionNode $node, Translator $translator) @@ -144,9 +132,6 @@ public function translateFunction(Node\FunctionNode $node, Translator $translato } /** - * @param Node\PseudoNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translatePseudo(Node\PseudoNode $node, Translator $translator) @@ -157,9 +142,6 @@ public function translatePseudo(Node\PseudoNode $node, Translator $translator) } /** - * @param Node\AttributeNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateAttribute(Node\AttributeNode $node, Translator $translator) @@ -188,9 +170,6 @@ public function translateAttribute(Node\AttributeNode $node, Translator $transla } /** - * @param Node\ClassNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateClass(Node\ClassNode $node, Translator $translator) @@ -201,9 +180,6 @@ public function translateClass(Node\ClassNode $node, Translator $translator) } /** - * @param Node\HashNode $node - * @param Translator $translator - * * @return XPathExpr */ public function translateHash(Node\HashNode $node, Translator $translator) @@ -214,8 +190,6 @@ public function translateHash(Node\HashNode $node, Translator $translator) } /** - * @param Node\ElementNode $node - * * @return XPathExpr */ public function translateElement(Node\ElementNode $node) diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php index 008ec2b4b15bb..31d7af966e163 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php @@ -42,8 +42,6 @@ public function getPseudoClassTranslators() } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateRoot(XPathExpr $xpath) @@ -52,8 +50,6 @@ public function translateRoot(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateFirstChild(XPathExpr $xpath) @@ -65,8 +61,6 @@ public function translateFirstChild(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateLastChild(XPathExpr $xpath) @@ -78,8 +72,6 @@ public function translateLastChild(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr * * @throws ExpressionErrorException @@ -96,8 +88,6 @@ public function translateFirstOfType(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr * * @throws ExpressionErrorException @@ -114,8 +104,6 @@ public function translateLastOfType(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateOnlyChild(XPathExpr $xpath) @@ -127,8 +115,6 @@ public function translateOnlyChild(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr * * @throws ExpressionErrorException @@ -143,8 +129,6 @@ public function translateOnlyOfType(XPathExpr $xpath) } /** - * @param XPathExpr $xpath - * * @return XPathExpr */ public function translateEmpty(XPathExpr $xpath) diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 4158e2e14f0da..74c30dcbb9c70 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -28,9 +28,6 @@ */ class Translator implements TranslatorInterface { - /** - * @var ParserInterface - */ private $mainParser; /** @@ -39,33 +36,14 @@ class Translator implements TranslatorInterface private $shortcutParsers = array(); /** - * @var Extension\ExtensionInterface + * @var Extension\ExtensionInterface[] */ private $extensions = array(); - /** - * @var array - */ private $nodeTranslators = array(); - - /** - * @var array - */ private $combinationTranslators = array(); - - /** - * @var array - */ private $functionTranslators = array(); - - /** - * @var array - */ private $pseudoClassTranslators = array(); - - /** - * @var array - */ private $attributeMatchingTranslators = array(); public function __construct(ParserInterface $parser = null) @@ -142,8 +120,6 @@ public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or /** * Registers an extension. * - * @param Extension\ExtensionInterface $extension - * * @return $this */ public function registerExtension(Extension\ExtensionInterface $extension) @@ -178,8 +154,6 @@ public function getExtension($name) /** * Registers a shortcut parser. * - * @param ParserInterface $shortcut - * * @return $this */ public function registerParserShortcut(ParserInterface $shortcut) @@ -190,8 +164,6 @@ public function registerParserShortcut(ParserInterface $shortcut) } /** - * @param NodeInterface $node - * * @return XPathExpr * * @throws ExpressionErrorException @@ -224,9 +196,6 @@ public function addCombination($combiner, NodeInterface $xpath, NodeInterface $c } /** - * @param XPathExpr $xpath - * @param FunctionNode $function - * * @return XPathExpr * * @throws ExpressionErrorException diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index 51d0fdf3cd4be..c525830849dcc 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -151,8 +151,6 @@ public function handle(\Exception $exception) * If you have the Symfony HttpFoundation component installed, * this method will use it to create and send the response. If not, * it will fallback to plain PHP functions. - * - * @param \Exception $exception An \Exception instance */ private function failSafeHandle(\Exception $exception) { @@ -215,8 +213,6 @@ public function createResponse($exception) /** * Gets the HTML content associated with the given exception. * - * @param FlattenException $exception A FlattenException instance - * * @return string The content as a string */ public function getContent(FlattenException $exception) @@ -283,8 +279,6 @@ public function getContent(FlattenException $exception) /** * Gets the stylesheet associated with the given exception. * - * @param FlattenException $exception A FlattenException instance - * * @return string The stylesheet as a string */ public function getStylesheet(FlattenException $exception) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index 681f8afdde744..12e27298a682f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -51,8 +51,6 @@ public function setRepeatedPass(RepeatedPass $repeatedPass) /** * Processes a ContainerBuilder object to populate the service reference graph. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php index 0b9c573acfbdb..1f06fc9660094 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php @@ -31,8 +31,6 @@ class CheckCircularReferencesPass implements CompilerPassInterface /** * Checks the ContainerBuilder object for circular references. - * - * @param ContainerBuilder $container The ContainerBuilder instances */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php index 219e66313d13b..6dbdba5721011 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php @@ -33,8 +33,6 @@ class CheckDefinitionValidityPass implements CompilerPassInterface /** * Processes the ContainerBuilder to validate the Definition. * - * @param ContainerBuilder $container - * * @throws RuntimeException When the Definition is invalid */ public function process(ContainerBuilder $container) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php index f8c09d42f0c61..f545bd0fdcb13 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php @@ -39,8 +39,6 @@ class CheckReferenceValidityPass implements CompilerPassInterface /** * Processes the ContainerBuilder to validate References. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { @@ -112,9 +110,6 @@ private function validateReferences(array $arguments) /** * Validates the scope of a single Reference. * - * @param Reference $reference - * @param Definition $definition - * * @throws ScopeWideningInjectionException when the definition references a service of a narrower scope * @throws ScopeCrossingInjectionException when the definition references a service of another scope hierarchy */ diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index 1f6304ee82e13..dd9539eeb7cea 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -95,8 +95,6 @@ public function getLog() /** * Run the Compiler and process all Passes. - * - * @param ContainerBuilder $container */ public function compile(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php index 30cb1d5d466f3..308500605893d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php @@ -22,8 +22,6 @@ interface CompilerPassInterface { /** * You can modify the container here before it is dumped to PHP code. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index 026700d2263d6..5d7fa1ba6319e 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -39,8 +39,6 @@ public function setRepeatedPass(RepeatedPass $repeatedPass) /** * Processes the ContainerBuilder for inline service definitions. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php index c03ff9deb71d3..8cf78479ec5fc 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php @@ -161,11 +161,6 @@ public function getMergePass() return $this->mergePass; } - /** - * Sets the Merge Pass. - * - * @param CompilerPassInterface $pass The merge pass - */ public function setMergePass(CompilerPassInterface $pass) { $this->mergePass = $pass; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php index 0ef0af05b578b..9999214c8b763 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php @@ -20,8 +20,6 @@ class RemoveAbstractDefinitionsPass implements CompilerPassInterface { /** * Removes abstract definitions from the ContainerBuilder. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php index 5c53a33949a53..36abc6159ee3c 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php @@ -24,8 +24,6 @@ class RemovePrivateAliasesPass implements CompilerPassInterface { /** * Removes private aliases from the ContainerBuilder. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php index 9e18a9ebde062..61602afd8905f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php @@ -32,8 +32,6 @@ public function setRepeatedPass(RepeatedPass $repeatedPass) /** * Processes the ContainerBuilder to remove unused definitions. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php index d60ae35bc8f0b..2b88bfb917a0f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php @@ -19,10 +19,5 @@ */ interface RepeatablePassInterface extends CompilerPassInterface { - /** - * Sets the RepeatedPass interface. - * - * @param RepeatedPass $repeatedPass - */ public function setRepeatedPass(RepeatedPass $repeatedPass); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php index 59d4e0a767a5a..cdc9ddb507c38 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php @@ -51,8 +51,6 @@ public function __construct(array $passes) /** * Process the repeatable passes that run more than once. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index b7210ee6ee586..bb604b9f9c7fc 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -29,8 +29,6 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface /** * Process the Container to replace aliases with service definitions. * - * @param ContainerBuilder $container - * * @throws InvalidArgumentException if the service definition does not exist */ public function process(ContainerBuilder $container) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php index 3fc6a1102862b..e923f01c3e265 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php @@ -30,8 +30,6 @@ class ResolveDefinitionTemplatesPass implements CompilerPassInterface /** * Process the ContainerBuilder to replace DefinitionDecorator instances with their real Definition instances. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php index 85dbceb9a61ec..577707de7056f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php @@ -28,8 +28,6 @@ class ResolveInvalidReferencesPass implements CompilerPassInterface /** * Process the ContainerBuilder to resolve invalid references. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php index 905549897f8ba..d3947565b2637 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -24,8 +24,6 @@ class ResolveParameterPlaceHoldersPass implements CompilerPassInterface /** * Processes the ContainerBuilder to resolve parameter placeholders. * - * @param ContainerBuilder $container - * * @throws ParameterNotFoundException */ public function process(ContainerBuilder $container) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index fed851a88d213..aa301b0b73608 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -27,8 +27,6 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface /** * Processes the ContainerBuilder to replace references to aliases with actual service references. - * - * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php index e7306ab560e22..43bac7120bcb6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php @@ -80,13 +80,16 @@ public function clear() * Connects 2 nodes together in the Graph. * * @param string $sourceId - * @param string $sourceValue + * @param mixed $sourceValue * @param string $destId - * @param string $destValue + * @param mixed $destValue * @param string $reference */ public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null) { + if (null === $sourceId || null === $destId) { + return; + } $sourceNode = $this->createNode($sourceId, $sourceValue); $destNode = $this->createNode($destId, $destValue); $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference); @@ -99,7 +102,7 @@ public function connect($sourceId, $sourceValue, $destId, $destValue = null, $re * Creates a graph node. * * @param string $id - * @param string $value + * @param mixed $value * * @return ServiceReferenceGraphNode */ diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php index e3c793c4f4eaf..7e8cf812f7082 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php @@ -27,7 +27,7 @@ class ServiceReferenceGraphEdge /** * @param ServiceReferenceGraphNode $sourceNode * @param ServiceReferenceGraphNode $destNode - * @param string $value + * @param mixed $value */ public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php index e5718b2b6d59a..3219d06e96989 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php @@ -38,21 +38,11 @@ public function __construct($id, $value) $this->value = $value; } - /** - * Adds an in edge to this node. - * - * @param ServiceReferenceGraphEdge $edge - */ public function addInEdge(ServiceReferenceGraphEdge $edge) { $this->inEdges[] = $edge; } - /** - * Adds an out edge to this node. - * - * @param ServiceReferenceGraphEdge $edge - */ public function addOutEdge(ServiceReferenceGraphEdge $edge) { $this->outEdges[] = $edge; diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 0ba5d646c89cf..a083e9ab017ba 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -50,11 +50,7 @@ */ class Container implements IntrospectableContainerInterface { - /** - * @var ParameterBagInterface - */ protected $parameterBag; - protected $services = array(); protected $methodMap = array(); protected $aliases = array(); @@ -66,9 +62,6 @@ class Container implements IntrospectableContainerInterface private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_'); - /** - * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance - */ public function __construct(ParameterBagInterface $parameterBag = null) { $this->parameterBag = $parameterBag ?: new ParameterBag(); @@ -454,8 +447,6 @@ public function leaveScope($name) /** * Adds a scope to the container. * - * @param ScopeInterface $scope - * * @throws InvalidArgumentException */ public function addScope(ScopeInterface $scope) diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php index fe301b6270bb9..d78491bb96335 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -18,10 +18,5 @@ */ interface ContainerAwareInterface { - /** - * Sets the container. - * - * @param ContainerInterface|null $container A ContainerInterface instance or null - */ public function setContainer(ContainerInterface $container = null); } diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php index ccf064f6f3b57..ee1ea2cb3d148 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php @@ -23,11 +23,6 @@ trait ContainerAwareTrait */ protected $container; - /** - * Sets the container. - * - * @param ContainerInterface|null $container A ContainerInterface instance or null - */ public function setContainer(ContainerInterface $container = null) { $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index f9658fcf68e04..b180ad2ad8f83 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -123,19 +123,12 @@ public function isTrackingResources() /** * Sets the instantiator to be used when fetching proxies. - * - * @param InstantiatorInterface $proxyInstantiator */ public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator) { $this->proxyInstantiator = $proxyInstantiator; } - /** - * Registers an extension. - * - * @param ExtensionInterface $extension An extension instance - */ public function registerExtension(ExtensionInterface $extension) { $this->extensions[$extension->getAlias()] = $extension; @@ -200,10 +193,6 @@ public function getResources() } /** - * Adds a resource for this configuration. - * - * @param ResourceInterface $resource A resource instance - * * @return $this */ public function addResource(ResourceInterface $resource) @@ -254,8 +243,6 @@ public function addObjectResource($object) /** * Adds the given class hierarchy as resources. * - * @param \ReflectionClass $class - * * @return $this */ public function addClassResource(\ReflectionClass $class) @@ -492,8 +479,6 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV * parameter, the value will still be 'bar' as defined in the ContainerBuilder * constructor. * - * @param ContainerBuilder $container The ContainerBuilder instance to merge - * * @throws BadMethodCallException When this ContainerBuilder is frozen */ public function merge(ContainerBuilder $container) @@ -603,8 +588,6 @@ public function getServiceIds() /** * Adds the service aliases. - * - * @param array $aliases An array of aliases */ public function addAliases(array $aliases) { @@ -615,8 +598,6 @@ public function addAliases(array $aliases) /** * Sets the service aliases. - * - * @param array $aliases An array of aliases */ public function setAliases(array $aliases) { diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 97b491328677f..525af31c1c588 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -246,8 +246,6 @@ public function getClass() /** * Sets the arguments to pass to the service constructor/factory method. * - * @param array $arguments An array of arguments - * * @return $this */ public function setArguments(array $arguments) @@ -260,8 +258,6 @@ public function setArguments(array $arguments) /** * Sets the properties to define when creating the service. * - * @param array $properties - * * @return $this */ public function setProperties(array $properties) @@ -366,8 +362,6 @@ public function getArgument($index) /** * Sets the methods to call after service initialization. * - * @param array $calls An array of method calls - * * @return $this */ public function setMethodCalls(array $calls = array()) @@ -450,8 +444,6 @@ public function getMethodCalls() /** * Sets tags for this definition. * - * @param array $tags - * * @return $this */ public function setTags(array $tags) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php b/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php index a39a5c744ba78..e7407b0e2a8bf 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php @@ -22,9 +22,6 @@ abstract class Dumper implements DumperInterface { protected $container; - /** - * @param ContainerBuilder $container The service container to dump - */ public function __construct(ContainerBuilder $container) { $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 01d9ca7192d2f..67bfd053e7cfa 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -82,8 +82,6 @@ public function __construct(ContainerBuilder $container) /** * Sets the dumper to be used when dumping proxies in the generated container. - * - * @param ProxyDumper $proxyDumper */ public function setProxyDumper(ProxyDumper $proxyDumper) { @@ -99,8 +97,6 @@ public function setProxyDumper(ProxyDumper $proxyDumper) * * base_class: The base class name * * namespace: The class namespace * - * @param array $options An array of options - * * @return string A PHP class representing of the service container */ public function dump(array $options = array()) @@ -255,11 +251,9 @@ private function addProxyClasses() /** * Generates the require_once statement for service includes. * - * @param Definition $definition - * * @return string */ - private function addServiceInclude($definition) + private function addServiceInclude(Definition $definition) { $template = " require_once %s;\n"; $code = ''; @@ -292,7 +286,7 @@ private function addServiceInclude($definition) * @throws RuntimeException When the factory definition is incomplete * @throws ServiceCircularReferenceException When a circular reference is detected */ - private function addServiceInlinedDefinitions($id, $definition) + private function addServiceInlinedDefinitions($id, Definition $definition) { $code = ''; $variableMap = $this->definitionVariables; @@ -354,7 +348,7 @@ private function addServiceInlinedDefinitions($id, $definition) * * @return string */ - private function addServiceReturn($id, $definition) + private function addServiceReturn($id, Definition $definition) { if ($this->isSimpleInstance($id, $definition)) { return " }\n"; @@ -1148,10 +1142,6 @@ private function wrapServiceConditionals($value, $code) /** * Builds service calls from arguments. - * - * @param array $arguments - * @param array &$calls By reference - * @param array &$behavior By reference */ private function getServiceCallsFromArguments(array $arguments, array &$calls, array &$behavior) { @@ -1178,8 +1168,6 @@ private function getServiceCallsFromArguments(array $arguments, array &$calls, a /** * Returns the inline definition. * - * @param Definition $definition - * * @return array */ private function getInlinedDefinitions(Definition $definition) @@ -1204,8 +1192,6 @@ private function getInlinedDefinitions(Definition $definition) /** * Gets the definition from arguments. * - * @param array $arguments - * * @return array */ private function getDefinitionsFromArguments(array $arguments) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index 4a4ac00d08310..b3e270057f389 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -35,8 +35,6 @@ class XmlDumper extends Dumper /** * Dumps the service container as an XML string. * - * @param array $options An array of options - * * @return string An xml string representing of the service container */ public function dump(array $options = array()) @@ -58,11 +56,6 @@ public function dump(array $options = array()) return $xml; } - /** - * Adds parameters. - * - * @param \DOMElement $parent - */ private function addParameters(\DOMElement $parent) { $data = $this->container->getParameterBag()->all(); @@ -79,12 +72,6 @@ private function addParameters(\DOMElement $parent) $this->convertParameters($data, 'parameter', $parameters); } - /** - * Adds method calls. - * - * @param array $methodcalls - * @param \DOMElement $parent - */ private function addMethodCalls(array $methodcalls, \DOMElement $parent) { foreach ($methodcalls as $methodcall) { @@ -231,11 +218,6 @@ private function addServiceAlias($alias, Alias $id, \DOMElement $parent) $parent->appendChild($service); } - /** - * Adds services. - * - * @param \DOMElement $parent - */ private function addServices(\DOMElement $parent) { $definitions = $this->container->getDefinitions(); @@ -311,8 +293,6 @@ private function convertParameters(array $parameters, $type, \DOMElement $parent /** * Escapes arguments. * - * @param array $arguments - * * @return array */ private function escape(array $arguments) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 9125a97836b6f..882e93f36bc0b 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -32,8 +32,6 @@ class YamlDumper extends Dumper /** * Dumps the service container as an YAML string. * - * @param array $options An array of options - * * @return string A YAML string representing of the service container */ public function dump(array $options = array()) @@ -57,7 +55,7 @@ public function dump(array $options = array()) * * @return string */ - private function addService($id, $definition) + private function addService($id, Definition $definition) { $code = " $id:\n"; if ($class = $definition->getClass()) { @@ -163,7 +161,7 @@ private function addService($id, $definition) * * @return string */ - private function addServiceAlias($alias, $id) + private function addServiceAlias($alias, Alias $id) { if ($id->isPublic()) { return sprintf(" %s: '@%s'\n", $alias, $id); @@ -327,8 +325,6 @@ private function prepareParameters(array $parameters, $escape = true) /** * Escapes arguments. * - * @param array $arguments - * * @return array */ private function escape(array $arguments) diff --git a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php index 705ba38ec9ccc..da590635bccda 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php @@ -24,9 +24,6 @@ interface ConfigurationExtensionInterface /** * Returns extension configuration. * - * @param array $config An array of configuration values - * @param ContainerBuilder $container A ContainerBuilder instance - * * @return ConfigurationInterface|null The configuration or null */ public function getConfiguration(array $config, ContainerBuilder $container); diff --git a/src/Symfony/Component/DependencyInjection/Extension/Extension.php b/src/Symfony/Component/DependencyInjection/Extension/Extension.php index 5a6573b70e0da..224d18a44d671 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/Extension.php +++ b/src/Symfony/Component/DependencyInjection/Extension/Extension.php @@ -100,9 +100,6 @@ final protected function processConfiguration(ConfigurationInterface $configurat } /** - * @param ContainerBuilder $container - * @param array $config - * * @return bool Whether the configuration is enabled * * @throws InvalidArgumentException When the config is not enableable diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php index 6e926fa7a8adc..18de31272f322 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -23,9 +23,6 @@ interface ExtensionInterface /** * Loads a specific configuration. * - * @param array $configs An array of configuration values - * @param ContainerBuilder $container A ContainerBuilder instance - * * @throws \InvalidArgumentException When provided tag is not defined in this extension */ public function load(array $configs, ContainerBuilder $container); diff --git a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php index c666bdbcf8d45..5bd18d79feac9 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php @@ -17,8 +17,6 @@ interface PrependExtensionInterface { /** * Allow an extension to prepend the extension configurations. - * - * @param ContainerBuilder $container */ public function prepend(ContainerBuilder $container); } diff --git a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php index 878d965b1c39d..95c1f038c0288 100644 --- a/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php @@ -23,8 +23,6 @@ interface DumperInterface /** * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. * - * @param Definition $definition - * * @return bool */ public function isProxyCandidate(Definition $definition); @@ -42,8 +40,6 @@ public function getProxyFactoryCode(Definition $definition, $id); /** * Generates the code for the lazy proxy. * - * @param Definition $definition - * * @return string */ public function getProxyCode(Definition $definition); diff --git a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php index df70cdf44f283..f8f2efe2e9e64 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php @@ -25,9 +25,6 @@ class ClosureLoader extends Loader { private $container; - /** - * @param ContainerBuilder $container A ContainerBuilder instance - */ public function __construct(ContainerBuilder $container) { $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php index 90cd6bcfafa4d..fc242299ca6d9 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php @@ -24,10 +24,6 @@ abstract class FileLoader extends BaseFileLoader { protected $container; - /** - * @param ContainerBuilder $container A ContainerBuilder instance - * @param FileLocatorInterface $locator A FileLocator instance - */ public function __construct(ContainerBuilder $container, FileLocatorInterface $locator) { $this->container = $container; diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index ba12fdc821bc2..092ec3c332b86 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -417,8 +417,6 @@ private function resolveServices($value) /** * Loads from Extensions. - * - * @param array $content */ private function loadFromExtensions(array $content) { diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index 2cff979ed8ef0..ce78964d900f9 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -278,8 +278,6 @@ public function get($name) /** * Sets a named field. - * - * @param FormField $field The field */ public function set(FormField $field) { @@ -366,8 +364,6 @@ public function disableValidation() * * Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself. * - * @param \DOMElement $node A \DOMElement instance - * * @throws \LogicException If given node is not a button or input or does not have a form ancestor */ protected function setNode(\DOMElement $node) diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index 9168dd365af98..6ad6d933e406a 100644 --- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -26,8 +26,6 @@ class FormFieldRegistry /** * Adds a field to the registry. - * - * @param FormField $field The field */ public function add(FormField $field) { diff --git a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php index a0deb39b07938..03670bb44c419 100644 --- a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -23,30 +23,18 @@ */ class ContainerAwareEventDispatcher extends EventDispatcher { - /** - * The container from where services are loaded. - * - * @var ContainerInterface - */ private $container; /** * The service IDs of the event listeners and subscribers. - * - * @var array */ private $listenerIds = array(); /** * The services registered as listeners. - * - * @var array */ private $listeners = array(); - /** - * @param ContainerInterface $container A ContainerInterface instance - */ public function __construct(ContainerInterface $container) { $this->container = $container; diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index 775b75a4f633e..e8e83d3399e02 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -33,11 +33,6 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface private $dispatcher; private $wrappedListeners; - /** - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - * @param LoggerInterface $logger A LoggerInterface instance - */ public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null) { $this->dispatcher = $dispatcher; diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php index b1f976cdf20ab..f9be02edc77b1 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -48,8 +48,6 @@ public function addListener($eventName, $listener, $priority = 0); * * The subscriber is asked for all the events he is * interested in and added as a listener for these events. - * - * @param EventSubscriberInterface $subscriber The subscriber */ public function addSubscriber(EventSubscriberInterface $subscriber); @@ -61,11 +59,6 @@ public function addSubscriber(EventSubscriberInterface $subscriber); */ public function removeListener($eventName, $listener); - /** - * Removes an event subscriber. - * - * @param EventSubscriberInterface $subscriber The subscriber - */ public function removeSubscriber(EventSubscriberInterface $subscriber); /** diff --git a/src/Symfony/Component/EventDispatcher/GenericEvent.php b/src/Symfony/Component/EventDispatcher/GenericEvent.php index a7520a0f34567..8907a0c2dc8d0 100644 --- a/src/Symfony/Component/EventDispatcher/GenericEvent.php +++ b/src/Symfony/Component/EventDispatcher/GenericEvent.php @@ -29,8 +29,6 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Array of arguments. - * - * @var array */ protected $arguments; diff --git a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php index 806cdd9c40e9b..5b06553ead70b 100644 --- a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php @@ -18,18 +18,8 @@ */ class ImmutableEventDispatcher implements EventDispatcherInterface { - /** - * The proxied dispatcher. - * - * @var EventDispatcherInterface - */ private $dispatcher; - /** - * Creates an unmodifiable proxy for an event dispatcher. - * - * @param EventDispatcherInterface $dispatcher The proxied event dispatcher - */ public function __construct(EventDispatcherInterface $dispatcher) { $this->dispatcher = $dispatcher; diff --git a/src/Symfony/Component/ExpressionLanguage/Compiler.php b/src/Symfony/Component/ExpressionLanguage/Compiler.php index f32ec36d306f2..66d106041fde9 100644 --- a/src/Symfony/Component/ExpressionLanguage/Compiler.php +++ b/src/Symfony/Component/ExpressionLanguage/Compiler.php @@ -51,8 +51,6 @@ public function reset() /** * Compiles a node. * - * @param Node\Node $node The node to compile - * * @return $this */ public function compile(Node\Node $node) diff --git a/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php b/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php index f110f542ad7d2..5d8fb009c7e7d 100644 --- a/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php +++ b/src/Symfony/Component/ExpressionLanguage/Node/ArrayNode.php @@ -33,8 +33,6 @@ public function addElement(Node $value, Node $key = null) /** * Compiles the node to PHP. - * - * @param Compiler $compiler A Compiler instance */ public function compile(Compiler $compiler) { diff --git a/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php b/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php index 1d2aedb514501..405a060a9474c 100644 --- a/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php +++ b/src/Symfony/Component/ExpressionLanguage/ParserCache/ArrayParserCache.php @@ -18,9 +18,6 @@ */ class ArrayParserCache implements ParserCacheInterface { - /** - * @var array - */ private $cache = array(); /** diff --git a/src/Symfony/Component/Finder/Adapter/AdapterInterface.php b/src/Symfony/Component/Finder/Adapter/AdapterInterface.php index 2f22a81ccbc08..dbba7bb9091e2 100644 --- a/src/Symfony/Component/Finder/Adapter/AdapterInterface.php +++ b/src/Symfony/Component/Finder/Adapter/AdapterInterface.php @@ -31,64 +31,46 @@ public function setFollowLinks($followLinks); public function setMode($mode); /** - * @param array $exclude - * * @return $this */ public function setExclude(array $exclude); /** - * @param array $depths - * * @return $this */ public function setDepths(array $depths); /** - * @param array $names - * * @return $this */ public function setNames(array $names); /** - * @param array $notNames - * * @return $this */ public function setNotNames(array $notNames); /** - * @param array $contains - * * @return $this */ public function setContains(array $contains); /** - * @param array $notContains - * * @return $this */ public function setNotContains(array $notContains); /** - * @param array $sizes - * * @return $this */ public function setSizes(array $sizes); /** - * @param array $dates - * * @return $this */ public function setDates(array $dates); /** - * @param array $filters - * * @return $this */ public function setFilters(array $filters); @@ -101,15 +83,11 @@ public function setFilters(array $filters); public function setSort($sort); /** - * @param array $paths - * * @return $this */ public function setPath(array $paths); /** - * @param array $notPaths - * * @return $this */ public function setNotPath(array $notPaths); diff --git a/src/Symfony/Component/Finder/Exception/AdapterFailureException.php b/src/Symfony/Component/Finder/Exception/AdapterFailureException.php index 15fa22147d837..a560d19450157 100644 --- a/src/Symfony/Component/Finder/Exception/AdapterFailureException.php +++ b/src/Symfony/Component/Finder/Exception/AdapterFailureException.php @@ -20,9 +20,6 @@ */ class AdapterFailureException extends \RuntimeException implements ExceptionInterface { - /** - * @var \Symfony\Component\Finder\Adapter\AdapterInterface - */ private $adapter; /** diff --git a/src/Symfony/Component/Finder/Exception/ShellCommandFailureException.php b/src/Symfony/Component/Finder/Exception/ShellCommandFailureException.php index 2658f6a508fb5..5384bec399f37 100644 --- a/src/Symfony/Component/Finder/Exception/ShellCommandFailureException.php +++ b/src/Symfony/Component/Finder/Exception/ShellCommandFailureException.php @@ -19,16 +19,8 @@ */ class ShellCommandFailureException extends AdapterFailureException { - /** - * @var Command - */ private $command; - /** - * @param AdapterInterface $adapter - * @param Command $command - * @param \Exception|null $previous - */ public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null) { $this->command = $command; diff --git a/src/Symfony/Component/Finder/Expression/Regex.php b/src/Symfony/Component/Finder/Expression/Regex.php index 531a3e2e785db..2b31c3664cbc0 100644 --- a/src/Symfony/Component/Finder/Expression/Regex.php +++ b/src/Symfony/Component/Finder/Expression/Regex.php @@ -28,7 +28,7 @@ class Regex implements ValueInterface private $pattern; /** - * @var array + * @var string */ private $options; @@ -277,8 +277,6 @@ public function hasEndJoker() } /** - * @param array $replacement - * * @return $this */ public function replaceJokers($replacement) diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index ccb64328b80ea..5784df439b0bf 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -462,8 +462,6 @@ public static function addVCSPattern($pattern) * * This can be slow as all the matching files and directories must be retrieved for comparison. * - * @param \Closure $closure An anonymous function - * * @return $this * * @see SortableIterator @@ -569,8 +567,6 @@ public function sortByModifiedTime() * The anonymous function receives a \SplFileInfo and must return false * to remove files. * - * @param \Closure $closure An anonymous function - * * @return $this * * @see CustomFilterIterator @@ -757,8 +753,6 @@ private function searchInDirectory($dir) } /** - * @param AdapterInterface $adapter - * * @return AdapterInterface */ private function buildAdapter(AdapterInterface $adapter) diff --git a/src/Symfony/Component/Finder/Shell/Command.php b/src/Symfony/Component/Finder/Shell/Command.php index 29158d8cac350..47f4b422216b9 100644 --- a/src/Symfony/Component/Finder/Shell/Command.php +++ b/src/Symfony/Component/Finder/Shell/Command.php @@ -16,19 +16,8 @@ */ class Command { - /** - * @var Command|null - */ private $parent; - - /** - * @var array - */ private $bits = array(); - - /** - * @var array - */ private $labels = array(); /** @@ -36,9 +25,6 @@ class Command */ private $errorHandler; - /** - * @param Command|null $parent Parent command - */ public function __construct(Command $parent = null) { $this->parent = $parent; @@ -57,8 +43,6 @@ public function __toString() /** * Creates a new Command instance. * - * @param Command|null $parent Parent command - * * @return self */ public static function create(Command $parent = null) @@ -216,8 +200,6 @@ public function length() } /** - * @param \Closure $errorHandler - * * @return $this */ public function setErrorHandler(\Closure $errorHandler) diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony/Component/Form/AbstractRendererEngine.php index 7519011225282..452e24f1d1af5 100644 --- a/src/Symfony/Component/Form/AbstractRendererEngine.php +++ b/src/Symfony/Component/Form/AbstractRendererEngine.php @@ -23,24 +23,10 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface */ const CACHE_KEY_VAR = 'cache_key'; - /** - * @var array - */ protected $defaultThemes; - - /** - * @var array - */ protected $themes = array(); - - /** - * @var array - */ protected $resources = array(); - /** - * @var array - */ private $resourceHierarchyLevels = array(); /** diff --git a/src/Symfony/Component/Form/AbstractTypeExtension.php b/src/Symfony/Component/Form/AbstractTypeExtension.php index 27783a1a4d508..268c94354c047 100644 --- a/src/Symfony/Component/Form/AbstractTypeExtension.php +++ b/src/Symfony/Component/Form/AbstractTypeExtension.php @@ -54,8 +54,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) /** * Configures the options for this type. - * - * @param OptionsResolver $resolver The resolver for the options */ public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index 9a5f8a60bd433..3dbe110fcb084 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -273,8 +273,6 @@ public function getPropertyPath() /** * Unsupported method. * - * @param FormError $error - * * @throws BadMethodCallException */ public function addError(FormError $error) diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index ad311db29095c..ec3a421d54a2b 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -184,8 +184,6 @@ public function addEventListener($eventName, $listener, $priority = 0) * * This method should not be invoked. * - * @param EventSubscriberInterface $subscriber - * * @throws BadMethodCallException */ public function addEventSubscriber(EventSubscriberInterface $subscriber) @@ -272,8 +270,6 @@ public function setAttributes(array $attributes) * * This method should not be invoked. * - * @param DataMapperInterface $dataMapper - * * @throws BadMethodCallException */ public function setDataMapper(DataMapperInterface $dataMapper = null) @@ -413,8 +409,6 @@ public function setCompound($compound) /** * Sets the type of the button. * - * @param ResolvedFormTypeInterface $type The type of the button - * * @return $this */ public function setType(ResolvedFormTypeInterface $type) @@ -457,8 +451,6 @@ public function setDataLocked($locked) * * This method should not be invoked. * - * @param FormFactoryInterface $formFactory - * * @throws BadMethodCallException */ public function setFormFactory(FormFactoryInterface $formFactory) @@ -493,8 +485,6 @@ public function setMethod($method) /** * Unsupported method. * - * @param RequestHandlerInterface $requestHandler - * * @throws BadMethodCallException */ public function setRequestHandler(RequestHandlerInterface $requestHandler) diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php index 5ce851096cfc8..d7a62730ef334 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php @@ -22,9 +22,6 @@ */ class CachingFactoryDecorator implements ChoiceListFactoryInterface { - /** - * @var ChoiceListFactoryInterface - */ private $decoratedFactory; /** @@ -89,11 +86,6 @@ private static function flatten(array $array, &$output) } } - /** - * Decorates the given factory. - * - * @param ChoiceListFactoryInterface $decoratedFactory The decorated factory - */ public function __construct(ChoiceListFactoryInterface $decoratedFactory) { $this->decoratedFactory = $decoratedFactory; diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index 1b68fd8924284..82b2082f33e1f 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -41,22 +41,9 @@ */ class PropertyAccessDecorator implements ChoiceListFactoryInterface { - /** - * @var ChoiceListFactoryInterface - */ private $decoratedFactory; - - /** - * @var PropertyAccessorInterface - */ private $propertyAccessor; - /** - * Decorates the given factory. - * - * @param ChoiceListFactoryInterface $decoratedFactory The decorated factory - * @param null|PropertyAccessorInterface $propertyAccessor The used property accessor - */ public function __construct(ChoiceListFactoryInterface $decoratedFactory, PropertyAccessorInterface $propertyAccessor = null) { $this->decoratedFactory = $decoratedFactory; diff --git a/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php b/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php index 5078de789aa65..5f32b5bbf44c5 100644 --- a/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php +++ b/src/Symfony/Component/Form/ChoiceList/View/ChoiceView.php @@ -70,8 +70,6 @@ class ChoiceView extends LegacyChoiceView { /** * Additional attributes for the HTML tag. - * - * @var array */ public $attr; diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 6e0cea5539405..14860a59f7567 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -43,31 +43,23 @@ class ChoiceList implements ChoiceListInterface { /** * The choices with their indices as keys. - * - * @var array */ protected $choices = array(); /** * The choice values with the indices of the matching choices as keys. - * - * @var array */ protected $values = array(); /** * The preferred view objects as hierarchy containing also the choice groups * with the indices of the matching choices as bottom-level keys. - * - * @var array */ private $preferredViews = array(); /** * The non-preferred view objects as hierarchy containing also the choice * groups with the indices of the matching choices as bottom-level keys. - * - * @var array */ private $remainingViews = array(); diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php index 736752a41e19c..25aba9a16d430 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php @@ -23,16 +23,8 @@ */ class PropertyPathMapper implements DataMapperInterface { - /** - * @var PropertyAccessorInterface - */ private $propertyAccessor; - /** - * Creates a new property path mapper. - * - * @param PropertyAccessorInterface $propertyAccessor The property accessor - */ public function __construct(PropertyAccessorInterface $propertyAccessor = null) { $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php index 369a12343facd..e8424b92994ab 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php @@ -22,9 +22,6 @@ class ChoiceToValueTransformer implements DataTransformerInterface { private $choiceList; - /** - * @param ChoiceListInterface $choiceList - */ public function __construct(ChoiceListInterface $choiceList) { $this->choiceList = $choiceList; diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php index 05da291733834..a6b2f3fd58cec 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php @@ -22,17 +22,12 @@ class ChoicesToValuesTransformer implements DataTransformerInterface { private $choiceList; - /** - * @param ChoiceListInterface $choiceList - */ public function __construct(ChoiceListInterface $choiceList) { $this->choiceList = $choiceList; } /** - * @param array $array - * * @return array * * @throws TransformationFailedException if the given value is not an array @@ -51,8 +46,6 @@ public function transform($array) } /** - * @param array $array - * * @return array * * @throws TransformationFailedException if the given value is not an array diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php index f52bb97eb40a0..81ffc7e247625 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php @@ -21,17 +21,12 @@ */ class DataTransformerChain implements DataTransformerInterface { - /** - * The value transformers. - * - * @var DataTransformerInterface[] - */ protected $transformers; /** * Uses the given value transformers to transform values. * - * @param array $transformers + * @param DataTransformerInterface[] $transformers */ public function __construct(array $transformers) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php index 2c1d6d0f62b88..5b851af7dd88e 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php @@ -47,8 +47,6 @@ public function transform($value) /** * Extracts the duplicated value from an array. * - * @param array $array - * * @return mixed The value * * @throws TransformationFailedException if the given value is not an array or diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 4b339181e9905..e61ae5b8a3d8f 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -24,35 +24,20 @@ */ class ResizeFormListener implements EventSubscriberInterface { - /** - * @var string - */ protected $type; - - /** - * @var array - */ protected $options; - - /** - * Whether children could be added to the group. - * - * @var bool - */ protected $allowAdd; - - /** - * Whether children could be removed from the group. - * - * @var bool - */ protected $allowDelete; - /** - * @var bool - */ private $deleteEmpty; + /** + * @param string $type + * @param array $options + * @param bool $allowAdd whether children could be added to the group + * @param bool $allowDelete whether children could be removed from the group + * @param bool $deleteEmpty + */ public function __construct($type, array $options = array(), $allowAdd = false, $allowDelete = false, $deleteEmpty = false) { $this->type = $type; diff --git a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php index 0bd33d36a5d1f..c80dd67141a0e 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php @@ -49,8 +49,6 @@ public static function getSubscribedEvents() /** * Listener for the {@link FormEvents::POST_SET_DATA} event. - * - * @param FormEvent $event The event object */ public function postSetData(FormEvent $event) { @@ -65,8 +63,6 @@ public function postSetData(FormEvent $event) /** * Listener for the {@link FormEvents::POST_SUBMIT} event. - * - * @param FormEvent $event The event object */ public function postSubmit(FormEvent $event) { diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php index a408dde2306c9..8e7a3c61f55ee 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php @@ -25,9 +25,6 @@ */ class FormDataCollector extends DataCollector implements FormDataCollectorInterface { - /** - * @var FormDataExtractor - */ private $dataExtractor; /** diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php index ee004a09f30b4..d2a7818cd0fe9 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php @@ -24,37 +24,26 @@ interface FormDataCollectorInterface extends DataCollectorInterface { /** * Stores configuration data of the given form and its children. - * - * @param FormInterface $form A root form */ public function collectConfiguration(FormInterface $form); /** * Stores the default data of the given form and its children. - * - * @param FormInterface $form A root form */ public function collectDefaultData(FormInterface $form); /** * Stores the submitted data of the given form and its children. - * - * @param FormInterface $form A root form */ public function collectSubmittedData(FormInterface $form); /** * Stores the view variables of the given form view and its children. - * - * @param FormView $view A root form view */ public function collectViewVariables(FormView $view); /** * Specifies that the given objects represent the same conceptual form. - * - * @param FormInterface $form A form object - * @param FormView $view A view object */ public function associateFormWithView(FormInterface $form, FormView $view); @@ -63,8 +52,6 @@ public function associateFormWithView(FormInterface $form, FormView $view); * a tree-like data structure. * * The result can be queried using {@link getData()}. - * - * @param FormInterface $form A root form */ public function buildPreliminaryFormTree(FormInterface $form); @@ -85,9 +72,6 @@ public function buildPreliminaryFormTree(FormInterface $form); * tree, only the view data will be included in the result. If a * corresponding {@link FormInterface} exists otherwise, call * {@link associateFormWithView()} before calling this method. - * - * @param FormInterface $form A root form - * @param FormView $view A root view */ public function buildFinalFormTree(FormInterface $form, FormView $view); diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index 20b270d845a4d..3e2ffd04f9f3a 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -180,8 +180,6 @@ public function extractViewVariables(FormView $view) /** * Recursively builds an HTML ID for a form. * - * @param FormInterface $form The form - * * @return string The HTML ID */ private function buildId(FormInterface $form) diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php index e0bc6dc0caccc..5fd345fec0025 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php @@ -24,8 +24,6 @@ interface FormDataExtractorInterface /** * Extracts the configuration data of a form. * - * @param FormInterface $form The form - * * @return array Information about the form's configuration */ public function extractConfiguration(FormInterface $form); @@ -33,8 +31,6 @@ public function extractConfiguration(FormInterface $form); /** * Extracts the default data of a form. * - * @param FormInterface $form The form - * * @return array Information about the form's default data */ public function extractDefaultData(FormInterface $form); @@ -42,8 +38,6 @@ public function extractDefaultData(FormInterface $form); /** * Extracts the submitted data of a form. * - * @param FormInterface $form The form - * * @return array Information about the form's submitted data */ public function extractSubmittedData(FormInterface $form); @@ -51,8 +45,6 @@ public function extractSubmittedData(FormInterface $form); /** * Extracts the view variables of a form. * - * @param FormView $view The form view - * * @return array Information about the view's variables */ public function extractViewVariables(FormView $view); diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php index 9cb0dc4476c59..59e108673ab09 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php @@ -22,19 +22,9 @@ */ class FormTypeHttpFoundationExtension extends AbstractTypeExtension { - /** - * @var BindRequestListener - */ private $listener; - - /** - * @var RequestHandlerInterface - */ private $requestHandler; - /** - * @param RequestHandlerInterface $requestHandler - */ public function __construct(RequestHandlerInterface $requestHandler = null) { $this->listener = new BindRequestListener(); diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php index 3bf57df048c60..bddb8a09e8603 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php @@ -194,8 +194,6 @@ private static function allowDataWalking(FormInterface $form) /** * Returns the validation groups of the given form. * - * @param FormInterface $form The form - * * @return array The validation groups */ private static function getValidationGroups(FormInterface $form) diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index b04a9447fc724..9f06a75d90f46 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -81,8 +81,6 @@ public function guessPattern($class, $property) /** * Guesses a field class name for a given constraint. * - * @param Constraint $constraint The constraint to guess for - * * @return TypeGuess|null The guessed field class and options */ public function guessTypeForConstraint(Constraint $constraint) @@ -167,8 +165,6 @@ public function guessTypeForConstraint(Constraint $constraint) /** * Guesses whether a field is required based on the given constraint. * - * @param Constraint $constraint The constraint to guess for - * * @return ValueGuess|null The guess whether the field is required */ public function guessRequiredForConstraint(Constraint $constraint) @@ -185,8 +181,6 @@ public function guessRequiredForConstraint(Constraint $constraint) /** * Guesses a field's maximum length based on the given constraint. * - * @param Constraint $constraint The constraint to guess for - * * @return ValueGuess|null The guess for the maximum length */ public function guessMaxLengthForConstraint(Constraint $constraint) @@ -215,8 +209,6 @@ public function guessMaxLengthForConstraint(Constraint $constraint) /** * Guesses a field's pattern based on the given constraint. * - * @param Constraint $constraint The constraint to guess for - * * @return ValueGuess|null The guess for the pattern */ public function guessPatternForConstraint(Constraint $constraint) diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php index 14e7b521f17e8..8a3602e701c3a 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php @@ -269,8 +269,6 @@ private function reconstructPath(ViolationPath $violationPath, FormInterface $or } /** - * @param FormInterface $form - * * @return bool */ private function acceptsErrors(FormInterface $form) diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 7e662f8f1e5c0..83f0055e0c2e0 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -162,8 +162,6 @@ class Form implements \IteratorAggregate, FormInterface /** * Creates a new form based on the given configuration. * - * @param FormConfigInterface $config The form configuration - * * @throws LogicException if a data mapper is not provided for a compound form */ public function __construct(FormConfigInterface $config) diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Symfony/Component/Form/FormConfigBuilderInterface.php index 3cb4e384824de..bd9e8d8de7107 100644 --- a/src/Symfony/Component/Form/FormConfigBuilderInterface.php +++ b/src/Symfony/Component/Form/FormConfigBuilderInterface.php @@ -35,8 +35,6 @@ public function addEventListener($eventName, $listener, $priority = 0); /** * Adds an event subscriber for events on this form. * - * @param EventSubscriberInterface $subscriber The subscriber to attach - * * @return $this The configuration object */ public function addEventSubscriber(EventSubscriberInterface $subscriber); @@ -98,8 +96,6 @@ public function setAttribute($name, $value); /** * Sets the attributes. * - * @param array $attributes The attributes - * * @return $this The configuration object */ public function setAttributes(array $attributes); @@ -107,8 +103,6 @@ public function setAttributes(array $attributes); /** * Sets the data mapper used by the form. * - * @param DataMapperInterface $dataMapper - * * @return $this The configuration object */ public function setDataMapper(DataMapperInterface $dataMapper = null); @@ -202,8 +196,6 @@ public function setCompound($compound); /** * Set the types. * - * @param ResolvedFormTypeInterface $type The type of the form - * * @return $this The configuration object */ public function setType(ResolvedFormTypeInterface $type); @@ -232,8 +224,6 @@ public function setDataLocked($locked); /** * Sets the form factory used for creating new forms. - * - * @param FormFactoryInterface $formFactory The form factory */ public function setFormFactory(FormFactoryInterface $formFactory); @@ -258,8 +248,6 @@ public function setMethod($method); /** * Sets the request handler used by the form. * - * @param RequestHandlerInterface $requestHandler - * * @return $this The configuration object */ public function setRequestHandler(RequestHandlerInterface $requestHandler); diff --git a/src/Symfony/Component/Form/FormError.php b/src/Symfony/Component/Form/FormError.php index c35a26f5a3fce..4bfd853d57913 100644 --- a/src/Symfony/Component/Form/FormError.php +++ b/src/Symfony/Component/Form/FormError.php @@ -20,37 +20,11 @@ */ class FormError implements \Serializable { - /** - * @var string - */ - private $message; - - /** - * The template for the error message. - * - * @var string - */ protected $messageTemplate; - - /** - * The parameters that should be substituted in the message template. - * - * @var array - */ protected $messageParameters; - - /** - * The value for error message pluralization. - * - * @var int|null - */ protected $messagePluralization; - /** - * The cause for this error. - * - * @var mixed - */ + private $message; private $cause; /** diff --git a/src/Symfony/Component/Form/FormFactory.php b/src/Symfony/Component/Form/FormFactory.php index 34e3666dbd563..e87e457a7baca 100644 --- a/src/Symfony/Component/Form/FormFactory.php +++ b/src/Symfony/Component/Form/FormFactory.php @@ -142,8 +142,6 @@ public function createBuilderForProperty($class, $property, $data = null, array * Wraps a type into a ResolvedFormTypeInterface implementation and connects * it with its parent type. * - * @param FormTypeInterface $type The type to resolve - * * @return ResolvedFormTypeInterface The resolved type */ private function resolveType(FormTypeInterface $type) diff --git a/src/Symfony/Component/Form/FormFactoryBuilderInterface.php b/src/Symfony/Component/Form/FormFactoryBuilderInterface.php index c1e55dcc60ea5..35cdc44d9d43f 100644 --- a/src/Symfony/Component/Form/FormFactoryBuilderInterface.php +++ b/src/Symfony/Component/Form/FormFactoryBuilderInterface.php @@ -21,8 +21,6 @@ interface FormFactoryBuilderInterface /** * Sets the factory for creating ResolvedFormTypeInterface instances. * - * @param ResolvedFormTypeFactoryInterface $resolvedTypeFactory - * * @return $this */ public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory); @@ -30,8 +28,6 @@ public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolve /** * Adds an extension to be loaded by the factory. * - * @param FormExtensionInterface $extension The extension - * * @return $this */ public function addExtension(FormExtensionInterface $extension); @@ -48,8 +44,6 @@ public function addExtensions(array $extensions); /** * Adds a form type to the factory. * - * @param FormTypeInterface $type The form type - * * @return $this */ public function addType(FormTypeInterface $type); @@ -66,8 +60,6 @@ public function addTypes(array $types); /** * Adds a form type extension to the factory. * - * @param FormTypeExtensionInterface $typeExtension The form type extension - * * @return $this */ public function addTypeExtension(FormTypeExtensionInterface $typeExtension); @@ -84,8 +76,6 @@ public function addTypeExtensions(array $typeExtensions); /** * Adds a type guesser to the factory. * - * @param FormTypeGuesserInterface $typeGuesser The type guesser - * * @return $this */ public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser); diff --git a/src/Symfony/Component/Form/FormInterface.php b/src/Symfony/Component/Form/FormInterface.php index e28d1a102d81f..fcfbaaf96ceb0 100644 --- a/src/Symfony/Component/Form/FormInterface.php +++ b/src/Symfony/Component/Form/FormInterface.php @@ -23,8 +23,6 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable /** * Sets the parent form. * - * @param FormInterface|null $parent The parent form or null if it's the root - * * @return self * * @throws Exception\AlreadySubmittedException if the form has already been submitted @@ -296,8 +294,6 @@ public function isRoot(); /** * Creates a view. * - * @param FormView $parent The parent view - * * @return FormView The view */ public function createView(FormView $parent = null); diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index b731b740dff34..342a64d5037f6 100644 --- a/src/Symfony/Component/Form/FormRenderer.php +++ b/src/Symfony/Component/Form/FormRenderer.php @@ -27,35 +27,13 @@ class FormRenderer implements FormRendererInterface { const CACHE_KEY_VAR = 'unique_block_prefix'; - /** - * @var FormRendererEngineInterface - */ private $engine; - - /** - * @var CsrfTokenManagerInterface - */ private $csrfTokenManager; - - /** - * @var array - */ private $blockNameHierarchyMap = array(); - - /** - * @var array - */ private $hierarchyLevelMap = array(); - - /** - * @var array - */ private $variableStack = array(); /** - * @param FormRendererEngineInterface $engine - * @param CsrfTokenManagerInterface|null $csrfTokenManager - * * @throws UnexpectedTypeException */ public function __construct(FormRendererEngineInterface $engine, $csrfTokenManager = null) diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Symfony/Component/Form/FormTypeExtensionInterface.php index 095813d211efd..cc46b0a32425e 100644 --- a/src/Symfony/Component/Form/FormTypeExtensionInterface.php +++ b/src/Symfony/Component/Form/FormTypeExtensionInterface.php @@ -25,9 +25,6 @@ interface FormTypeExtensionInterface * further modify it. * * @see FormTypeInterface::buildForm() - * - * @param FormBuilderInterface $builder The form builder - * @param array $options The options */ public function buildForm(FormBuilderInterface $builder, array $options); @@ -38,10 +35,6 @@ public function buildForm(FormBuilderInterface $builder, array $options); * further modify it. * * @see FormTypeInterface::buildView() - * - * @param FormView $view The view - * @param FormInterface $form The form - * @param array $options The options */ public function buildView(FormView $view, FormInterface $form, array $options); @@ -52,10 +45,6 @@ public function buildView(FormView $view, FormInterface $form, array $options); * further modify it. * * @see FormTypeInterface::finishView() - * - * @param FormView $view The view - * @param FormInterface $form The form - * @param array $options The options */ public function finishView(FormView $view, FormInterface $form, array $options); diff --git a/src/Symfony/Component/Form/FormView.php b/src/Symfony/Component/Form/FormView.php index 8655bedf6e135..21a3d5036ad2b 100644 --- a/src/Symfony/Component/Form/FormView.php +++ b/src/Symfony/Component/Form/FormView.php @@ -20,8 +20,6 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable { /** * The variables assigned to this view. - * - * @var array */ public $vars = array( 'value' => null, @@ -30,8 +28,6 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable /** * The parent view. - * - * @var FormView */ public $parent; diff --git a/src/Symfony/Component/Form/Guess/TypeGuess.php b/src/Symfony/Component/Form/Guess/TypeGuess.php index a190d5bc03e12..1431b5e400569 100644 --- a/src/Symfony/Component/Form/Guess/TypeGuess.php +++ b/src/Symfony/Component/Form/Guess/TypeGuess.php @@ -19,18 +19,7 @@ */ class TypeGuess extends Guess { - /** - * The guessed field type. - * - * @var string - */ private $type; - - /** - * The guessed options for creating an instance of the guessed class. - * - * @var array - */ private $options; /** diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php index 3607feb99cc98..e28c2b4b102cf 100644 --- a/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/Symfony/Component/Form/NativeRequestHandler.php @@ -21,9 +21,6 @@ */ class NativeRequestHandler implements RequestHandlerInterface { - /** - * @var ServerParams - */ private $serverParams; /** @@ -36,8 +33,6 @@ public function __construct(ServerParams $params = null) /** * The allowed keys of the $_FILES array. - * - * @var array */ private static $fileKeys = array( 'error', @@ -159,8 +154,6 @@ private static function getRequestMethod() * This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray} * and should be kept as such in order to port fixes quickly and easily. * - * @param array $data - * * @return array */ private static function fixPhpFilesArray($data) diff --git a/src/Symfony/Component/Form/ReversedTransformer.php b/src/Symfony/Component/Form/ReversedTransformer.php index fc5cd12bc37c2..8089e47bf0554 100644 --- a/src/Symfony/Component/Form/ReversedTransformer.php +++ b/src/Symfony/Component/Form/ReversedTransformer.php @@ -21,18 +21,8 @@ */ class ReversedTransformer implements DataTransformerInterface { - /** - * The reversed transformer. - * - * @var DataTransformerInterface - */ protected $reversedTransformer; - /** - * Reverses this transformer. - * - * @param DataTransformerInterface $reversedTransformer - */ public function __construct(DataTransformerInterface $reversedTransformer) { $this->reversedTransformer = $reversedTransformer; diff --git a/src/Symfony/Component/HttpFoundation/AcceptHeader.php b/src/Symfony/Component/HttpFoundation/AcceptHeader.php index c6fd85f9474a1..d1740266b7a80 100644 --- a/src/Symfony/Component/HttpFoundation/AcceptHeader.php +++ b/src/Symfony/Component/HttpFoundation/AcceptHeader.php @@ -97,8 +97,6 @@ public function get($value) /** * Adds an item. * - * @param AcceptHeaderItem $item - * * @return $this */ public function add(AcceptHeaderItem $item) diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php index 921751f6b5af5..263fb321c5745 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php @@ -65,8 +65,6 @@ private function __construct() * Registers a new extension guesser. * * When guessing, this guesser is preferred over previously registered ones. - * - * @param ExtensionGuesserInterface $guesser */ public function register(ExtensionGuesserInterface $guesser) { diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php index 17fd344b8437c..49c323c1f55e8 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -23,8 +23,6 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface * This list has been updated from upstream on 2013-04-23. * * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types - * - * @var array */ protected $defaultExtensions = array( 'application/andrew-inset' => 'ez', diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php index 69c803b4993bc..e3ef45ef672cf 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php @@ -93,8 +93,6 @@ private function __construct() * Registers a new mime type guesser. * * When guessing, this guesser is preferred over previously registered ones. - * - * @param MimeTypeGuesserInterface $guesser */ public function register(MimeTypeGuesserInterface $guesser) { diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index 722ec2a9c4a92..a43ea14766533 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -106,8 +106,6 @@ protected function convertFileInformation($file) * It's safe to pass an already converted array, in which case this method * just returns the original array unmodified. * - * @param array $data - * * @return array */ protected function fixPhpFilesArray($data) diff --git a/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/Symfony/Component/HttpFoundation/ParameterBag.php index 77b05a9000e4c..4b58d1c3723c3 100644 --- a/src/Symfony/Component/HttpFoundation/ParameterBag.php +++ b/src/Symfony/Component/HttpFoundation/ParameterBag.php @@ -20,8 +20,6 @@ class ParameterBag implements \IteratorAggregate, \Countable { /** * Parameter storage. - * - * @var array */ protected $parameters; diff --git a/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php index 066e7e8bf1dee..c26db3e6f4e66 100644 --- a/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php +++ b/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php @@ -21,8 +21,6 @@ interface RequestMatcherInterface /** * Decides whether the rule(s) implemented by the strategy matches the supplied request. * - * @param Request $request The request to check for a match - * * @return bool true if the request matches, false otherwise */ public function matches(Request $request); diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 4c94ea2e363bf..a98a3772352ab 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -258,8 +258,6 @@ public function __clone() * compliant with RFC 2616. Most of the changes are based on * the Request that is "associated" with this Response. * - * @param Request $request A Request instance - * * @return $this */ public function prepare(Request $request) @@ -616,8 +614,6 @@ public function getDate() /** * Sets the Date header. * - * @param \DateTime $date A \DateTime instance - * * @return $this */ public function setDate(\DateTime $date) @@ -992,8 +988,6 @@ public function setVary($headers, $replace = true) * If the Response is not modified, it sets the status code to 304 and * removes the actual content by calling the setNotModified() method. * - * @param Request $request A Request instance - * * @return bool true if the Response validators match the Request, false otherwise */ public function isNotModified(Request $request) diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 32e7187853496..a042328ca5229 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -24,24 +24,10 @@ class ResponseHeaderBag extends HeaderBag const DISPOSITION_ATTACHMENT = 'attachment'; const DISPOSITION_INLINE = 'inline'; - /** - * @var array - */ protected $computedCacheControl = array(); - - /** - * @var array - */ protected $cookies = array(); - - /** - * @var array - */ protected $headerNames = array(); - /** - * @param array $headers An array of HTTP headers - */ public function __construct(array $headers = array()) { parent::__construct($headers); @@ -140,11 +126,6 @@ public function getCacheControlDirective($key) return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; } - /** - * Sets a cookie. - * - * @param Cookie $cookie - */ public function setCookie(Cookie $cookie) { $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php index 57c297197b862..ea1fda290fdfe 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php @@ -17,15 +17,8 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable { private $name = 'attributes'; - - /** - * @var string - */ private $storageKey; - /** - * @var array - */ protected $attributes = array(); /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php index 8110aee0cffc1..59ba309005b38 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -19,19 +19,7 @@ class AutoExpireFlashBag implements FlashBagInterface { private $name = 'flashes'; - - /** - * Flash messages. - * - * @var array - */ private $flashes = array('display' => array(), 'new' => array()); - - /** - * The storage key for flashes in the session. - * - * @var string - */ private $storageKey; /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index a4159cd82254e..f533a755db815 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -21,19 +21,7 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate { private $name = 'flashes'; - - /** - * Flash messages. - * - * @var array - */ private $flashes = array(); - - /** - * The storage key for flashes in the session. - * - * @var string - */ private $storageKey; /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 25f3d57b5417b..80e97f17cdff3 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -72,8 +72,6 @@ public function all(); /** * Sets all flash messages. - * - * @param array $messages */ public function setAll(array $messages); diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php index aca18aacbf89f..8e37d06d65da3 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php @@ -27,8 +27,6 @@ public function getName(); /** * Initializes the Bag. - * - * @param array $array */ public function initialize(array &$array); diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php index 172c9b457fb15..95fca857e2430 100644 --- a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -159,8 +159,6 @@ public function isStarted(); /** * Registers a SessionBagInterface with the session. - * - * @param SessionBagInterface $bag */ public function registerBag(SessionBagInterface $bag); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 0349a43367d76..027f4efffce51 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -72,11 +72,6 @@ public function __construct($name = 'MOCKSESSID', MetadataBag $metaBag = null) $this->setMetadataBag($metaBag); } - /** - * Sets the session data. - * - * @param array $array - */ public function setSessionData(array $array) { $this->data = $array; @@ -213,11 +208,6 @@ public function isStarted() return $this->started; } - /** - * Sets the MetadataBag. - * - * @param MetadataBag $bag - */ public function setMetadataBag(MetadataBag $bag = null) { if (null === $bag) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 93c223436f183..76654d26fd871 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -296,11 +296,6 @@ public function getBag($name) return $this->bags[$name]; } - /** - * Sets the MetadataBag. - * - * @param MetadataBag $metaBag - */ public function setMetadataBag(MetadataBag $metaBag = null) { if (null === $metaBag) { @@ -431,8 +426,6 @@ public function setSaveHandler($saveHandler = null) * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). * PHP takes the return value from the read() handler, unserializes it * and populates $_SESSION with the result automatically. - * - * @param array|null $session */ protected function loadSession(array &$session = null) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php index 097583d5a51eb..66e8b33dd2bed 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -127,8 +127,6 @@ public function getBag($name); /** * Registers a SessionBagInterface for use. - * - * @param SessionBagInterface $bag */ public function registerBag(SessionBagInterface $bag); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php index 8c148b58f06c8..655c26a9c24ce 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php @@ -21,10 +21,7 @@ */ class AttributeBagTest extends TestCase { - /** - * @var array - */ - private $array; + private $array = array(); /** * @var AttributeBag diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index d9d9eb7fbee77..f074ce1b26261 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -21,10 +21,7 @@ */ class NamespacedAttributeBagTest extends TestCase { - /** - * @var array - */ - private $array; + private $array = array(); /** * @var NamespacedAttributeBag diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php index 4eb200afa3bdf..18b71a5021fbb 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php @@ -26,9 +26,6 @@ class AutoExpireFlashBagTest extends TestCase */ private $bag; - /** - * @var array - */ protected $array = array(); protected function setUp() diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php index 3de22460357be..b44429d8989d8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php @@ -26,9 +26,6 @@ class FlashBagTest extends TestCase */ private $bag; - /** - * @var array - */ protected $array = array(); protected function setUp() diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php index 159e62114e1a3..69cf6163c16f3 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php @@ -26,9 +26,6 @@ class MetadataBagTest extends TestCase */ protected $bag; - /** - * @var array - */ protected $array = array(); protected function setUp() diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 20f9ca060bc3c..7eda5b3a3d275 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -55,8 +55,6 @@ protected function tearDown() } /** - * @param array $options - * * @return NativeSessionStorage */ protected function getStorage(array $options = array()) diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index 35594e706ca88..1782ab982d28b 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -51,8 +51,6 @@ public function shutdown() * * This method can be overridden to register compilation passes, * other extensions, ... - * - * @param ContainerBuilder $container A ContainerBuilder instance */ public function build(ContainerBuilder $container) { @@ -157,8 +155,6 @@ final public function getName() * * * Commands are in the 'Command' sub-directory * * Commands extend Symfony\Component\Console\Command\Command - * - * @param Application $application An Application instance */ public function registerCommands(Application $application) { diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php index 25eea1d76dec3..ade098f4cec62 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php +++ b/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php @@ -36,8 +36,6 @@ public function shutdown(); * Builds the bundle. * * It is only ever called once when the cache is empty. - * - * @param ContainerBuilder $container A ContainerBuilder instance */ public function build(ContainerBuilder $container); diff --git a/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php b/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php index c749c7c0a4e47..231653119fb7c 100644 --- a/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php +++ b/src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php @@ -18,9 +18,6 @@ */ class ChainCacheClearer implements CacheClearerInterface { - /** - * @var array - */ protected $clearers; /** @@ -45,8 +42,6 @@ public function clear($cacheDir) /** * Adds a cache clearer to the aggregate. - * - * @param CacheClearerInterface $clearer */ public function add(CacheClearerInterface $clearer) { diff --git a/src/Symfony/Component/HttpKernel/Client.php b/src/Symfony/Component/HttpKernel/Client.php index d89fb85dbb10b..05fb6e8de080e 100644 --- a/src/Symfony/Component/HttpKernel/Client.php +++ b/src/Symfony/Component/HttpKernel/Client.php @@ -51,8 +51,6 @@ public function __construct(HttpKernelInterface $kernel, array $server = array() /** * Makes a request. * - * @param Request $request A Request instance - * * @return Response A Response instance */ protected function doRequest($request) @@ -69,8 +67,6 @@ protected function doRequest($request) /** * Returns the script to execute when the request must be insulated. * - * @param Request $request A Request instance - * * @return string */ protected function getScript($request) @@ -117,8 +113,6 @@ protected function getHandleScript() /** * Converts the BrowserKit request to a HttpKernel request. * - * @param DomRequest $request A DomRequest instance - * * @return Request A Request instance */ protected function filterRequest(DomRequest $request) @@ -143,8 +137,6 @@ protected function filterRequest(DomRequest $request) * * @see UploadedFile * - * @param array $files An array of files - * * @return array An array with all uploaded files marked as already moved */ protected function filterFiles(array $files) @@ -182,8 +174,6 @@ protected function filterFiles(array $files) /** * Converts the HttpKernel response to a BrowserKit response. * - * @param Response $response A Response instance - * * @return DomResponse A DomResponse instance */ protected function filterResponse($response) diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 5d288a4a110e6..8a3ea1b840681 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -41,9 +41,6 @@ class ControllerResolver implements ControllerResolverInterface */ private $supportsScalarTypes; - /** - * @param LoggerInterface $logger A LoggerInterface instance - */ public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php index f7b19ed1bdbac..7adda4e42075a 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php @@ -34,8 +34,6 @@ interface ControllerResolverInterface * The resolver must only throw an exception when it should be able to load * controller but cannot because of some errors made by the developer. * - * @param Request $request A Request instance - * * @return callable|false A PHP callable representing the Controller, * or false if this resolver is not able to determine the controller * diff --git a/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php index 2d3d03b231a6f..2f27fe5c70d55 100644 --- a/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php @@ -22,10 +22,6 @@ class TraceableControllerResolver implements ControllerResolverInterface private $resolver; private $stopwatch; - /** - * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - */ public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch) { $this->resolver = $resolver; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index d17e32687a0ab..c1c085cbed9d8 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -41,8 +41,6 @@ public function __construct($name = null, $version = null) /** * Sets the Kernel associated with this Request. - * - * @param KernelInterface $kernel A KernelInterface instance */ public function setKernel(KernelInterface $kernel = null) { diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php index 2820ad5b289b5..963732ba6a77b 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php @@ -23,10 +23,6 @@ interface DataCollectorInterface { /** * Collects data for the given Request and Response. - * - * @param Request $request A Request instance - * @param Response $response A Response instance - * @param \Exception $exception An Exception instance */ public function collect(Request $request, Response $response, \Exception $exception = null); diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php index 76d962346175e..b0a1417b6fd31 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -60,8 +60,6 @@ protected function guessRoute(Request $request, $controller) /** * Remembers the controller associated to each request. - * - * @param FilterControllerEvent $event The filter controller event */ public function onKernelController(FilterControllerEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php index c7eca3063c610..072c35f1c1cc6 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php @@ -37,9 +37,6 @@ final public function load(array $configs, ContainerBuilder $container) /** * Configures the passed container according to the merged configuration. - * - * @param array $mergedConfig - * @param ContainerBuilder $container */ abstract protected function loadInternal(array $mergedConfig, ContainerBuilder $container); } diff --git a/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php b/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php index ed816a9d32cf9..53a7efce76cae 100644 --- a/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php +++ b/src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php @@ -26,11 +26,6 @@ */ class FilterResponseEvent extends KernelEvent { - /** - * The current response object. - * - * @var Response - */ private $response; public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, Response $response) @@ -52,8 +47,6 @@ public function getResponse() /** * Sets a new response object. - * - * @param Response $response */ public function setResponse(Response $response) { diff --git a/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php b/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php index 4c96a4b7d907a..f7745ea3dc160 100644 --- a/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php +++ b/src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php @@ -24,11 +24,6 @@ */ class GetResponseEvent extends KernelEvent { - /** - * The response object. - * - * @var Response - */ private $response; /** @@ -43,8 +38,6 @@ public function getResponse() /** * Sets a response and stops event propagation. - * - * @param Response $response */ public function setResponse(Response $response) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php index 280844c18313e..ecf6f59190498 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -22,14 +22,8 @@ */ class AddRequestFormatsListener implements EventSubscriberInterface { - /** - * @var array - */ protected $formats; - /** - * @param array $formats - */ public function __construct(array $formats) { $this->formats = $formats; @@ -37,8 +31,6 @@ public function __construct(array $formats) /** * Adds request formats. - * - * @param GetResponseEvent $event */ public function onKernelRequest(GetResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php b/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php index 2f523a54dbe4a..6ce295b0fdfcf 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php @@ -57,8 +57,6 @@ public function __construct($exceptionHandler, LoggerInterface $logger = null, $ /** * Configures the error handler. - * - * @param Event|null $event The triggering event */ public function configure(Event $event = null) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php index 06b8a030cfadd..783ae2581d8c3 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php @@ -27,10 +27,6 @@ class DumpListener implements EventSubscriberInterface private $cloner; private $dumper; - /** - * @param ClonerInterface $cloner Cloner service - * @param DataDumperInterface $dumper Dumper service - */ public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper) { $this->cloner = $cloner; diff --git a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php index c68bd69fc58eb..aea2eb1651a27 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php @@ -47,8 +47,6 @@ public function __construct(UriSigner $signer, $fragmentPath = '/_fragment') /** * Fixes request attributes when the path is '/_fragment'. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws AccessDeniedHttpException if the request does not come from a trusted IP */ public function onKernelRequest(GetResponseEvent $event) diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index d4c515e293932..66df1295fc131 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -65,8 +65,6 @@ public function __construct(Profiler $profiler, RequestMatcherInterface $matcher /** * Handles the onKernelException event. - * - * @param GetResponseForExceptionEvent $event A GetResponseForExceptionEvent instance */ public function onKernelException(GetResponseForExceptionEvent $event) { @@ -89,8 +87,6 @@ public function onKernelRequest(GetResponseEvent $event) /** * Handles the onKernelResponse event. - * - * @param FilterResponseEvent $event A FilterResponseEvent instance */ public function onKernelResponse(FilterResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php b/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php index eeb2b0fcb2355..6d56197a737e7 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php @@ -31,8 +31,6 @@ public function __construct($charset) /** * Filters the Response. - * - * @param FilterResponseEvent $event A FilterResponseEvent instance */ public function onKernelResponse(FilterResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php b/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php index 571cd74e343d0..671db5d827099 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php @@ -26,8 +26,6 @@ class StreamedResponseListener implements EventSubscriberInterface { /** * Filters the Response. - * - * @param FilterResponseEvent $event A FilterResponseEvent instance */ public function onKernelResponse(FilterResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php b/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php index b68019a62794b..2f4e8449fb1cd 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php @@ -25,9 +25,6 @@ class SurrogateListener implements EventSubscriberInterface { private $surrogate; - /** - * @param SurrogateInterface $surrogate An SurrogateInterface instance - */ public function __construct(SurrogateInterface $surrogate = null) { $this->surrogate = $surrogate; @@ -35,8 +32,6 @@ public function __construct(SurrogateInterface $surrogate = null) /** * Filters the Response. - * - * @param FilterResponseEvent $event A FilterResponseEvent instance */ public function onKernelResponse(FilterResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php b/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php index 19a61f169bdf9..445caacd8a420 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php @@ -50,8 +50,6 @@ public function onKernelRequest(GetResponseEvent $event) /** * Checks if session was initialized and saves if current request is master * Runs on 'kernel.response' in test environment. - * - * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php b/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php index 00096ccf9e4f2..cbeee3f5e5822 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ValidateRequestListener.php @@ -25,8 +25,6 @@ class ValidateRequestListener implements EventSubscriberInterface { /** * Performs the validation. - * - * @param GetResponseEvent $event */ public function onKernelRequest(GetResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index 108ebd5388e6b..1e29d04a539b4 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -57,8 +57,6 @@ public function __construct(array $renderers = array(), $debug = false, RequestS /** * Adds a renderer. - * - * @param FragmentRendererInterface $renderer A FragmentRendererInterface instance */ public function addRenderer(FragmentRendererInterface $renderer) { @@ -122,8 +120,6 @@ public function render($uri, $renderer = 'inline', array $options = array()) * When the Response is a StreamedResponse, the content is streamed immediately * instead of being returned. * - * @param Response $response A Response instance - * * @return string|null The Response content or null when the Response is streamed * * @throws \RuntimeException when the Response is not successful diff --git a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php index 8170ceeb91943..17ed967fb51c3 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -29,10 +29,6 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer private $kernel; private $dispatcher; - /** - * @param HttpKernelInterface $kernel A HttpKernelInterface instance - * @param EventDispatcherInterface $dispatcher A EventDispatcherInterface instance - */ public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) { $this->kernel = $kernel; diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php index 9b17b4fc54039..716b904630ad8 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -61,8 +61,6 @@ public function createCacheStrategy() /** * Checks that at least one surrogate has ESI/1.0 capability. * - * @param Request $request A Request instance - * * @return bool true if one surrogate has ESI/1.0 capability, false otherwise */ public function hasSurrogateCapability(Request $request) @@ -92,8 +90,6 @@ public function hasSurrogateEsiCapability(Request $request) /** * Adds ESI/1.0 capability to the given Request. - * - * @param Request $request A Request instance */ public function addSurrogateCapability(Request $request) { @@ -121,8 +117,6 @@ public function addSurrogateEsiCapability(Request $request) * Adds HTTP headers to specify that the Response needs to be parsed for ESI. * * This method only adds an ESI HTTP header if the Response has some ESI tags. - * - * @param Response $response A Response instance */ public function addSurrogateControl(Response $response) { @@ -134,8 +128,6 @@ public function addSurrogateControl(Response $response) /** * Checks that the Response needs to be parsed for ESI tags. * - * @param Response $response A Response instance - * * @return bool true if the Response needs to be parsed, false otherwise */ public function needsParsing(Response $response) @@ -191,9 +183,6 @@ public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comme /** * Replaces a Response ESI tags with the included resource content. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * * @return Response */ public function process(Request $request, Response $response) diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 32cf95480eb5e..7ca29d238aca6 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -516,9 +516,6 @@ protected function forward(Request $request, $catch = false, Response $entry = n /** * Checks whether the cache entry is "fresh enough" to satisfy the Request. * - * @param Request $request A Request instance - * @param Response $entry A Response instance - * * @return bool true if the cache entry if fresh enough, false otherwise */ protected function isFreshEnough(Request $request, Response $entry) @@ -537,9 +534,6 @@ protected function isFreshEnough(Request $request, Response $entry) /** * Locks a Request during the call to the backend. * - * @param Request $request A Request instance - * @param Response $entry A Response instance - * * @return bool true if the cache entry can be returned even if it is staled, false otherwise */ protected function lock(Request $request, Response $entry) @@ -595,9 +589,6 @@ protected function lock(Request $request, Response $entry) /** * Writes the Response to the cache. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * * @throws \Exception */ protected function store(Request $request, Response $response) @@ -625,9 +616,6 @@ protected function store(Request $request, Response $response) /** * Restores the Response body. - * - * @param Request $request A Request instance - * @param Response $response A Response instance */ private function restoreResponseBody(Request $request, Response $response) { @@ -669,8 +657,6 @@ protected function processResponseBody(Request $request, Response $response) * Checks if the Request includes authorization or other sensitive information * that should cause the Response to be considered private by default. * - * @param Request $request A Request instance - * * @return bool true if the Request is private, false otherwise */ private function isPrivateRequest(Request $request) diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php index d70c2e06ec8b0..e282299aee8a3 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php @@ -27,15 +27,11 @@ interface ResponseCacheStrategyInterface { /** * Adds a Response. - * - * @param Response $response */ public function add(Response $response); /** * Updates the Response HTTP headers based on the embedded Responses. - * - * @param Response $response */ public function update(Response $response); } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/Symfony/Component/HttpKernel/HttpCache/Store.php index 83c3a9ae139d9..8eeb93192cc8f 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Store.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -60,8 +60,6 @@ public function cleanup() /** * Tries to lock the cache for a given Request, without blocking. * - * @param Request $request A Request instance - * * @return bool|string true if the lock is acquired, the path to the current lock otherwise */ public function lock(Request $request) @@ -89,8 +87,6 @@ public function lock(Request $request) /** * Releases the lock for the given Request. * - * @param Request $request A Request instance - * * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise */ public function unlock(Request $request) @@ -131,8 +127,6 @@ public function isLocked(Request $request) /** * Locates a cached Response for the Request provided. * - * @param Request $request A Request instance - * * @return Response|null A Response instance, or null if no cache entry was found */ public function lookup(Request $request) @@ -173,9 +167,6 @@ public function lookup(Request $request) * Existing entries are read and any that match the response are removed. This * method calls write with the new list of cache entries. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * * @return string The key under which the response is stored * * @throws \RuntimeException @@ -228,8 +219,6 @@ public function write(Request $request, Response $response) /** * Returns content digest for $response. * - * @param Response $response - * * @return string */ protected function generateContentDigest(Response $response) @@ -240,8 +229,6 @@ protected function generateContentDigest(Response $response) /** * Invalidates all cache entries that match the request. * - * @param Request $request A Request instance - * * @throws \RuntimeException */ public function invalidate(Request $request) @@ -432,8 +419,6 @@ public function getPath($key) * headers, use a Vary header to indicate them, and each representation will * be stored independently under the same cache key. * - * @param Request $request A Request instance - * * @return string A key for the given Request */ protected function generateCacheKey(Request $request) @@ -444,8 +429,6 @@ protected function generateCacheKey(Request $request) /** * Returns a cache key for the given Request. * - * @param Request $request A Request instance - * * @return string A key for the given Request */ private function getCacheKey(Request $request) @@ -460,8 +443,6 @@ private function getCacheKey(Request $request) /** * Persists the Request HTTP headers. * - * @param Request $request A Request instance - * * @return array An array of HTTP headers */ private function persistRequest(Request $request) @@ -472,8 +453,6 @@ private function persistRequest(Request $request) /** * Persists the Response HTTP headers. * - * @param Response $response A Response instance - * * @return array An array of HTTP headers */ private function persistResponse(Response $response) diff --git a/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php index ddc0c04ee3960..8f1cf4409eee8 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php @@ -27,8 +27,6 @@ interface StoreInterface /** * Locates a cached Response for the Request provided. * - * @param Request $request A Request instance - * * @return Response|null A Response instance, or null if no cache entry was found */ public function lookup(Request $request); @@ -39,25 +37,18 @@ public function lookup(Request $request); * Existing entries are read and any that match the response are removed. This * method calls write with the new list of cache entries. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * * @return string The key under which the response is stored */ public function write(Request $request, Response $response); /** * Invalidates all cache entries that match the request. - * - * @param Request $request A Request instance */ public function invalidate(Request $request); /** * Locks the cache for a given Request. * - * @param Request $request A Request instance - * * @return bool|string true if the lock is acquired, the path to the current lock otherwise */ public function lock(Request $request); @@ -65,8 +56,6 @@ public function lock(Request $request); /** * Releases the lock for the given Request. * - * @param Request $request A Request instance - * * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise */ public function unlock(Request $request); @@ -74,8 +63,6 @@ public function unlock(Request $request); /** * Returns whether or not a lock exists. * - * @param Request $request A Request instance - * * @return bool true if lock exists, false otherwise */ public function isLocked(Request $request); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php index 5d65fd65a4436..85391f8f36b17 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php @@ -33,16 +33,12 @@ public function createCacheStrategy(); /** * Checks that at least one surrogate has Surrogate capability. * - * @param Request $request A Request instance - * * @return bool true if one surrogate has Surrogate capability, false otherwise */ public function hasSurrogateCapability(Request $request); /** * Adds Surrogate-capability to the given Request. - * - * @param Request $request A Request instance */ public function addSurrogateCapability(Request $request); @@ -50,16 +46,12 @@ public function addSurrogateCapability(Request $request); * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate. * * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags. - * - * @param Response $response A Response instance */ public function addSurrogateControl(Response $response); /** * Checks that the Response needs to be parsed for Surrogate tags. * - * @param Response $response A Response instance - * * @return bool true if the Response needs to be parsed, false otherwise */ public function needsParsing(Response $response); @@ -79,9 +71,6 @@ public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comme /** * Replaces a Response Surrogate tags with the included resource content. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * * @return Response */ public function process(Request $request, Response $response); diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index cb32e597bd34b..f1114bf632c00 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -39,11 +39,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface protected $resolver; protected $requestStack; - /** - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance - * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance - * @param RequestStack $requestStack A stack for master/sub requests - */ public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null) { $this->dispatcher = $dispatcher; diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 404fbaaacb609..edea2a9c07261 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -614,8 +614,6 @@ protected function buildContainer() /** * Prepares the ContainerBuilder before it is compiled. - * - * @param ContainerBuilder $container A ContainerBuilder instance */ protected function prepareContainer(ContainerBuilder $container) { @@ -679,8 +677,6 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container /** * Returns a loader for the container. * - * @param ContainerInterface $container The service container - * * @return DelegatingLoader The loader */ protected function getContainerLoader(ContainerInterface $container) diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php index 37ac3af515a6a..3e2ffe2fb33a7 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -33,8 +33,6 @@ public function registerBundles(); /** * Loads the container configuration. - * - * @param LoaderInterface $loader A LoaderInterface instance */ public function registerContainerConfiguration(LoaderInterface $loader); diff --git a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php index 3a4fa7b79a403..045d55a7aec61 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php @@ -114,8 +114,6 @@ protected function getMongo() } /** - * @param array $data - * * @return Profile */ protected function createProfileFromData(array $data) @@ -197,8 +195,6 @@ private function buildQuery($ip, $url, $method, $start, $end) } /** - * @param array $data - * * @return array */ private function getData(array $data) @@ -216,8 +212,6 @@ private function getData(array $data) } /** - * @param array $data - * * @return Profile */ private function getProfile(array $data) diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php index ad42652d5d8a3..024ca28ac9bd8 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -73,8 +73,6 @@ public function getToken() /** * Sets the parent token. - * - * @param Profile $parent */ public function setParent(Profile $parent) { @@ -214,8 +212,6 @@ public function setChildren(array $children) /** * Adds the child token. - * - * @param Profile $child */ public function addChild(Profile $child) { @@ -266,8 +262,6 @@ public function setCollectors(array $collectors) /** * Adds a Collector. - * - * @param DataCollectorInterface $collector A DataCollectorInterface instance */ public function addCollector(DataCollectorInterface $collector) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index 2ff0beaf62019..92c447bab90f2 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -25,9 +25,6 @@ */ class Profiler { - /** - * @var ProfilerStorageInterface - */ private $storage; /** @@ -35,9 +32,6 @@ class Profiler */ private $collectors = array(); - /** - * @var LoggerInterface - */ private $logger; /** @@ -45,10 +39,6 @@ class Profiler */ private $enabled = true; - /** - * @param ProfilerStorageInterface $storage A ProfilerStorageInterface instance - * @param LoggerInterface $logger A LoggerInterface instance - */ public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null) { $this->storage = $storage; @@ -74,8 +64,6 @@ public function enable() /** * Loads the Profile for the given Response. * - * @param Response $response A Response instance - * * @return Profile|false A Profile instance */ public function loadProfileFromResponse(Response $response) @@ -102,8 +90,6 @@ public function loadProfile($token) /** * Saves a Profile. * - * @param Profile $profile A Profile instance - * * @return bool */ public function saveProfile(Profile $profile) @@ -133,8 +119,6 @@ public function purge() /** * Exports the current profiler data. * - * @param Profile $profile A Profile instance - * * @return string The exported data */ public function export(Profile $profile) @@ -184,10 +168,6 @@ public function find($ip, $url, $limit, $method, $start, $end) /** * Collects data for the given Response. * - * @param Request $request A Request instance - * @param Response $response A Response instance - * @param \Exception $exception An exception instance if the request threw one - * * @return Profile|null A Profile instance or null if the profiler is disabled */ public function collect(Request $request, Response $response, \Exception $exception = null) @@ -244,8 +224,6 @@ public function set(array $collectors = array()) /** * Adds a Collector. - * - * @param DataCollectorInterface $collector A DataCollectorInterface instance */ public function add(DataCollectorInterface $collector) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php index ea72af2314f6f..544fb1fef6ec6 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php +++ b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php @@ -46,8 +46,6 @@ public function read($token); /** * Saves a Profile. * - * @param Profile $profile A Profile instance - * * @return bool Write operation successful */ public function write(Profile $profile); diff --git a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php index 7b9bfd4cfd666..e9e90d4006f59 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php @@ -381,8 +381,6 @@ private function appendValue($key, $value, $expiration = 0) /** * Removes the specified keys. * - * @param array $keys - * * @return bool */ private function delete(array $keys) diff --git a/src/Symfony/Component/HttpKernel/TerminableInterface.php b/src/Symfony/Component/HttpKernel/TerminableInterface.php index d55a15b87ef2e..8aa331979340c 100644 --- a/src/Symfony/Component/HttpKernel/TerminableInterface.php +++ b/src/Symfony/Component/HttpKernel/TerminableInterface.php @@ -27,9 +27,6 @@ interface TerminableInterface * Terminates a request/response cycle. * * Should be called after sending the response and before shutting down the kernel. - * - * @param Request $request A Request instance - * @param Response $response A Response instance */ public function terminate(Request $request, Response $response); } diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php index 3cf969bab8134..aedcac918515b 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php @@ -28,22 +28,15 @@ */ class BundleEntryReader implements BundleEntryReaderInterface { - /** - * @var BundleReaderInterface - */ private $reader; /** * A mapping of locale aliases to locales. - * - * @var array */ private $localeAliases = array(); /** * Creates an entry reader based on the given resource bundle reader. - * - * @param BundleReaderInterface $reader A resource bundle reader to use */ public function __construct(BundleReaderInterface $reader) { diff --git a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php index 19cf6eab00a70..cd9da7c13cb3f 100644 --- a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php @@ -53,8 +53,6 @@ class CurrencyDataGenerator extends AbstractDataGenerator /** * Monetary units excluded from generation. - * - * @var array */ private static $blacklist = array( self::UNKNOWN_CURRENCY_ID => true, @@ -162,8 +160,6 @@ protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) } /** - * @param ArrayAccessibleResourceBundle $rootBundle - * * @return array */ private function generateSymbolNamePairs(ArrayAccessibleResourceBundle $rootBundle) diff --git a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index 59987594235f0..77bcb00c85f4f 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -28,8 +28,6 @@ class LanguageDataGenerator extends AbstractDataGenerator { /** * Source: http://www-01.sil.org/iso639-3/codes.asp. - * - * @var array */ private static $preferredAlpha2ToAlpha3Mapping = array( 'ak' => 'aka', diff --git a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php index 28c90a5ed98b8..9c9006d7bac28 100644 --- a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php @@ -43,8 +43,6 @@ class RegionDataGenerator extends AbstractDataGenerator /** * Regions excluded from generation. - * - * @var array */ private static $blacklist = array( self::UNKNOWN_REGION_ID => true, @@ -135,8 +133,6 @@ protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) } /** - * @param ArrayAccessibleResourceBundle $localeBundle - * * @return array */ protected function generateRegionNames(ArrayAccessibleResourceBundle $localeBundle) diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php index 35373bb6c3a4e..b931cd756a77f 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -253,8 +253,6 @@ protected function buildCharsMatch($specialChars) * Normalize a preg_replace match array, removing the numeric keys and returning an associative array * with the value and pattern values for the matched Transformer. * - * @param array $data - * * @return array */ protected function normalizeArray(array $data) @@ -332,8 +330,6 @@ protected function calculateUnixTimestamp(\DateTime $dateTime, array $options) * Add sensible default values for missing items in the extracted date/time options array. The values * are base in the beginning of the Unix era. * - * @param array $options - * * @return array */ private function getDefaultValueForOptions(array $options) diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php index 3cb7fd162ead8..0740be905f611 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php @@ -18,9 +18,6 @@ */ class MonthTransformer extends Transformer { - /** - * @var array - */ protected static $months = array( 'January', 'February', @@ -38,22 +35,16 @@ class MonthTransformer extends Transformer /** * Short months names (first 3 letters). - * - * @var array */ protected static $shortMonths = array(); /** * Flipped $months array, $name => $index. - * - * @var array */ protected static $flippedMonths = array(); /** * Flipped $shortMonths array, $name => $index. - * - * @var array */ protected static $flippedShortMonths = array(); diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index fe58f4904ccbe..c4a69bb9a45c0 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -73,8 +73,6 @@ class IntlDateFormatter /** * Patterns used to format the date when no pattern is provided. - * - * @var array */ private $defaultDateFormats = array( self::NONE => '', @@ -86,8 +84,6 @@ class IntlDateFormatter /** * Patterns used to format the time when no pattern is provided. - * - * @var array */ private $defaultTimeFormats = array( self::FULL => 'h:mm:ss a zzzz', diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php index 1a2c35ffb7513..88af2e775b94f 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -215,8 +215,6 @@ protected function isIntlFailure($errorCode) * + 10 seconds) are added, then we have 86,400 seconds (24h * 60min * 60s) * + 10 seconds * - * @param array $dataSets - * * @return array */ private function notImplemented(array $dataSets) diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index ebf33f6bdbf73..06dc05ae4d70a 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -27,22 +27,16 @@ class Locale extends \Locale { /** * Caches the countries in different locales. - * - * @var array */ protected static $countries = array(); /** * Caches the languages in different locales. - * - * @var array */ protected static $languages = array(); /** * Caches the different locales. - * - * @var array */ protected static $locales = array(); diff --git a/src/Symfony/Component/Process/ExecutableFinder.php b/src/Symfony/Component/Process/ExecutableFinder.php index d8e689622a537..d042a5b13a211 100644 --- a/src/Symfony/Component/Process/ExecutableFinder.php +++ b/src/Symfony/Component/Process/ExecutableFinder.php @@ -23,8 +23,6 @@ class ExecutableFinder /** * Replaces default suffixes of executable. - * - * @param array $suffixes */ public function setSuffixes(array $suffixes) { diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 72b055d81844e..720e746b85ad4 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -80,8 +80,6 @@ class Process * Exit codes translation table. * * User-defined errors must use exit codes in the 64-113 range. - * - * @var array */ public static $exitCodes = array( 0 => 'OK', diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 03dc617782f2d..101754b06bd3b 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -96,25 +96,11 @@ class PropertyAccessor implements PropertyAccessorInterface */ const ACCESS_TYPE_NOT_FOUND = 4; - /** - * @var bool - */ private $magicCall; - - /** - * @var bool - */ private $ignoreInvalidIndices; - - /** - * @var array - */ private $readPropertyCache = array(); - - /** - * @var array - */ private $writePropertyCache = array(); + private static $previousErrorHandler = false; private static $errorHandler = array(__CLASS__, 'handleError'); private static $resultProto = array(self::VALUE => null); diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php index 9d1e0870715a5..de80751ce28ca 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -18,14 +18,7 @@ */ class PropertyPathBuilder { - /** - * @var array - */ private $elements = array(); - - /** - * @var array - */ private $isIndex = array(); /** diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php b/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php index 7ea0fa2455488..02fa26e1fc5bc 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathIterator.php @@ -19,11 +19,6 @@ */ class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface { - /** - * The traversed property path. - * - * @var PropertyPathInterface - */ protected $path; /** diff --git a/src/Symfony/Component/PropertyAccess/StringUtil.php b/src/Symfony/Component/PropertyAccess/StringUtil.php index d4df676ec0a48..1918763db653a 100644 --- a/src/Symfony/Component/PropertyAccess/StringUtil.php +++ b/src/Symfony/Component/PropertyAccess/StringUtil.php @@ -21,8 +21,6 @@ class StringUtil /** * Map english plural to singular suffixes. * - * @var array - * * @see http://english-zone.com/spelling/plurals.html */ private static $pluralMap = array( diff --git a/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php b/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php index f684c74916c15..712412fecec58 100644 --- a/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php +++ b/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php @@ -20,9 +20,6 @@ */ class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface { - /** - * @var array - */ protected $allowedMethods = array(); public function __construct(array $allowedMethods, $message = null, $code = 0, \Exception $previous = null) diff --git a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php index 4a7051b5ae797..659c5ba1c8074 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php @@ -20,14 +20,8 @@ */ abstract class GeneratorDumper implements GeneratorDumperInterface { - /** - * @var RouteCollection - */ private $routes; - /** - * @param RouteCollection $routes The RouteCollection to dump - */ public function __construct(RouteCollection $routes) { $this->routes = $routes; diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 11e068fec1367..ce62106465089 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -27,14 +27,7 @@ */ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface { - /** - * @var RouteCollection - */ protected $routes; - - /** - * @var RequestContext - */ protected $context; /** @@ -42,9 +35,6 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt */ protected $strictRequirements = true; - /** - * @var LoggerInterface|null - */ protected $logger; /** @@ -75,11 +65,6 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt '%7C' => '|', ); - /** - * @param RouteCollection $routes A RouteCollection instance - * @param RequestContext $context The context - * @param LoggerInterface|null $logger A logger instance - */ public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) { $this->routes = $routes; diff --git a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php index 8d6e1c19ba47a..d84b1405e41d3 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -57,9 +57,6 @@ */ abstract class AnnotationClassLoader implements LoaderInterface { - /** - * @var Reader - */ protected $reader; /** @@ -72,9 +69,6 @@ abstract class AnnotationClassLoader implements LoaderInterface */ protected $defaultRouteIndex = 0; - /** - * @param Reader $reader - */ public function __construct(Reader $reader) { $this->reader = $reader; diff --git a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php index 376ad3c585f4f..9c5ab1b6ae636 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php @@ -27,9 +27,6 @@ class AnnotationFileLoader extends FileLoader protected $loader; /** - * @param FileLocatorInterface $locator A FileLocator instance - * @param AnnotationClassLoader $loader An AnnotationClassLoader instance - * * @throws \RuntimeException */ public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 1eb51852a07d3..9b66014d6c6fa 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -35,8 +35,6 @@ class ApacheMatcherDumper extends MatcherDumper * * script_name: The script name (app.php by default) * * base_uri: The base URI ("" by default) * - * @param array $options An array of options - * * @return string A string to be used as Apache rewrite rules * * @throws \LogicException When the route regex is invalid @@ -191,8 +189,6 @@ private function dumpRoute($name, $route, array $options, $hostRegexUnique) /** * Returns methods allowed for a route. * - * @param Route $route The route - * * @return array The methods */ private function getRouteMethods(Route $route) @@ -256,8 +252,6 @@ private static function escape($string, $char, $with) /** * Normalizes an array of values. * - * @param array $values - * * @return string[] */ private function normalizeValues(array $values) diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php b/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php index 2bfdb2e8829bd..aa256fc9a98ec 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php @@ -105,8 +105,6 @@ protected function getParent() /** * Sets the parent collection. - * - * @param DumperCollection $parent The parent collection */ protected function setParent(DumperCollection $parent) { diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php b/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php index 5ea622c7d49ca..19800fb331e41 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php @@ -48,8 +48,6 @@ public function setPrefix($prefix) /** * Adds a route in the tree. * - * @param DumperRoute $route The route - * * @return self * * @throws \LogicException diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php index 70c23f647d91d..ea51ab4063047 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php @@ -20,14 +20,8 @@ */ abstract class MatcherDumper implements MatcherDumperInterface { - /** - * @var RouteCollection - */ private $routes; - /** - * @param RouteCollection $routes The RouteCollection to dump - */ public function __construct(RouteCollection $routes) { $this->routes = $routes; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 2855371b84640..48187c0e3f8b2 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -372,8 +372,6 @@ private function groupRoutesByHostRegex(RouteCollection $routes) * Routes order is preserved such that traversing the tree will traverse the * routes in the origin order. * - * @param DumperCollection $collection A collection of routes - * * @return DumperPrefixCollection */ private function buildPrefixTree(DumperCollection $collection) diff --git a/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php b/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php index b5def3d468ab3..a1925c0a4b607 100644 --- a/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php +++ b/src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php @@ -28,8 +28,6 @@ interface RequestMatcherInterface * If the matcher can not find information, it must throw one of the exceptions documented * below. * - * @param Request $request The request to match - * * @return array An array of parameters * * @throws ResourceNotFoundException If no matching resource could be found diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index 62bb74a8d6780..1ef92827dccb9 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -31,21 +31,9 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface const REQUIREMENT_MISMATCH = 1; const ROUTE_MATCH = 2; - /** - * @var RequestContext - */ protected $context; - - /** - * @var array - */ protected $allow = array(); - - /** - * @var RouteCollection - */ protected $routes; - protected $request; protected $expressionLanguage; @@ -54,10 +42,6 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface */ protected $expressionLanguageProviders = array(); - /** - * @param RouteCollection $routes A RouteCollection instance - * @param RequestContext $context The context - */ public function __construct(RouteCollection $routes, RequestContext $context) { $this->routes = $routes; diff --git a/src/Symfony/Component/Routing/RequestContext.php b/src/Symfony/Component/Routing/RequestContext.php index d522189cb0d51..d62a7766ef859 100644 --- a/src/Symfony/Component/Routing/RequestContext.php +++ b/src/Symfony/Component/Routing/RequestContext.php @@ -31,10 +31,6 @@ class RequestContext private $httpPort; private $httpsPort; private $queryString; - - /** - * @var array - */ private $parameters = array(); /** @@ -62,8 +58,6 @@ public function __construct($baseUrl = '', $method = 'GET', $host = 'localhost', /** * Updates the RequestContext information based on a HttpFoundation Request. * - * @param Request $request A Request instance - * * @return $this */ public function fromRequest(Request $request) diff --git a/src/Symfony/Component/Routing/RequestContextAwareInterface.php b/src/Symfony/Component/Routing/RequestContextAwareInterface.php index ebb0ef46ede28..df5b9fcd4712e 100644 --- a/src/Symfony/Component/Routing/RequestContextAwareInterface.php +++ b/src/Symfony/Component/Routing/RequestContextAwareInterface.php @@ -15,8 +15,6 @@ interface RequestContextAwareInterface { /** * Sets the request context. - * - * @param RequestContext $context The context */ public function setContext(RequestContext $context); diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index cc0db84a70851..57a1c29faf638 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -19,51 +19,20 @@ */ class Route implements \Serializable { - /** - * @var string - */ private $path = '/'; - - /** - * @var string - */ private $host = ''; - - /** - * @var string[] - */ private $schemes = array(); - - /** - * @var string[] - */ private $methods = array(); - - /** - * @var array - */ private $defaults = array(); - - /** - * @var array - */ private $requirements = array(); - - /** - * @var array - */ private $options = array(); + private $condition = ''; /** * @var null|CompiledRoute */ private $compiled; - /** - * @var string - */ - private $condition = ''; - /** * Available options: * diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index f8b18084be126..3ae7b4147d134 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -116,8 +116,6 @@ public function remove($name) /** * Adds a route collection at the end of the current set by appending all * routes of the added collection. - * - * @param RouteCollection $collection A RouteCollection instance */ public function addCollection(RouteCollection $collection) { @@ -267,8 +265,6 @@ public function getResources() /** * Adds a resource for this collection. - * - * @param ResourceInterface $resource A resource instance */ public function addResource(ResourceInterface $resource) { diff --git a/src/Symfony/Component/Routing/RouteCompilerInterface.php b/src/Symfony/Component/Routing/RouteCompilerInterface.php index e6f8ee6deacc9..ddfa7ca49244b 100644 --- a/src/Symfony/Component/Routing/RouteCompilerInterface.php +++ b/src/Symfony/Component/Routing/RouteCompilerInterface.php @@ -21,8 +21,6 @@ interface RouteCompilerInterface /** * Compiles the current route instance. * - * @param Route $route A Route instance - * * @return CompiledRoute A CompiledRoute instance * * @throws \LogicException If the Route cannot be compiled because the diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index afec0f5ed5de8..52d7c35080b5a 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -226,8 +226,6 @@ public function getContext() /** * Sets the ConfigCache factory to use. - * - * @param ConfigCacheFactoryInterface $configCacheFactory The factory to use */ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) { diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php index d60b82ce9de20..4a8d6b46394ce 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php @@ -56,12 +56,6 @@ class AclProvider implements AclProviderInterface */ private $permissionGrantingStrategy; - /** - * @param Connection $connection - * @param PermissionGrantingStrategyInterface $permissionGrantingStrategy - * @param array $options - * @param AclCacheInterface $cache - */ public function __construct(Connection $connection, PermissionGrantingStrategyInterface $permissionGrantingStrategy, array $options, AclCacheInterface $cache = null) { $this->cache = $cache; @@ -222,8 +216,6 @@ public function findAcls(array $oids, array $sids = array()) * Constructs the query used for looking up object identities and associated * ACEs, and security identities. * - * @param array $ancestorIds - * * @return string */ protected function getLookupSql(array $ancestorIds) @@ -361,8 +353,6 @@ protected function getFindChildrenSql(ObjectIdentityInterface $oid, $directChild * Constructs the SQL for retrieving the primary key of the given object * identity. * - * @param ObjectIdentityInterface $oid - * * @return string */ protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid) @@ -386,8 +376,6 @@ protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid) /** * Returns the primary key of the passed object identity. * - * @param ObjectIdentityInterface $oid - * * @return int */ final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid) @@ -397,8 +385,6 @@ final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterfac /** * This method is called when an ACL instance is retrieved from the cache. - * - * @param AclInterface $acl */ private function updateAceIdentityMap(AclInterface $acl) { @@ -424,8 +410,6 @@ private function updateAceIdentityMap(AclInterface $acl) * Retrieves all the ids which need to be queried from the database * including the ids of parent ACLs. * - * @param array $batch - * * @return array */ private function getAncestorIds(array $batch) @@ -445,8 +429,6 @@ private function getAncestorIds(array $batch) /** * Does either overwrite the passed ACE, or saves it in the global identity * map to ensure every ACE only gets instantiated once. - * - * @param array &$aces */ private function doUpdateAceIdentityMap(array &$aces) { @@ -463,10 +445,6 @@ private function doUpdateAceIdentityMap(array &$aces) * This method is called for object identities which could not be retrieved * from the cache, and for which thus a database query is required. * - * @param array $batch - * @param array $sids - * @param array $oidLookup - * * @return \SplObjectStorage mapping object identities to ACL instances * * @throws AclNotFoundException @@ -493,10 +471,6 @@ private function lookupObjectIdentities(array $batch, array $sids, array $oidLoo * Keep in mind that changes to this method might severely reduce the * performance of the entire ACL system. * - * @param Statement $stmt - * @param array $oidLookup - * @param array $sids - * * @return \SplObjectStorage * * @throws \RuntimeException diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php index 2555c15044474..d7e87ec3ca660 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php @@ -113,8 +113,6 @@ public function deleteAcl(ObjectIdentityInterface $oid) * Deletes the security identity from the database. * ACL entries have the CASCADE option on their foreign key so they will also get deleted. * - * @param SecurityIdentityInterface $sid - * * @throws \InvalidArgumentException */ public function deleteSecurityIdentity(SecurityIdentityInterface $sid) @@ -552,8 +550,6 @@ protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInh /** * Constructs the SQL for inserting a security identity. * - * @param SecurityIdentityInterface $sid - * * @return string * * @throws \InvalidArgumentException @@ -624,8 +620,6 @@ protected function getSelectClassIdSql($classType) /** * Constructs the SQL for selecting the primary key of a security identity. * - * @param SecurityIdentityInterface $sid - * * @return string * * @throws \InvalidArgumentException @@ -653,8 +647,6 @@ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid /** * Constructs the SQL to delete a security identity. * - * @param SecurityIdentityInterface $sid - * * @return string * * @throws \InvalidArgumentException @@ -742,8 +734,6 @@ protected function getUpdateAccessControlEntrySql($pk, array $sets) /** * Creates the ACL for the passed object identity. - * - * @param ObjectIdentityInterface $oid */ private function createObjectIdentity(ObjectIdentityInterface $oid) { @@ -778,8 +768,6 @@ private function createOrRetrieveClassId($classType) * If the security identity does not yet exist in the database, it will be * created. * - * @param SecurityIdentityInterface $sid - * * @return int */ private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) @@ -825,8 +813,6 @@ private function deleteObjectIdentityRelations($pk) /** * This regenerates the ancestor table which is used for fast read access. - * - * @param AclInterface $acl */ private function regenerateAncestorRelations(AclInterface $acl) { @@ -988,8 +974,6 @@ private function updateOldAceProperty($name, array $changes) /** * Persists the changes which were made to ACEs to the database. - * - * @param \SplObjectStorage $aces */ private function updateAces(\SplObjectStorage $aces) { diff --git a/src/Symfony/Component/Security/Acl/Dbal/Schema.php b/src/Symfony/Component/Security/Acl/Dbal/Schema.php index b98423cbc84e9..a3d219a568d75 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/Schema.php +++ b/src/Symfony/Component/Security/Acl/Dbal/Schema.php @@ -44,8 +44,6 @@ public function __construct(array $options, Connection $connection = null) /** * Merges ACL schema with the given schema. - * - * @param BaseSchema $schema */ public function addToSchema(BaseSchema $schema) { diff --git a/src/Symfony/Component/Security/Acl/Domain/Acl.php b/src/Symfony/Component/Security/Acl/Domain/Acl.php index a759d5f04793b..eee8d4df95281 100644 --- a/src/Symfony/Component/Security/Acl/Domain/Acl.php +++ b/src/Symfony/Component/Security/Acl/Domain/Acl.php @@ -63,11 +63,6 @@ public function __construct($id, ObjectIdentityInterface $objectIdentity, Permis $this->entriesInheriting = $entriesInheriting; } - /** - * Adds a property changed listener. - * - * @param PropertyChangedListener $listener - */ public function addPropertyChangedListener(PropertyChangedListener $listener) { $this->listeners[] = $listener; diff --git a/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php b/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php index 97ec20f210187..3041600c4bca1 100644 --- a/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php +++ b/src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php @@ -27,11 +27,6 @@ class AclCollectionCache private $objectIdentityRetrievalStrategy; private $securityIdentityRetrievalStrategy; - /** - * @param AclProviderInterface $aclProvider - * @param ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy - * @param SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy - */ public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy) { $this->aclProvider = $aclProvider; diff --git a/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php b/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php index a72622f519ee2..4ff22eacce138 100644 --- a/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php +++ b/src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php @@ -203,8 +203,6 @@ private function unserializeAcl($serialized) /** * Returns the key for the object identity. * - * @param ObjectIdentityInterface $oid - * * @return string */ private function getDataKeyByIdentity(ObjectIdentityInterface $oid) diff --git a/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php b/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php index f8a09a6197852..6710a1b922d21 100644 --- a/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php +++ b/src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php @@ -31,11 +31,6 @@ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface private $auditLogger; - /** - * Sets the audit logger. - * - * @param AuditLoggerInterface $auditLogger - */ public function setAuditLogger(AuditLoggerInterface $auditLogger) { $this->auditLogger = $auditLogger; diff --git a/src/Symfony/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategy.php b/src/Symfony/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategy.php index cad892f7dc583..387d432886b93 100644 --- a/src/Symfony/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategy.php +++ b/src/Symfony/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategy.php @@ -28,10 +28,6 @@ class SecurityIdentityRetrievalStrategy implements SecurityIdentityRetrievalStra private $roleHierarchy; private $authenticationTrustResolver; - /** - * @param RoleHierarchyInterface $roleHierarchy - * @param AuthenticationTrustResolver $authenticationTrustResolver - */ public function __construct(RoleHierarchyInterface $roleHierarchy, AuthenticationTrustResolver $authenticationTrustResolver) { $this->roleHierarchy = $roleHierarchy; diff --git a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php index d6b3d3fcfc477..96f3c9fe315a0 100644 --- a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php +++ b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php @@ -48,8 +48,6 @@ public function __construct($username, $class) /** * Creates a user security identity from a UserInterface. * - * @param UserInterface $user - * * @return self */ public static function fromAccount(UserInterface $user) @@ -60,8 +58,6 @@ public static function fromAccount(UserInterface $user) /** * Creates a user security identity from a TokenInterface. * - * @param TokenInterface $token - * * @return self */ public static function fromToken(TokenInterface $token) diff --git a/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php b/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php index 1e7458540be4d..e9ba0ec62cadb 100644 --- a/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php @@ -29,8 +29,6 @@ public function evictFromCacheById($primaryKey); * Removes an ACL from the cache. * * The ACL which is returned, must reference the passed object identity. - * - * @param ObjectIdentityInterface $oid */ public function evictFromCacheByIdentity(ObjectIdentityInterface $oid); @@ -46,16 +44,12 @@ public function getFromCacheById($primaryKey); /** * Retrieves an ACL for the given object identity from the cache. * - * @param ObjectIdentityInterface $oid - * * @return AclInterface */ public function getFromCacheByIdentity(ObjectIdentityInterface $oid); /** * Stores a new ACL in the cache. - * - * @param AclInterface $acl */ public function putInCache(AclInterface $acl); diff --git a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php index ee6d7c406ebd0..be5794aaab1ee 100644 --- a/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php @@ -23,8 +23,6 @@ interface MutableAclProviderInterface extends AclProviderInterface /** * Creates a new ACL for the given object identity. * - * @param ObjectIdentityInterface $oid - * * @return MutableAclInterface * * @throws AclAlreadyExistsException when there already is an ACL for the given @@ -37,8 +35,6 @@ public function createAcl(ObjectIdentityInterface $oid); * * This will automatically trigger a delete for any child ACLs. If you don't * want child ACLs to be deleted, you will have to set their parent ACL to null. - * - * @param ObjectIdentityInterface $oid */ public function deleteAcl(ObjectIdentityInterface $oid); @@ -47,8 +43,6 @@ public function deleteAcl(ObjectIdentityInterface $oid); * access control entries. * * Changes to parent ACLs are not persisted. - * - * @param MutableAclInterface $acl */ public function updateAcl(MutableAclInterface $acl); } diff --git a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php index 6574b49313a28..5c1a6de7bfa3c 100644 --- a/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php @@ -27,8 +27,6 @@ interface ObjectIdentityInterface * Referential Equality: $object1 === $object2 * Example for Object Equality: $object1->getId() === $object2->getId() * - * @param ObjectIdentityInterface $identity - * * @return bool */ public function equals(ObjectIdentityInterface $identity); diff --git a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php index 0a24a543d22ed..8a89e2469443c 100644 --- a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php @@ -23,8 +23,6 @@ interface SecurityIdentityInterface /** * This method is used to compare two security identities in order to * not rely on referential equality. - * - * @param SecurityIdentityInterface $identity */ public function equals(SecurityIdentityInterface $identity); } diff --git a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php index b5fcb752f9e04..cf0f13652bfa5 100644 --- a/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php +++ b/src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php @@ -27,8 +27,6 @@ interface SecurityIdentityRetrievalStrategyInterface * Typically, security identities should be ordered from most specific to * least specific. * - * @param TokenInterface $token - * * @return SecurityIdentityInterface[] An array of SecurityIdentityInterface implementations */ public function getSecurityIdentities(TokenInterface $token); diff --git a/src/Symfony/Component/Security/Acl/Tests/Dbal/MutableAclProviderTest.php b/src/Symfony/Component/Security/Acl/Tests/Dbal/MutableAclProviderTest.php index f119168221959..56aff2ff40095 100644 --- a/src/Symfony/Component/Security/Acl/Tests/Dbal/MutableAclProviderTest.php +++ b/src/Symfony/Component/Security/Acl/Tests/Dbal/MutableAclProviderTest.php @@ -455,9 +455,6 @@ public function testUpdateUserSecurityIdentity() * ), * ) * - * @param AclProvider $provider - * @param array $data - * * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php index 03b48e9eb6dde..6c9c4cbb37efa 100644 --- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php @@ -26,8 +26,6 @@ interface AuthenticationTrustResolverInterface * * If null is passed, the method must return false. * - * @param TokenInterface $token - * * @return bool */ public function isAnonymous(TokenInterface $token = null); @@ -36,8 +34,6 @@ public function isAnonymous(TokenInterface $token = null); * Resolves whether the passed token implementation is authenticated * using remember-me capabilities. * - * @param TokenInterface $token - * * @return bool */ public function isRememberMe(TokenInterface $token = null); @@ -45,8 +41,6 @@ public function isRememberMe(TokenInterface $token = null); /** * Resolves whether the passed token implementation is fully authenticated. * - * @param TokenInterface $token - * * @return bool */ public function isFullFledged(TokenInterface $token = null); diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php index adad258ee0e3d..b4f710fd08b19 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php @@ -27,8 +27,6 @@ interface AuthenticationProviderInterface extends AuthenticationManagerInterface /** * Checks whether this provider supports the given token. * - * @param TokenInterface $token A TokenInterface instance - * * @return bool true if the implementation supports the Token, false otherwise */ public function supports(TokenInterface $token); diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php index d03fcb460fe38..2ed4d8fc9504c 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -34,11 +34,6 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn private $userChecker; private $providerKey; - /** - * @param UserProviderInterface $userProvider An UserProviderInterface instance - * @param UserCheckerInterface $userChecker An UserCheckerInterface instance - * @param string $providerKey The provider key - */ public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, $providerKey) { $this->userProvider = $userProvider; diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php index 28d057ef3b251..3f70b4718b837 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php @@ -108,9 +108,6 @@ public function supports(TokenInterface $token) /** * Retrieves roles from user and appends SwitchUserRole if original token contained one. * - * @param UserInterface $user The user - * @param TokenInterface $token The token - * * @return array The user roles */ private function getRoles(UserInterface $user, TokenInterface $token) @@ -144,9 +141,6 @@ abstract protected function retrieveUser($username, UsernamePasswordToken $token * Does additional checks on the user and token (like validating the * credentials). * - * @param UserInterface $user The retrieved UserInterface instance - * @param UsernamePasswordToken $token The UsernamePasswordToken token to be authenticated - * * @throws AuthenticationException if the credentials could not be validated */ abstract protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token); diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php index c2d860e905a24..58ac22c2ec2bc 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php @@ -51,8 +51,6 @@ public function updateToken($series, $tokenValue, \DateTime $lastUsed); /** * Creates a new token. - * - * @param PersistentTokenInterface $token */ public function createNewToken(PersistentTokenInterface $token); } diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php index 7f449bee1cef2..06f0d0ddfb7a4 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php @@ -31,9 +31,6 @@ class AuthenticatedVoter implements VoterInterface private $authenticationTrustResolver; - /** - * @param AuthenticationTrustResolverInterface $authenticationTrustResolver - */ public function __construct(AuthenticationTrustResolverInterface $authenticationTrustResolver) { $this->authenticationTrustResolver = $authenticationTrustResolver; diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php index 8dd00bfb73e71..7007e1fb22d82 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php @@ -30,11 +30,6 @@ class ExpressionVoter implements VoterInterface private $trustResolver; private $roleHierarchy; - /** - * @param ExpressionLanguage $expressionLanguage - * @param AuthenticationTrustResolverInterface $trustResolver - * @param RoleHierarchyInterface|null $roleHierarchy - */ public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null) { $this->expressionLanguage = $expressionLanguage; diff --git a/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php index 0568d41c9b6d7..bf3ad6f423cd2 100644 --- a/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php +++ b/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -61,8 +61,6 @@ public function getEncoder($user) /** * Creates the actual encoder instance. * - * @param array $config - * * @return PasswordEncoderInterface * * @throws \InvalidArgumentException diff --git a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php index b09604952e0ef..3efc8c6d48bb5 100644 --- a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php @@ -20,14 +20,8 @@ */ class UserPasswordEncoder implements UserPasswordEncoderInterface { - /** - * @var EncoderFactoryInterface - */ private $encoderFactory; - /** - * @param EncoderFactoryInterface $encoderFactory The encoder factory - */ public function __construct(EncoderFactoryInterface $encoderFactory) { $this->encoderFactory = $encoderFactory; diff --git a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php index 9b29f634b4c8a..034ab792ee360 100644 --- a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php +++ b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php @@ -34,11 +34,6 @@ public function getUser() return $this->user; } - /** - * Set the user. - * - * @param UserInterface $user - */ public function setUser(UserInterface $user) { $this->user = $user; diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php index 2b897c251302c..8beb87bdb81bc 100644 --- a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php +++ b/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php @@ -33,11 +33,6 @@ public function getToken() return $this->token; } - /** - * Set the token. - * - * @param TokenInterface $token - */ public function setToken(TokenInterface $token) { $this->token = $token; diff --git a/src/Symfony/Component/Security/Core/User/EquatableInterface.php b/src/Symfony/Component/Security/Core/User/EquatableInterface.php index c6082ce5019aa..4878637454cf4 100644 --- a/src/Symfony/Component/Security/Core/User/EquatableInterface.php +++ b/src/Symfony/Component/Security/Core/User/EquatableInterface.php @@ -29,8 +29,6 @@ interface EquatableInterface * Also implementation should consider that $user instance may implement * the extended user interface `AdvancedUserInterface`. * - * @param UserInterface $user - * * @return bool */ public function isEqualTo(UserInterface $user); diff --git a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php index ff68389c881b1..0af14e6a46999 100644 --- a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -47,8 +47,6 @@ public function __construct(array $users = array()) /** * Adds a new User to the provider. * - * @param UserInterface $user A UserInterface instance - * * @throws \LogicException */ public function createUser(UserInterface $user) diff --git a/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php b/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php index 3dd8d51bf5354..d2174b6f57c39 100644 --- a/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php @@ -22,15 +22,11 @@ interface UserCheckerInterface { /** * Checks the user account before authentication. - * - * @param UserInterface $user a UserInterface instance */ public function checkPreAuth(UserInterface $user); /** * Checks the user account after authentication. - * - * @param UserInterface $user a UserInterface instance */ public function checkPostAuth(UserInterface $user); } diff --git a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php b/src/Symfony/Component/Security/Core/User/UserProviderInterface.php index 03f38f08848ba..be1cd8a34a9a7 100644 --- a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserProviderInterface.php @@ -57,8 +57,6 @@ public function loadUserByUsername($username); * object can just be merged into some internal array of users / identity * map. * - * @param UserInterface $user - * * @return UserInterface * * @throws UnsupportedUserException if the user is not supported diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php index e1295029acfe7..ec8cc75b08608 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php @@ -24,23 +24,9 @@ */ class CsrfTokenManager implements CsrfTokenManagerInterface { - /** - * @var TokenGeneratorInterface - */ private $generator; - - /** - * @var TokenStorageInterface - */ private $storage; - /** - * Creates a new CSRF provider using PHP's native session storage. - * - * @param TokenGeneratorInterface|null $generator The token generator - * @param TokenStorageInterface|null $storage The storage for storing - * generated CSRF tokens - */ public function __construct(TokenGeneratorInterface $generator = null, TokenStorageInterface $storage = null) { $this->generator = $generator ?: new UriSafeTokenGenerator(); diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php index 5936b6440e4d0..a29c04fa7ab6f 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php @@ -59,8 +59,6 @@ public function removeToken($tokenId); /** * Returns whether the given CSRF token is valid. * - * @param CsrfToken $token A CSRF token - * * @return bool Returns true if the token is valid, false otherwise */ public function isTokenValid(CsrfToken $token); diff --git a/src/Symfony/Component/Security/Http/AccessMapInterface.php b/src/Symfony/Component/Security/Http/AccessMapInterface.php index 7d15feeb0c653..6b1e5c9383aff 100644 --- a/src/Symfony/Component/Security/Http/AccessMapInterface.php +++ b/src/Symfony/Component/Security/Http/AccessMapInterface.php @@ -25,8 +25,6 @@ interface AccessMapInterface /** * Returns security attributes and required channel for the supplied request. * - * @param Request $request The current request - * * @return array A tuple of security attributes and the required channel */ public function getPatterns(Request $request); diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php index e2d375e7540e7..de7a1ca5eb322 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php @@ -31,9 +31,6 @@ interface AuthenticationFailureHandlerInterface * called by authentication listeners inheriting from * AbstractAuthenticationListener. * - * @param Request $request - * @param AuthenticationException $exception - * * @return Response The response to return, never null */ public function onAuthenticationFailure(Request $request, AuthenticationException $exception); diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php index d0b3cb6f216ea..9ef863b1349ae 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php @@ -31,9 +31,6 @@ interface AuthenticationSuccessHandlerInterface * is called by authentication listeners inheriting from * AbstractAuthenticationListener. * - * @param Request $request - * @param TokenInterface $token - * * @return Response never null */ public function onAuthenticationSuccess(Request $request, TokenInterface $token); diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php index 0012d36a1fa00..32ea2b1c304bd 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php @@ -23,14 +23,8 @@ */ class AuthenticationUtils { - /** - * @var RequestStack - */ private $requestStack; - /** - * @param RequestStack $requestStack - */ public function __construct(RequestStack $requestStack) { $this->requestStack = $requestStack; diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php index 08b5faee39827..957101b1533ec 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -65,11 +65,6 @@ public function getOptions() return $this->options; } - /** - * Sets the options. - * - * @param array $options An array of options - */ public function setOptions(array $options) { $this->options = array_merge($this->defaultOptions, $options); diff --git a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 5b907f682c38e..0099e792f8f2c 100644 --- a/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -63,11 +63,6 @@ public function getOptions() return $this->options; } - /** - * Sets the options. - * - * @param array $options An array of options - */ public function setOptions(array $options) { $this->options = array_merge($this->defaultOptions, $options); @@ -96,8 +91,6 @@ public function setProviderKey($providerKey) /** * Builds the target URL according to the defined options. * - * @param Request $request - * * @return string */ protected function determineTargetUrl(Request $request) diff --git a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php index a5ea9db6313bd..aea901181f601 100644 --- a/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php @@ -26,9 +26,6 @@ interface AccessDeniedHandlerInterface /** * Handles an access denied failure. * - * @param Request $request - * @param AccessDeniedException $accessDeniedException - * * @return Response may return null */ public function handle(Request $request, AccessDeniedException $accessDeniedException); diff --git a/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php b/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php index 17c6d9e8f78e7..d46b1d522ebf4 100644 --- a/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php +++ b/src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php @@ -23,10 +23,6 @@ class InteractiveLoginEvent extends Event private $request; private $authenticationToken; - /** - * @param Request $request A Request instance - * @param TokenInterface $authenticationToken A TokenInterface instance - */ public function __construct(Request $request, TokenInterface $authenticationToken) { $this->request = $request; diff --git a/src/Symfony/Component/Security/Http/Firewall.php b/src/Symfony/Component/Security/Http/Firewall.php index 12fb2b5452787..62b0071212e54 100644 --- a/src/Symfony/Component/Security/Http/Firewall.php +++ b/src/Symfony/Component/Security/Http/Firewall.php @@ -33,10 +33,6 @@ class Firewall implements EventSubscriberInterface private $dispatcher; private $exceptionListeners; - /** - * @param FirewallMapInterface $map A FirewallMapInterface instance - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance - */ public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher) { $this->map = $map; @@ -44,11 +40,6 @@ public function __construct(FirewallMapInterface $map, EventDispatcherInterface $this->exceptionListeners = new \SplObjectStorage(); } - /** - * Handles security. - * - * @param GetResponseEvent $event An GetResponseEvent instance - */ public function onKernelRequest(GetResponseEvent $event) { if (!$event->isMasterRequest()) { diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php index 1056879e348f7..71a9311a93e3f 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -108,8 +108,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM /** * Sets the RememberMeServices implementation to use. - * - * @param RememberMeServicesInterface $rememberMeServices */ public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) { @@ -119,8 +117,6 @@ public function setRememberMeServices(RememberMeServicesInterface $rememberMeSer /** * Handles form based authentication. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws \RuntimeException * @throws SessionUnavailableException */ @@ -168,8 +164,6 @@ final public function handle(GetResponseEvent $event) * but a subclass could change this to only authenticate requests where a * certain parameters is present. * - * @param Request $request - * * @return bool */ protected function requiresAuthentication(Request $request) @@ -180,8 +174,6 @@ protected function requiresAuthentication(Request $request) /** * Performs authentication. * - * @param Request $request A Request instance - * * @return TokenInterface|Response|null The authenticated token, null if full authentication is not possible, or a Response * * @throws AuthenticationException if the authentication fails diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index b793310d9b336..0065fe8237c3e 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -49,8 +49,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM /** * Handles pre-authentication. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ final public function handle(GetResponseEvent $event) { @@ -97,8 +95,6 @@ final public function handle(GetResponseEvent $event) /** * Clears a PreAuthenticatedToken for this provider (if present). - * - * @param AuthenticationException $exception */ private function clearToken(AuthenticationException $exception) { @@ -115,8 +111,6 @@ private function clearToken(AuthenticationException $exception) /** * Gets the user and credentials from the Request. * - * @param Request $request A Request instance - * * @return array An array composed of the user and the credentials */ abstract protected function getPreAuthenticatedData(Request $request); diff --git a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php index c234317e77985..ae09b514fa6e1 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php @@ -42,8 +42,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionM /** * Handles access authorization. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws AccessDeniedException * @throws AuthenticationCredentialsNotFoundException */ diff --git a/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php index f7feee8f8e030..e5183cc201272 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php @@ -41,8 +41,6 @@ public function __construct(TokenStorageInterface $tokenStorage, $key, LoggerInt /** * Handles anonymous authentication. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { diff --git a/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php index 5bbf13d9b8434..1ddc41643448e 100644 --- a/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php @@ -49,8 +49,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM /** * Handles basic authentication. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { diff --git a/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php b/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php index 637a7f5492e5f..d0fff21574354 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ChannelListener.php @@ -37,8 +37,6 @@ public function __construct(AccessMapInterface $map, AuthenticationEntryPointInt /** * Handles channel management. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index 6a9ba672b21e1..b446f57e49852 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -60,8 +60,6 @@ public function __construct(TokenStorageInterface $tokenStorage, array $userProv /** * Reads the Security Token from the session. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { @@ -100,8 +98,6 @@ public function handle(GetResponseEvent $event) /** * Writes the security token into the session. - * - * @param FilterResponseEvent $event A FilterResponseEvent instance */ public function onKernelResponse(FilterResponseEvent $event) { @@ -135,8 +131,6 @@ public function onKernelResponse(FilterResponseEvent $event) /** * Refreshes the user by reloading it from the user provider. * - * @param TokenInterface $token - * * @return TokenInterface|null * * @throws \RuntimeException diff --git a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php index d89111f6aeabb..070d61a6740e4 100644 --- a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php @@ -54,8 +54,6 @@ public function __construct(TokenStorageInterface $tokenStorage, UserProviderInt /** * Handles digest authentication. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws AuthenticationServiceException */ public function handle(GetResponseEvent $event) diff --git a/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php b/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php index 4e8066b7e198b..a6029bb89cdad 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php @@ -64,8 +64,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationT /** * Registers a onKernelException listener to take care of security exceptions. - * - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance */ public function register(EventDispatcherInterface $dispatcher) { @@ -74,8 +72,6 @@ public function register(EventDispatcherInterface $dispatcher) /** * Unregisters the dispatcher. - * - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance */ public function unregister(EventDispatcherInterface $dispatcher) { @@ -84,8 +80,6 @@ public function unregister(EventDispatcherInterface $dispatcher) /** * Handles security related exceptions. - * - * @param GetResponseForExceptionEvent $event An GetResponseForExceptionEvent instance */ public function onKernelException(GetResponseForExceptionEvent $event) { @@ -170,9 +164,6 @@ private function handleLogoutException(LogoutException $exception) } /** - * @param Request $request - * @param AuthenticationException $authException - * * @return Response * * @throws AuthenticationException @@ -203,9 +194,6 @@ private function startAuthentication(Request $request, AuthenticationException $ return $this->authenticationEntryPoint->start($request, $authException); } - /** - * @param Request $request - */ protected function setTargetPath(Request $request) { // session isn't required when using HTTP basic authentication mechanism for example diff --git a/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php b/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php index 0fc8d11c3aee5..d881badd01f1c 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php +++ b/src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php @@ -20,10 +20,5 @@ */ interface ListenerInterface { - /** - * This interface must be implemented by firewall listeners. - * - * @param GetResponseEvent $event - */ public function handle(GetResponseEvent $event); } diff --git a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index 5b5ccbff1009d..907d298b4ab32 100644 --- a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -66,11 +66,6 @@ public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $http $this->handlers = array(); } - /** - * Adds a logout handler. - * - * @param LogoutHandlerInterface $handler - */ public function addHandler(LogoutHandlerInterface $handler) { $this->handlers[] = $handler; @@ -82,8 +77,6 @@ public function addHandler(LogoutHandlerInterface $handler) * If a CsrfTokenManagerInterface instance is available, it will be used to * validate the request. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws LogoutException if the CSRF token is invalid * @throws \RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response */ @@ -127,8 +120,6 @@ public function handle(GetResponseEvent $event) * but a subclass could change this to logout requests where * certain parameters is present. * - * @param Request $request - * * @return bool */ protected function requiresLogout(Request $request) diff --git a/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php b/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php index 1802dd878738c..fe670f3de1f38 100644 --- a/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php @@ -60,8 +60,6 @@ public function __construct(TokenStorageInterface $tokenStorage, RememberMeServi /** * Handles remember-me cookie based authentication. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { diff --git a/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php index 59385e17e7edd..dd51869405547 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php @@ -63,8 +63,6 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM /** * Handles basic authentication. - * - * @param GetResponseEvent $event A GetResponseEvent instance */ public function handle(GetResponseEvent $event) { diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 606392de8a16c..f5113aa0c90ad 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -68,8 +68,6 @@ public function __construct(TokenStorageInterface $tokenStorage, UserProviderInt /** * Handles the switch to another user. * - * @param GetResponseEvent $event A GetResponseEvent instance - * * @throws \LogicException if switching to a user failed */ public function handle(GetResponseEvent $event) @@ -101,8 +99,6 @@ public function handle(GetResponseEvent $event) /** * Attempts to switch to another user. * - * @param Request $request A Request instance - * * @return TokenInterface|null The new TokenInterface if successfully switched, null otherwise * * @throws \LogicException @@ -150,8 +146,6 @@ private function attemptSwitchUser(Request $request) /** * Attempts to exit from an already switched user. * - * @param Request $request A Request instance - * * @return TokenInterface The original TokenInterface instance * * @throws AuthenticationCredentialsNotFoundException @@ -174,8 +168,6 @@ private function attemptExitUser(Request $request) /** * Gets the original Token from a switched one. * - * @param TokenInterface $token A switched TokenInterface instance - * * @return TokenInterface|false The original TokenInterface instance, false if the current TokenInterface is not switched */ private function getOriginalToken(TokenInterface $token) diff --git a/src/Symfony/Component/Security/Http/FirewallMap.php b/src/Symfony/Component/Security/Http/FirewallMap.php index 1bb73bd2932b4..e767d123cb03e 100644 --- a/src/Symfony/Component/Security/Http/FirewallMap.php +++ b/src/Symfony/Component/Security/Http/FirewallMap.php @@ -25,11 +25,6 @@ class FirewallMap implements FirewallMapInterface { private $map = array(); - /** - * @param RequestMatcherInterface $requestMatcher - * @param array $listeners - * @param ExceptionListener $exceptionListener - */ public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = array(), ExceptionListener $exceptionListener = null) { $this->map[] = array($requestMatcher, $listeners, $exceptionListener); diff --git a/src/Symfony/Component/Security/Http/FirewallMapInterface.php b/src/Symfony/Component/Security/Http/FirewallMapInterface.php index 1627ab5956d0d..ebdd498123a1c 100644 --- a/src/Symfony/Component/Security/Http/FirewallMapInterface.php +++ b/src/Symfony/Component/Security/Http/FirewallMapInterface.php @@ -30,8 +30,6 @@ interface FirewallMapInterface * If there is no exception listener, the second element of the outer array * must be null. * - * @param Request $request - * * @return array of the format array(array(AuthenticationListener), ExceptionListener) */ public function getListeners(Request $request); diff --git a/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php b/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php index a78b25f0c34ec..b96bc43a78d5d 100644 --- a/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php +++ b/src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php @@ -34,10 +34,6 @@ public function __construct(array $cookies) /** * Implementation for the LogoutHandlerInterface. Deletes all requested cookies. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ public function logout(Request $request, Response $response, TokenInterface $token) { diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php b/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php index 5e1cea81df991..363bc4abe1630 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php @@ -26,10 +26,6 @@ interface LogoutHandlerInterface * This method is called by the LogoutListener when a user has requested * to be logged out. Usually, you would unset session variables, or remove * cookies, etc. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ public function logout(Request $request, Response $response, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php index 4246fa4414543..c320ad655f278 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php @@ -30,8 +30,6 @@ interface LogoutSuccessHandlerInterface /** * Creates a Response object to send upon a successful logout. * - * @param Request $request - * * @return Response never null */ public function onLogoutSuccess(Request $request); diff --git a/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php b/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php index e036c5fa6b62f..7f362de9d7a2b 100644 --- a/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php +++ b/src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php @@ -24,10 +24,6 @@ class SessionLogoutHandler implements LogoutHandlerInterface { /** * Invalidate the current session. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ public function logout(Request $request, Response $response, TokenInterface $token) { diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php index dd37517548faa..c895342d3af2b 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -93,8 +93,6 @@ public function getKey() * Implementation of RememberMeServicesInterface. Detects whether a remember-me * cookie was set, decodes it, and hands it to subclasses for further processing. * - * @param Request $request - * * @return TokenInterface|null * * @throws CookieTheftException @@ -147,10 +145,6 @@ final public function autoLogin(Request $request) /** * Implementation for LogoutHandlerInterface. Deletes the cookie. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ public function logout(Request $request, Response $response, TokenInterface $token) { @@ -160,8 +154,6 @@ public function logout(Request $request, Response $response, TokenInterface $tok /** * Implementation for RememberMeServicesInterface. Deletes the cookie when * an attempted authentication fails. - * - * @param Request $request */ final public function loginFail(Request $request) { @@ -172,10 +164,6 @@ final public function loginFail(Request $request) /** * Implementation for RememberMeServicesInterface. This is called when an * authentication is successful. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token The token that resulted in a successful authentication */ final public function loginSuccess(Request $request, Response $response, TokenInterface $token) { @@ -215,16 +203,10 @@ final public function loginSuccess(Request $request, Response $response, TokenIn * Subclasses should validate the cookie and do any additional processing * that is required. This is called from autoLogin(). * - * @param array $cookieParts - * @param Request $request - * * @return UserInterface */ abstract protected function processAutoLoginCookie(array $cookieParts, Request $request); - /** - * @param Request $request - */ protected function onLoginFail(Request $request) { } @@ -233,10 +215,6 @@ protected function onLoginFail(Request $request) * This is called after a user has been logged in successfully, and has * requested remember-me capabilities. The implementation usually sets a * cookie and possibly stores a persistent record of it. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ abstract protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token); @@ -266,8 +244,6 @@ protected function decodeCookie($rawCookie) /** * Encodes the cookie parts. * - * @param array $cookieParts - * * @return string * * @throws \InvalidArgumentException When $cookieParts contain the cookie delimiter. Extending class should either remove or escape it. @@ -285,8 +261,6 @@ protected function encodeCookie(array $cookieParts) /** * Deletes the remember-me cookie. - * - * @param Request $request */ protected function cancelCookie(Request $request) { @@ -300,8 +274,6 @@ protected function cancelCookie(Request $request) /** * Checks whether remember-me capabilities were requested. * - * @param Request $request - * * @return bool */ protected function isRememberMeRequested(Request $request) diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php index 5b97d7302f518..8c56d6a80810b 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php @@ -50,11 +50,6 @@ public function __construct(array $userProviders, $key, $providerKey, array $opt $this->secureRandom = $secureRandom; } - /** - * Sets the token provider. - * - * @param TokenProviderInterface $tokenProvider - */ public function setTokenProvider(TokenProviderInterface $tokenProvider) { $this->tokenProvider = $tokenProvider; diff --git a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php index 5750a8c9d4804..e2f12d711dc00 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php +++ b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php @@ -48,8 +48,6 @@ interface RememberMeServicesInterface * make sure to throw an AuthenticationException as this will consequentially * result in a call to loginFail() and therefore an invalidation of the cookie. * - * @param Request $request - * * @return TokenInterface */ public function autoLogin(Request $request); @@ -59,8 +57,6 @@ public function autoLogin(Request $request); * credentials supplied by the user were missing or otherwise invalid. * * This method needs to take care of invalidating the cookie. - * - * @param Request $request */ public function loginFail(Request $request); @@ -74,10 +70,6 @@ public function loginFail(Request $request); * Instead, implementations should typically look for a request parameter * (such as a HTTP POST parameter) that indicates the browser has explicitly * requested for the authentication to be remembered. - * - * @param Request $request - * @param Response $response - * @param TokenInterface $token */ public function loginSuccess(Request $request, Response $response, TokenInterface $token); } diff --git a/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php b/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php index 4149fb6d85d85..e8c4424ac79e5 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php +++ b/src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php @@ -22,9 +22,6 @@ */ class ResponseListener implements EventSubscriberInterface { - /** - * @param FilterResponseEvent $event - */ public function onKernelResponse(FilterResponseEvent $event) { if (!$event->isMasterRequest()) { diff --git a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php index dd0c38184e6cd..9b05f151340ee 100644 --- a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php +++ b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php @@ -29,9 +29,6 @@ interface SessionAuthenticationStrategyInterface * * This method is called before the TokenStorage is populated with a * Token, and only by classes inheriting from AbstractAuthenticationListener. - * - * @param Request $request - * @param TokenInterface $token */ public function onAuthentication(Request $request, TokenInterface $token); } diff --git a/src/Symfony/Component/Serializer/Annotation/Groups.php b/src/Symfony/Component/Serializer/Annotation/Groups.php index 519837a55b73e..d0339552a74f4 100644 --- a/src/Symfony/Component/Serializer/Annotation/Groups.php +++ b/src/Symfony/Component/Serializer/Annotation/Groups.php @@ -29,8 +29,6 @@ class Groups private $groups; /** - * @param array $data - * * @throws InvalidArgumentException */ public function __construct(array $data) diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index a7a11caf2e7f0..4da7d288148d7 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -125,8 +125,6 @@ public function supportsDecoding($format) /** * Merges the default options of the Json Decoder with the passed context. * - * @param array $context - * * @return array */ private function resolveContext(array $context) diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 3a6b2fdbbb1a9..d68929c3d9207 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -73,8 +73,6 @@ public function supportsEncoding($format) /** * Merge default json encode options with context. * - * @param array $context - * * @return array */ private function resolveContext(array $context = array()) diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index b363401f235df..19159f1d534fd 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -511,8 +511,6 @@ private function selectNodeType(\DOMNode $node, $val) /** * Get real XML root node name, taking serializer options into account. * - * @param array $context - * * @return string */ private function resolveXmlRootName(array $context = array()) diff --git a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php index 7a1d3db94a809..600e17be4f976 100644 --- a/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php +++ b/src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php @@ -19,8 +19,6 @@ class AttributeMetadata implements AttributeMetadataInterface { /** - * @var string - * * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getName()} instead. @@ -28,8 +26,6 @@ class AttributeMetadata implements AttributeMetadataInterface public $name; /** - * @var array - * * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getGroups()} instead. diff --git a/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php b/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php index 6bb30274e3428..b70bdd096609a 100644 --- a/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php +++ b/src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php @@ -45,8 +45,6 @@ public function getGroups(); /** * Merges an {@see AttributeMetadataInterface} with in the current one. - * - * @param AttributeMetadataInterface $attributeMetadata */ public function merge(AttributeMetadataInterface $attributeMetadata); } diff --git a/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php b/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php index c00981b64f069..3811e56548a0c 100644 --- a/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php +++ b/src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php @@ -33,8 +33,6 @@ public function getName(); /** * Adds an {@link AttributeMetadataInterface}. - * - * @param AttributeMetadataInterface $attributeMetadata */ public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata); @@ -47,8 +45,6 @@ public function getAttributesMetadata(); /** * Merges a {@link ClassMetadataInterface} in the current one. - * - * @param ClassMetadataInterface $classMetadata */ public function merge(ClassMetadataInterface $classMetadata); diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php index 601342ee61535..2babf7e27d442 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php @@ -23,25 +23,10 @@ */ class ClassMetadataFactory implements ClassMetadataFactoryInterface { - /** - * @var LoaderInterface - */ private $loader; - - /** - * @var Cache - */ private $cache; - - /** - * @var array - */ private $loadedClasses; - /** - * @param LoaderInterface $loader - * @param Cache|null $cache - */ public function __construct(LoaderInterface $loader, Cache $cache = null) { $this->loader = $loader; diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 6c563b44e9f33..b6fbd36f01bab 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -24,14 +24,8 @@ */ class AnnotationLoader implements LoaderInterface { - /** - * @var Reader - */ private $reader; - /** - * @param Reader $reader - */ public function __construct(Reader $reader) { $this->reader = $reader; diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php b/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php index ebf84b6a96130..1310a71698805 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php @@ -21,10 +21,6 @@ interface LoaderInterface { /** - * Load class metadata. - * - * @param ClassMetadataInterface $classMetadata A metadata - * * @return bool */ public function loadClassMetadata(ClassMetadataInterface $classMetadata); diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 85b9c83d5247c..d3a72caefb4cc 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -68,9 +68,6 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N /** * Sets the {@link ClassMetadataFactoryInterface} to use. - * - * @param ClassMetadataFactoryInterface|null $classMetadataFactory - * @param NameConverterInterface|null $nameConverter */ public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null) { @@ -139,8 +136,6 @@ public function setCallbacks(array $callbacks) /** * Set ignored attributes for normalization and denormalization. * - * @param array $ignoredAttributes - * * @return self */ public function setIgnoredAttributes(array $ignoredAttributes) diff --git a/src/Symfony/Component/Serializer/SerializerAwareInterface.php b/src/Symfony/Component/Serializer/SerializerAwareInterface.php index dd0a62e7fa887..13dfb392e9688 100644 --- a/src/Symfony/Component/Serializer/SerializerAwareInterface.php +++ b/src/Symfony/Component/Serializer/SerializerAwareInterface.php @@ -20,8 +20,6 @@ interface SerializerAwareInterface { /** * Sets the owning Serializer object. - * - * @param SerializerInterface $serializer */ public function setSerializer(SerializerInterface $serializer); } diff --git a/src/Symfony/Component/Templating/DelegatingEngine.php b/src/Symfony/Component/Templating/DelegatingEngine.php index bef82af7bd21b..b47a0f0620369 100644 --- a/src/Symfony/Component/Templating/DelegatingEngine.php +++ b/src/Symfony/Component/Templating/DelegatingEngine.php @@ -62,11 +62,6 @@ public function exists($name) return $this->getEngine($name)->exists($name); } - /** - * Adds an engine. - * - * @param EngineInterface $engine An EngineInterface instance - */ public function addEngine(EngineInterface $engine) { $this->engines[] = $engine; diff --git a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php index 689b17b401d58..be161a40e364e 100644 --- a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php @@ -47,11 +47,6 @@ public function __construct(PackageInterface $defaultPackage, array $namedPackag } } - /** - * Sets the default package. - * - * @param PackageInterface $defaultPackage The default package - */ public function setDefaultPackage(PackageInterface $defaultPackage) { $this->defaultPackage = $defaultPackage; diff --git a/src/Symfony/Component/Templating/Loader/CacheLoader.php b/src/Symfony/Component/Templating/Loader/CacheLoader.php index 9ee24f1daaff8..d23c6b5837927 100644 --- a/src/Symfony/Component/Templating/Loader/CacheLoader.php +++ b/src/Symfony/Component/Templating/Loader/CacheLoader.php @@ -42,8 +42,6 @@ public function __construct(LoaderInterface $loader, $dir) /** * Loads a template. * - * @param TemplateReferenceInterface $template A template - * * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise */ public function load(TemplateReferenceInterface $template) diff --git a/src/Symfony/Component/Templating/Loader/ChainLoader.php b/src/Symfony/Component/Templating/Loader/ChainLoader.php index ea9aac5f77174..d66139e0b3ffa 100644 --- a/src/Symfony/Component/Templating/Loader/ChainLoader.php +++ b/src/Symfony/Component/Templating/Loader/ChainLoader.php @@ -35,8 +35,6 @@ public function __construct(array $loaders = array()) /** * Adds a loader instance. - * - * @param LoaderInterface $loader A Loader instance */ public function addLoader(LoaderInterface $loader) { @@ -46,8 +44,6 @@ public function addLoader(LoaderInterface $loader) /** * Loads a template. * - * @param TemplateReferenceInterface $template A template - * * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise */ public function load(TemplateReferenceInterface $template) diff --git a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php index d6605b1c64444..139a9532323b3 100644 --- a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php +++ b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php @@ -35,8 +35,6 @@ public function __construct($templatePathPatterns) /** * Loads a template. * - * @param TemplateReferenceInterface $template A template - * * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise */ public function load(TemplateReferenceInterface $template) diff --git a/src/Symfony/Component/Templating/Loader/Loader.php b/src/Symfony/Component/Templating/Loader/Loader.php index b35eccfb099cc..e50106f03b007 100644 --- a/src/Symfony/Component/Templating/Loader/Loader.php +++ b/src/Symfony/Component/Templating/Loader/Loader.php @@ -33,8 +33,6 @@ abstract class Loader implements LoaderInterface /** * Sets the debug logger to use for this loader. - * - * @param LoggerInterface $logger A logger instance */ public function setLogger(LoggerInterface $logger) { diff --git a/src/Symfony/Component/Templating/Loader/LoaderInterface.php b/src/Symfony/Component/Templating/Loader/LoaderInterface.php index 0795dcbd19392..d2897e5c20340 100644 --- a/src/Symfony/Component/Templating/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Templating/Loader/LoaderInterface.php @@ -24,8 +24,6 @@ interface LoaderInterface /** * Loads a template. * - * @param TemplateReferenceInterface $template A template - * * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise */ public function load(TemplateReferenceInterface $template); diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index c0ca6bb9b47aa..271ee817147ad 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -21,19 +21,8 @@ */ abstract class AbstractOperation implements OperationInterface { - /** - * @var MessageCatalogueInterface - */ protected $source; - - /** - * @var MessageCatalogueInterface - */ protected $target; - - /** - * @var MessageCatalogue - */ protected $result; /** @@ -47,9 +36,6 @@ abstract class AbstractOperation implements OperationInterface protected $messages; /** - * @param MessageCatalogueInterface $source - * @param MessageCatalogueInterface $target - * * @throws \LogicException */ public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) diff --git a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php index c3c140f4a94f9..9061efd16cc0b 100644 --- a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php +++ b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php @@ -22,14 +22,8 @@ */ class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface { - /** - * @var DataCollectorTranslator - */ private $translator; - /** - * @param DataCollectorTranslator $translator - */ public function __construct(DataCollectorTranslator $translator) { $this->translator = $translator; diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/Symfony/Component/Translation/DataCollectorTranslator.php index 0243d8aa21596..44b9afd655af6 100644 --- a/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -25,9 +25,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter */ private $translator; - /** - * @var array - */ private $messages = array(); /** diff --git a/src/Symfony/Component/Translation/Loader/PoFileLoader.php b/src/Symfony/Component/Translation/Loader/PoFileLoader.php index c2d0ce2b99a34..62595f2a87459 100644 --- a/src/Symfony/Component/Translation/Loader/PoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PoFileLoader.php @@ -160,9 +160,6 @@ private function parse($resource) * * A .po file could contain by error missing plural indexes. We need to * fix these before saving them. - * - * @param array $messages - * @param array $item */ private function addMessage(array &$messages, array $item) { diff --git a/src/Symfony/Component/Translation/MessageCatalogueInterface.php b/src/Symfony/Component/Translation/MessageCatalogueInterface.php index 40054f05c4c18..4dad27fbf6aa3 100644 --- a/src/Symfony/Component/Translation/MessageCatalogueInterface.php +++ b/src/Symfony/Component/Translation/MessageCatalogueInterface.php @@ -104,8 +104,6 @@ public function add($messages, $domain = 'messages'); * Merges translations from the given Catalogue into the current one. * * The two catalogues must have the same locale. - * - * @param self $catalogue */ public function addCatalogue(MessageCatalogueInterface $catalogue); @@ -114,8 +112,6 @@ public function addCatalogue(MessageCatalogueInterface $catalogue); * only when the translation does not exist. * * This is used to provide default translations when they do not exist for the current locale. - * - * @param self $catalogue */ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); @@ -135,8 +131,6 @@ public function getResources(); /** * Adds a resource for this collection. - * - * @param ResourceInterface $resource A resource instance */ public function addResource(ResourceInterface $resource); } diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 2ec83f4fd4929..73274b967dc44 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -83,11 +83,6 @@ public function __construct($locale, MessageSelector $selector = null, $cacheDir $this->debug = $debug; } - /** - * Sets the ConfigCache factory to use. - * - * @param ConfigCacheFactoryInterface $configCacheFactory - */ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) { $this->configCacheFactory = $configCacheFactory; diff --git a/src/Symfony/Component/Translation/Writer/TranslationWriter.php b/src/Symfony/Component/Translation/Writer/TranslationWriter.php index 2f5eaa1edf0d6..d34a93f282bb7 100644 --- a/src/Symfony/Component/Translation/Writer/TranslationWriter.php +++ b/src/Symfony/Component/Translation/Writer/TranslationWriter.php @@ -21,11 +21,6 @@ */ class TranslationWriter { - /** - * Dumpers used for export. - * - * @var array - */ private $dumpers = array(); /** diff --git a/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php b/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php index 5e216275b4933..b647645621899 100644 --- a/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php +++ b/src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php @@ -21,8 +21,6 @@ interface ConstraintValidatorFactoryInterface * Given a Constraint, this returns the ConstraintValidatorInterface * object that should be used to verify its validity. * - * @param Constraint $constraint The source constraint - * * @return ConstraintValidatorInterface */ public function getInstance(Constraint $constraint); diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php index 516004a7c169b..804b6a8ccfaeb 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -18,54 +18,15 @@ */ class ConstraintViolation implements ConstraintViolationInterface { - /** - * @var string - */ private $message; - - /** - * @var string - */ private $messageTemplate; - - /** - * @var array - */ private $parameters; - - /** - * @var int|null - */ private $plural; - - /** - * @var mixed - */ private $root; - - /** - * @var string - */ private $propertyPath; - - /** - * @var mixed - */ private $invalidValue; - - /** - * @var Constraint|null - */ private $constraint; - - /** - * @var mixed - */ private $code; - - /** - * @var mixed - */ private $cause; /** diff --git a/src/Symfony/Component/Validator/ConstraintViolationListInterface.php b/src/Symfony/Component/Validator/ConstraintViolationListInterface.php index bc7dc9ee46247..0489ab500a1dc 100644 --- a/src/Symfony/Component/Validator/ConstraintViolationListInterface.php +++ b/src/Symfony/Component/Validator/ConstraintViolationListInterface.php @@ -20,15 +20,11 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar { /** * Adds a constraint violation to this list. - * - * @param ConstraintViolationInterface $violation The violation to add */ public function add(ConstraintViolationInterface $violation); /** * Merges an existing violation list into this list. - * - * @param ConstraintViolationListInterface $otherList The list to merge */ public function addAll(ConstraintViolationListInterface $otherList); diff --git a/src/Symfony/Component/Validator/Constraints/IbanValidator.php b/src/Symfony/Component/Validator/Constraints/IbanValidator.php index 20300b00abf77..329d630a5aaef 100644 --- a/src/Symfony/Component/Validator/Constraints/IbanValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IbanValidator.php @@ -35,8 +35,6 @@ class IbanValidator extends ConstraintValidator * included within it, a bank identifier with a fixed position and a fixed length per country * * @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf - * - * @var array */ private static $formats = array( 'AD' => 'AD\d{2}\d{4}\d{4}[\dA-Z]{12}', // Andorra diff --git a/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php b/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php index e8047c60ca8bc..f770f46154077 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php @@ -38,8 +38,6 @@ public function read($class); /** * Stores a class metadata in the cache. - * - * @param ClassMetadata $metadata A Class Metadata */ public function write(ClassMetadata $metadata); } diff --git a/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php b/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php index 6dd5447fedc88..36f1febc5ac67 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php @@ -23,21 +23,11 @@ final class DoctrineCache implements CacheInterface { private $cache; - /** - * Creates a new Doctrine cache. - * - * @param Cache $cache The cache to adapt - */ public function __construct(Cache $cache) { $this->cache = $cache; } - /** - * Sets the cache to adapt. - * - * @param Cache $cache The cache to adapt - */ public function setCache(Cache $cache) { $this->cache = $cache; diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 5b82cf6d5d9d6..abaefcab299c5 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -376,8 +376,6 @@ public function addGetterMethodConstraints($property, $method, array $constraint /** * Merges the constraints of the given metadata into this object. - * - * @param ClassMetadata $source The source metadata */ public function mergeConstraints(ClassMetadata $source) { @@ -590,11 +588,6 @@ public function getCascadingStrategy() return CascadingStrategy::NONE; } - /** - * Adds a property metadata. - * - * @param PropertyMetadataInterface $metadata - */ private function addPropertyMetadata(PropertyMetadataInterface $metadata) { $property = $metadata->getPropertyName(); diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 97915ac71307f..ae69d9b66dfea 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -119,8 +119,6 @@ public function __clone() * if $traverse is enabled, but $deep is disabled * - {@link TraversalStrategy::NONE} if $traverse is disabled * - * @param Constraint $constraint The constraint to add - * * @return $this * * @throws ConstraintDefinitionException When trying to add the diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php index 0d61e9aa4394a..9d92de348ae5c 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php @@ -32,9 +32,6 @@ abstract class AbstractLoader implements LoaderInterface */ const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; - /** - * @var array - */ protected $namespaces = array(); /** diff --git a/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php b/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php index 5dadc82eb8094..d988309f811df 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php @@ -23,8 +23,6 @@ interface LoaderInterface /** * Loads validation metadata into a {@link ClassMetadata} instance. * - * @param ClassMetadata $metadata The metadata to load - * * @return bool Whether the loader succeeded */ public function loadClassMetadata(ClassMetadata $metadata); diff --git a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php index 5e97d523bf759..da4ef197ad605 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -40,9 +40,6 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest protected $validator; /** - * @param MetadataFactoryInterface $metadataFactory - * @param array $objectInitializers - * * @return ValidatorInterface */ abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()); diff --git a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php index e9576f5eceb37..5bac2e88987f6 100644 --- a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php @@ -91,8 +91,6 @@ public function startContext(); * The returned validator adds all generated violations to the given * context. * - * @param ExecutionContextInterface $context The execution context - * * @return ContextualValidatorInterface The validator for that context */ public function inContext(ExecutionContextInterface $context); diff --git a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php index b9b33e4fbcad1..1b0bd72996308 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php +++ b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php @@ -26,8 +26,6 @@ interface ValidatorBuilderInterface /** * Adds an object initializer to the validator. * - * @param ObjectInitializerInterface $initializer The initializer - * * @return $this */ public function addObjectInitializer(ObjectInitializerInterface $initializer); @@ -35,7 +33,7 @@ public function addObjectInitializer(ObjectInitializerInterface $initializer); /** * Adds a list of object initializers to the validator. * - * @param array $initializers The initializer + * @param ObjectInitializerInterface[] $initializers * * @return $this */ @@ -53,7 +51,7 @@ public function addXmlMapping($path); /** * Adds a list of XML constraint mapping files to the validator. * - * @param array $paths The paths to the mapping files + * @param string[] $paths The paths to the mapping files * * @return $this */ @@ -71,7 +69,7 @@ public function addYamlMapping($path); /** * Adds a list of YAML constraint mappings file to the validator. * - * @param array $paths The paths to the mapping files + * @param string[] $paths The paths to the mapping files * * @return $this */ @@ -89,7 +87,7 @@ public function addMethodMapping($methodName); /** * Enables constraint mapping using the given static methods. * - * @param array $methodNames The names of the methods + * @param string[] $methodNames The names of the methods * * @return $this */ @@ -98,8 +96,6 @@ public function addMethodMappings(array $methodNames); /** * Enables annotation based constraint mapping. * - * @param Reader $annotationReader The annotation reader to be used - * * @return $this */ public function enableAnnotationMapping(Reader $annotationReader = null); @@ -114,8 +110,6 @@ public function disableAnnotationMapping(); /** * Sets the class metadata factory used by the validator. * - * @param MetadataFactoryInterface $metadataFactory The metadata factory - * * @return $this */ public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); @@ -123,8 +117,6 @@ public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); /** * Sets the cache for caching class metadata. * - * @param CacheInterface $cache The cache instance - * * @return $this */ public function setMetadataCache(CacheInterface $cache); @@ -132,8 +124,6 @@ public function setMetadataCache(CacheInterface $cache); /** * Sets the constraint validator factory used by the validator. * - * @param ConstraintValidatorFactoryInterface $validatorFactory The validator factory - * * @return $this */ public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); @@ -141,8 +131,6 @@ public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterfac /** * Sets the translator used for translating violation messages. * - * @param TranslatorInterface $translator The translator instance - * * @return $this */ public function setTranslator(TranslatorInterface $translator); diff --git a/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php b/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php index 2c3d9db850d08..b173bccf38916 100644 --- a/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php +++ b/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php @@ -20,10 +20,5 @@ */ interface DataDumperInterface { - /** - * Dumps a Data object. - * - * @param Data $data A Data object - */ public function dump(Data $data); } From fd225b0719300da11df6af27352927144a4dafbf Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 24 Oct 2017 16:20:57 +0200 Subject: [PATCH 52/92] Minor docblock cleanup --- .../Doctrine/Security/RememberMe/DoctrineTokenProvider.php | 6 ------ .../DependencyInjection/SecurityExtension.php | 3 --- .../Bundle/TwigBundle/DependencyInjection/TwigExtension.php | 3 --- 3 files changed, 12 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index 089ec7810580b..f35984068f937 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -37,12 +37,6 @@ */ class DoctrineTokenProvider implements TokenProviderInterface { - /** - * Doctrine DBAL database connection - * F.ex. service id: doctrine.dbal.default_connection. - * - * @var Connection - */ private $conn; public function __construct(Connection $conn) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index 9b082d6a9bada..3ffe2876e88d8 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -158,9 +158,6 @@ private function configureDbalAclProvider(array $config, ContainerBuilder $conta $container->setParameter('security.acl.dbal.sid_table_name', $config['tables']['security_identity']); } - /** - * Loads the web configuration. - */ private function createRoleHierarchy(array $config, ContainerBuilder $container) { if (!isset($config['role_hierarchy'])) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 22fbe70a034f1..e0ffd0b14324b 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -25,9 +25,6 @@ */ class TwigExtension extends Extension { - /** - * Responds to the twig configuration parameter. - */ public function load(array $configs, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); From 5eab3531177e277f87f0660aba2be76242a82a88 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 18 Oct 2017 18:32:22 -0700 Subject: [PATCH 53/92] Remove some visual debt by adding type hints on final methods/classes --- .../FrameworkBundle/Command/AboutCommand.php | 8 +-- .../Command/AssetsInstallCommand.php | 27 ++------ .../Command/CacheClearCommand.php | 9 +-- .../Command/ConfigDebugCommand.php | 7 +-- .../Command/TranslationDebugCommand.php | 29 +++------ .../Command/TranslationUpdateCommand.php | 4 +- .../Controller/RedirectController.php | 10 +-- .../Controller/TemplateController.php | 4 +- .../Command/UserPasswordEncoderCommand.php | 4 +- .../Cache/Adapter/AbstractAdapter.php | 6 +- .../Component/Cache/Adapter/ApcuAdapter.php | 6 +- .../Component/Cache/Adapter/ArrayAdapter.php | 2 +- .../Component/Cache/Adapter/ChainAdapter.php | 2 +- .../Cache/Adapter/DoctrineAdapter.php | 7 +-- .../Cache/Adapter/FilesystemAdapter.php | 7 +-- .../Cache/Adapter/MemcachedAdapter.php | 2 +- .../Component/Cache/Adapter/PdoAdapter.php | 7 +-- .../Cache/Adapter/PhpArrayAdapter.php | 2 +- .../Cache/Adapter/PhpFilesAdapter.php | 6 +- .../Component/Cache/Adapter/ProxyAdapter.php | 7 +-- .../Component/Cache/Adapter/RedisAdapter.php | 2 +- .../Cache/Adapter/SimpleCacheAdapter.php | 2 +- .../Component/Cache/Simple/AbstractCache.php | 6 +- .../Component/Cache/Simple/ApcuCache.php | 7 +-- .../Component/Cache/Simple/ArrayCache.php | 2 +- .../Component/Cache/Simple/ChainCache.php | 2 +- .../Component/Cache/Simple/DoctrineCache.php | 7 +-- .../Cache/Simple/FilesystemCache.php | 7 +-- .../Component/Cache/Simple/MemcachedCache.php | 7 +-- .../Component/Cache/Simple/PdoCache.php | 7 +-- .../Component/Cache/Simple/PhpArrayCache.php | 2 +- .../Component/Cache/Simple/PhpFilesCache.php | 6 +- .../Component/Cache/Simple/RedisCache.php | 2 +- .../Compiler/AnalyzeServiceReferencesPass.php | 13 +--- .../DependencyInjection/Compiler/Compiler.php | 2 +- .../Compiler/ServiceReferenceGraph.php | 37 ++--------- .../Compiler/ServiceReferenceGraphEdge.php | 11 +--- .../DependencyInjection/ContainerBuilder.php | 13 ++-- .../Debug/OptionsResolverIntrospector.php | 22 ++----- src/Symfony/Component/Process/Process.php | 2 +- .../Extractor/PhpDocExtractor.php | 35 ++--------- .../Extractor/ReflectionExtractor.php | 62 ++----------------- .../PropertyInfo/PropertyInfoExtractor.php | 8 +-- src/Symfony/Component/PropertyInfo/Type.php | 39 +++--------- .../Guard/GuardAuthenticatorHandler.php | 27 +------- .../Serializer/Encoder/ChainDecoder.php | 7 +-- .../Serializer/Encoder/ChainEncoder.php | 7 +-- src/Symfony/Component/Yaml/Parser.php | 2 +- src/Symfony/Component/Yaml/Yaml.php | 2 +- 49 files changed, 101 insertions(+), 403 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index 801eabb9b609c..64fcc5c8157a1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -103,12 +103,12 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->table(array(), $rows); } - private static function formatPath($path, $baseDir = null) + private static function formatPath(string $path, string $baseDir = null): string { return null !== $baseDir ? preg_replace('~^'.preg_quote($baseDir, '~').'~', '.', $path) : $path; } - private static function formatFileSize($path) + private static function formatFileSize(string $path): string { if (is_file($path)) { $size = filesize($path) ?: 0; @@ -122,14 +122,14 @@ private static function formatFileSize($path) return Helper::formatMemory($size); } - private static function isExpired($date) + private static function isExpired(string $date): bool { $date = \DateTime::createFromFormat('m/Y', $date); return false !== $date && new \DateTime() > $date->modify('last day of this month 23:59:59'); } - private static function getDotEnvVars() + private static function getDotEnvVars(): array { $vars = array(); foreach (explode(',', getenv('SYMFONY_DOTENV_VARS')) as $name) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index cda58bd97f373..21355aa8b8504 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -185,13 +185,8 @@ protected function execute(InputInterface $input, OutputInterface $output) * Try to create relative symlink. * * Falling back to absolute symlink and finally hard copy. - * - * @param string $originDir - * @param string $targetDir - * - * @return string */ - private function relativeSymlinkWithFallback($originDir, $targetDir) + private function relativeSymlinkWithFallback(string $originDir, string $targetDir): string { try { $this->symlink($originDir, $targetDir, true); @@ -207,13 +202,8 @@ private function relativeSymlinkWithFallback($originDir, $targetDir) * Try to create absolute symlink. * * Falling back to hard copy. - * - * @param string $originDir - * @param string $targetDir - * - * @return string */ - private function absoluteSymlinkWithFallback($originDir, $targetDir) + private function absoluteSymlinkWithFallback(string $originDir, string $targetDir): string { try { $this->symlink($originDir, $targetDir); @@ -229,13 +219,9 @@ private function absoluteSymlinkWithFallback($originDir, $targetDir) /** * Creates symbolic link. * - * @param string $originDir - * @param string $targetDir - * @param bool $relative - * * @throws IOException if link can not be created */ - private function symlink($originDir, $targetDir, $relative = false) + private function symlink(string $originDir, string $targetDir, bool $relative = false) { if ($relative) { $originDir = $this->filesystem->makePathRelative($originDir, realpath(dirname($targetDir))); @@ -248,13 +234,8 @@ private function symlink($originDir, $targetDir, $relative = false) /** * Copies origin to target. - * - * @param string $originDir - * @param string $targetDir - * - * @return string */ - private function hardCopy($originDir, $targetDir) + private function hardCopy(string $originDir, string $targetDir): string { $this->filesystem->mkdir($targetDir, 0777); // We use a custom iterator to ignore VCS files diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index 1bb9c4c530402..bc0f980e51da4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -117,7 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); } - private function warmupCache(InputInterface $input, OutputInterface $output, $realCacheDir, $oldCacheDir) + private function warmupCache(InputInterface $input, OutputInterface $output, string $realCacheDir, string $oldCacheDir) { $io = new SymfonyStyle($input, $output); @@ -145,12 +145,7 @@ private function warmupCache(InputInterface $input, OutputInterface $output, $re $this->filesystem->rename($warmupDir, $realCacheDir); } - /** - * @param string $warmupDir - * @param string $realCacheDir - * @param bool $enableOptionalWarmers - */ - private function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true) + private function warmup(string $warmupDir, string $realCacheDir, bool $enableOptionalWarmers = true) { // create a temporary kernel $kernel = $this->getApplication()->getKernel(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index 5a55332b334f3..d2fb64e763d62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Yaml\Yaml; /** @@ -112,7 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->writeln(Yaml::dump($config, 10)); } - private function compileContainer() + private function compileContainer(): ContainerBuilder { $kernel = clone $this->getApplication()->getKernel(); $kernel->boot(); @@ -128,13 +129,11 @@ private function compileContainer() /** * Iterate over configuration until the last step of the given path. * - * @param array $config A bundle configuration - * * @throws LogicException If the configuration does not exist * * @return mixed */ - private function getConfigForPath(array $config, $path, $alias) + private function getConfigForPath(array $config, string $path, string $alias) { $steps = explode('.', $path); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index 3e16726a41940..4bcea1082770d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -217,7 +217,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->table($headers, $rows); } - private function formatState($state) + private function formatState($state): string { if (self::MESSAGE_MISSING === $state) { return ' missing '; @@ -234,7 +234,7 @@ private function formatState($state) return $state; } - private function formatStates(array $states) + private function formatStates(array $states): string { $result = array(); foreach ($states as $state) { @@ -244,12 +244,12 @@ private function formatStates(array $states) return implode(' ', $result); } - private function formatId($id) + private function formatId(string $id): string { return sprintf('%s', $id); } - private function sanitizeString($string, $length = 40) + private function sanitizeString(string $string, int $length = 40): string { $string = trim(preg_replace('/\s+/', ' ', $string)); @@ -264,13 +264,7 @@ private function sanitizeString($string, $length = 40) return $string; } - /** - * @param string $locale - * @param array $transPaths - * - * @return MessageCatalogue - */ - private function extractMessages($locale, $transPaths) + private function extractMessages(string $locale, array $transPaths): MessageCatalogue { $extractedCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { @@ -283,13 +277,7 @@ private function extractMessages($locale, $transPaths) return $extractedCatalogue; } - /** - * @param string $locale - * @param array $transPaths - * - * @return MessageCatalogue - */ - private function loadCurrentMessages($locale, $transPaths) + private function loadCurrentMessages(string $locale, array $transPaths): MessageCatalogue { $currentCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { @@ -303,12 +291,9 @@ private function loadCurrentMessages($locale, $transPaths) } /** - * @param string $locale - * @param array $transPaths - * * @return MessageCatalogue[] */ - private function loadFallbackCatalogues($locale, $transPaths) + private function loadFallbackCatalogues(string $locale, array $transPaths): array { $fallbackCatalogues = array(); if ($this->translator instanceof Translator || $this->translator instanceof DataCollectorTranslator || $this->translator instanceof LoggingTranslator) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index f5df6dd3f426a..c16c4dcf14a2a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -41,7 +41,7 @@ class TranslationUpdateCommand extends Command private $extractor; private $defaultLocale; - public function __construct(TranslationWriterInterface $writer, TranslationReaderInterface $reader, ExtractorInterface $extractor, $defaultLocale) + public function __construct(TranslationWriterInterface $writer, TranslationReaderInterface $reader, ExtractorInterface $extractor, string $defaultLocale) { parent::__construct(); @@ -242,7 +242,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $errorIo->success($resultMessage.'.'); } - private function filterCatalogue(MessageCatalogue $catalogue, $domain) + private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue { $filteredCatalogue = new MessageCatalogue($catalogue->getLocale()); diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php index 487481623e9b7..8e6ce84408d09 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php @@ -30,7 +30,7 @@ class RedirectController private $httpPort; private $httpsPort; - public function __construct(UrlGeneratorInterface $router = null, $httpPort = null, $httpsPort = null) + public function __construct(UrlGeneratorInterface $router = null, int $httpPort = null, int $httpsPort = null) { $this->router = $router; $this->httpPort = $httpPort; @@ -51,11 +51,9 @@ public function __construct(UrlGeneratorInterface $router = null, $httpPort = nu * @param bool $permanent Whether the redirection is permanent * @param bool|array $ignoreAttributes Whether to ignore attributes or an array of attributes to ignore * - * @return Response A Response instance - * * @throws HttpException In case the route name is empty */ - public function redirectAction(Request $request, $route, $permanent = false, $ignoreAttributes = false) + public function redirectAction(Request $request, string $route, bool $permanent = false, $ignoreAttributes = false): Response { if ('' == $route) { throw new HttpException($permanent ? 410 : 404); @@ -89,11 +87,9 @@ public function redirectAction(Request $request, $route, $permanent = false, $ig * @param int|null $httpPort The HTTP port (null to keep the current one for the same scheme or the default configured port) * @param int|null $httpsPort The HTTPS port (null to keep the current one for the same scheme or the default configured port) * - * @return Response A Response instance - * * @throws HttpException In case the path is empty */ - public function urlRedirectAction(Request $request, $path, $permanent = false, $scheme = null, $httpPort = null, $httpsPort = null) + public function urlRedirectAction(Request $request, string $path, bool $permanent = false, string $scheme = null, int $httpPort = null, int $httpsPort = null): Response { if ('' == $path) { throw new HttpException($permanent ? 410 : 404); diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php index 65eb35fc2a2fd..c15cde111578b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php @@ -40,10 +40,8 @@ public function __construct(Environment $twig = null, EngineInterface $templatin * @param int|null $maxAge Max age for client caching * @param int|null $sharedAge Max age for shared (proxy) caching * @param bool|null $private Whether or not caching should apply for client caches only - * - * @return Response A Response instance */ - public function templateAction($template, $maxAge = null, $sharedAge = null, $private = null) + public function templateAction(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null): Response { if ($this->templating) { $response = new Response($this->templating->render($template)); diff --git a/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php index e53e45f28ad9a..a09d5c3651f96 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php @@ -164,10 +164,8 @@ protected function execute(InputInterface $input, OutputInterface $output) /** * Create the password question to ask the user for the password to be encoded. - * - * @return Question */ - private function createPasswordQuestion() + private function createPasswordQuestion(): Question { $passwordQuestion = new Question('Type in your password to be encoded'); diff --git a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php index 727fc84c98473..758d3a8ec2e24 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -33,11 +33,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface private $createCacheItem; private $mergeByLifetime; - /** - * @param string $namespace - * @param int $defaultLifetime - */ - protected function __construct($namespace = '', $defaultLifetime = 0) + protected function __construct(string $namespace = '', int $defaultLifetime = 0) { $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':'; if (null !== $this->maxIdLength && strlen($namespace) > $this->maxIdLength - 24) { diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php index 50554ed688309..7db3956588026 100644 --- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -18,13 +18,9 @@ class ApcuAdapter extends AbstractAdapter use ApcuTrait; /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $version - * * @throws CacheException if APCu is not enabled */ - public function __construct($namespace = '', $defaultLifetime = 0, $version = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null) { $this->init($namespace, $defaultLifetime, $version); } diff --git a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php index 2118e9c6ffa57..fee7ed6d906d5 100644 --- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -30,7 +30,7 @@ class ArrayAdapter implements AdapterInterface, LoggerAwareInterface, Resettable * @param int $defaultLifetime * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise */ - public function __construct($defaultLifetime = 0, $storeSerialized = true) + public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true) { $this->storeSerialized = $storeSerialized; $this->createCacheItem = \Closure::bind( diff --git a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php index 6bdf6b2d54f14..910df0fd38ed5 100644 --- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -36,7 +36,7 @@ class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableIn * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items * @param int $maxLifetime The max lifetime of items propagated from lower adapters to upper ones */ - public function __construct(array $adapters, $maxLifetime = 0) + public function __construct(array $adapters, int $maxLifetime = 0) { if (!$adapters) { throw new InvalidArgumentException('At least one adapter must be specified.'); diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php index 972d2b41545ef..75ae4cb7015c8 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php @@ -18,12 +18,7 @@ class DoctrineAdapter extends AbstractAdapter { use DoctrineTrait; - /** - * @param CacheProvider $provider - * @param string $namespace - * @param int $defaultLifetime - */ - public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0) + public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0) { parent::__construct('', $defaultLifetime); $this->provider = $provider; diff --git a/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php b/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php index d071964ec2c5c..a08888368347a 100644 --- a/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php @@ -18,12 +18,7 @@ class FilesystemAdapter extends AbstractAdapter implements PruneableInterface { use FilesystemTrait; - /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $directory - */ - public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null) { parent::__construct('', $defaultLifetime); $this->init($namespace, $directory); diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php index 5637141a77a89..65ab9eda864bf 100644 --- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php @@ -29,7 +29,7 @@ class MemcachedAdapter extends AbstractAdapter * * Using a MemcachedAdapter as a pure items store is fine. */ - public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0) + public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0) { $this->init($client, $namespace, $defaultLifetime); } diff --git a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php index 1be3809613ad0..7d83b0e53c843 100644 --- a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php @@ -35,16 +35,13 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface * * db_password: The password when lazy-connect [default: ''] * * db_connection_options: An array of driver-specific connection options [default: array()] * - * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null - * @param string $namespace - * @param int $defaultLifetime - * @param array $options An associative array of options + * @param \PDO|Connection|string $connOrDsn a \PDO or Connection instance or DSN string or null * * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION * @throws InvalidArgumentException When namespace contains invalid characters */ - public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = array()) + public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = array()) { $this->init($connOrDsn, $namespace, $defaultLifetime, $options); } diff --git a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php index a8f9ad77e6fd8..ab000e65dea66 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php @@ -36,7 +36,7 @@ class PhpArrayAdapter implements AdapterInterface, PruneableInterface, Resettabl * @param string $file The PHP file were values are cached * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit */ - public function __construct($file, AdapterInterface $fallbackPool) + public function __construct(string $file, AdapterInterface $fallbackPool) { $this->file = $file; $this->pool = $fallbackPool; diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php index 528d9c01fb304..41879df266571 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -20,13 +20,9 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface use PhpFilesTrait; /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $directory - * * @throws CacheException if OPcache is not enabled */ - public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null) { if (!static::isSupported()) { throw new CacheException('OPcache is not enabled'); diff --git a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php index 82c95c5b04582..da286dbf173f7 100644 --- a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php @@ -30,12 +30,7 @@ class ProxyAdapter implements AdapterInterface, PruneableInterface, ResettableIn private $createCacheItem; private $poolHash; - /** - * @param CacheItemPoolInterface $pool - * @param string $namespace - * @param int $defaultLifetime - */ - public function __construct(CacheItemPoolInterface $pool, $namespace = '', $defaultLifetime = 0) + public function __construct(CacheItemPoolInterface $pool, string $namespace = '', int $defaultLifetime = 0) { $this->pool = $pool; $this->poolHash = $poolHash = spl_object_hash($pool); diff --git a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php index c1e17997fb557..0bb76fcdd4ba6 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php @@ -22,7 +22,7 @@ class RedisAdapter extends AbstractAdapter * @param string $namespace The default namespace * @param int $defaultLifetime The default lifetime */ - public function __construct($redisClient, $namespace = '', $defaultLifetime = 0) + public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0) { $this->init($redisClient, $namespace, $defaultLifetime); } diff --git a/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php b/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php index 24db5d504ab68..2e6d03a1f0b41 100644 --- a/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php @@ -25,7 +25,7 @@ class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface, private $miss; - public function __construct(CacheInterface $pool, $namespace = '', $defaultLifetime = 0) + public function __construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime = 0) { parent::__construct($namespace, $defaultLifetime); diff --git a/src/Symfony/Component/Cache/Simple/AbstractCache.php b/src/Symfony/Component/Cache/Simple/AbstractCache.php index e666effaf93f9..ae1e61ed86480 100644 --- a/src/Symfony/Component/Cache/Simple/AbstractCache.php +++ b/src/Symfony/Component/Cache/Simple/AbstractCache.php @@ -31,11 +31,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re private $defaultLifetime; - /** - * @param string $namespace - * @param int $defaultLifetime - */ - protected function __construct($namespace = '', $defaultLifetime = 0) + protected function __construct(string $namespace = '', int $defaultLifetime = 0) { $this->defaultLifetime = max(0, (int) $defaultLifetime); $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':'; diff --git a/src/Symfony/Component/Cache/Simple/ApcuCache.php b/src/Symfony/Component/Cache/Simple/ApcuCache.php index e583b44341dce..0877c394bbda3 100644 --- a/src/Symfony/Component/Cache/Simple/ApcuCache.php +++ b/src/Symfony/Component/Cache/Simple/ApcuCache.php @@ -17,12 +17,7 @@ class ApcuCache extends AbstractCache { use ApcuTrait; - /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $version - */ - public function __construct($namespace = '', $defaultLifetime = 0, $version = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null) { $this->init($namespace, $defaultLifetime, $version); } diff --git a/src/Symfony/Component/Cache/Simple/ArrayCache.php b/src/Symfony/Component/Cache/Simple/ArrayCache.php index 8d027cd2a3722..05640dfd17aa9 100644 --- a/src/Symfony/Component/Cache/Simple/ArrayCache.php +++ b/src/Symfony/Component/Cache/Simple/ArrayCache.php @@ -34,7 +34,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte * @param int $defaultLifetime * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise */ - public function __construct($defaultLifetime = 0, $storeSerialized = true) + public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true) { $this->defaultLifetime = (int) $defaultLifetime; $this->storeSerialized = $storeSerialized; diff --git a/src/Symfony/Component/Cache/Simple/ChainCache.php b/src/Symfony/Component/Cache/Simple/ChainCache.php index 9d0c75870eb7e..05805b91e574a 100644 --- a/src/Symfony/Component/Cache/Simple/ChainCache.php +++ b/src/Symfony/Component/Cache/Simple/ChainCache.php @@ -35,7 +35,7 @@ class ChainCache implements CacheInterface, PruneableInterface, ResettableInterf * @param CacheInterface[] $caches The ordered list of caches used to fetch cached items * @param int $defaultLifetime The lifetime of items propagated from lower caches to upper ones */ - public function __construct(array $caches, $defaultLifetime = 0) + public function __construct(array $caches, int $defaultLifetime = 0) { if (!$caches) { throw new InvalidArgumentException('At least one cache must be specified.'); diff --git a/src/Symfony/Component/Cache/Simple/DoctrineCache.php b/src/Symfony/Component/Cache/Simple/DoctrineCache.php index 00f0b9c6fc326..0ba701d7cd9a6 100644 --- a/src/Symfony/Component/Cache/Simple/DoctrineCache.php +++ b/src/Symfony/Component/Cache/Simple/DoctrineCache.php @@ -18,12 +18,7 @@ class DoctrineCache extends AbstractCache { use DoctrineTrait; - /** - * @param CacheProvider $provider - * @param string $namespace - * @param int $defaultLifetime - */ - public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0) + public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0) { parent::__construct('', $defaultLifetime); $this->provider = $provider; diff --git a/src/Symfony/Component/Cache/Simple/FilesystemCache.php b/src/Symfony/Component/Cache/Simple/FilesystemCache.php index ccd579534288e..37b3d3fa611b3 100644 --- a/src/Symfony/Component/Cache/Simple/FilesystemCache.php +++ b/src/Symfony/Component/Cache/Simple/FilesystemCache.php @@ -18,12 +18,7 @@ class FilesystemCache extends AbstractCache implements PruneableInterface { use FilesystemTrait; - /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $directory - */ - public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null) { parent::__construct('', $defaultLifetime); $this->init($namespace, $directory); diff --git a/src/Symfony/Component/Cache/Simple/MemcachedCache.php b/src/Symfony/Component/Cache/Simple/MemcachedCache.php index 7717740622c5e..0ff521b9c31fb 100644 --- a/src/Symfony/Component/Cache/Simple/MemcachedCache.php +++ b/src/Symfony/Component/Cache/Simple/MemcachedCache.php @@ -19,12 +19,7 @@ class MemcachedCache extends AbstractCache protected $maxIdLength = 250; - /** - * @param \Memcached $client - * @param string $namespace - * @param int $defaultLifetime - */ - public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0) + public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0) { $this->init($client, $namespace, $defaultLifetime); } diff --git a/src/Symfony/Component/Cache/Simple/PdoCache.php b/src/Symfony/Component/Cache/Simple/PdoCache.php index 931a3b1ff7dba..65b9879cd37c4 100644 --- a/src/Symfony/Component/Cache/Simple/PdoCache.php +++ b/src/Symfony/Component/Cache/Simple/PdoCache.php @@ -35,16 +35,13 @@ class PdoCache extends AbstractCache implements PruneableInterface * * db_password: The password when lazy-connect [default: ''] * * db_connection_options: An array of driver-specific connection options [default: array()] * - * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null - * @param string $namespace - * @param int $defaultLifetime - * @param array $options An associative array of options + * @param \PDO|Connection|string $connOrDsn a \PDO or Connection instance or DSN string or null * * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION * @throws InvalidArgumentException When namespace contains invalid characters */ - public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = array()) + public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = array()) { $this->init($connOrDsn, $namespace, $defaultLifetime, $options); } diff --git a/src/Symfony/Component/Cache/Simple/PhpArrayCache.php b/src/Symfony/Component/Cache/Simple/PhpArrayCache.php index 314a0b435654c..0dba1f4895df7 100644 --- a/src/Symfony/Component/Cache/Simple/PhpArrayCache.php +++ b/src/Symfony/Component/Cache/Simple/PhpArrayCache.php @@ -32,7 +32,7 @@ class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInt * @param string $file The PHP file were values are cached * @param CacheInterface $fallbackPool A pool to fallback on when an item is not hit */ - public function __construct($file, CacheInterface $fallbackPool) + public function __construct(string $file, CacheInterface $fallbackPool) { $this->file = $file; $this->pool = $fallbackPool; diff --git a/src/Symfony/Component/Cache/Simple/PhpFilesCache.php b/src/Symfony/Component/Cache/Simple/PhpFilesCache.php index 9231c8cd39634..77239c32eda69 100644 --- a/src/Symfony/Component/Cache/Simple/PhpFilesCache.php +++ b/src/Symfony/Component/Cache/Simple/PhpFilesCache.php @@ -20,13 +20,9 @@ class PhpFilesCache extends AbstractCache implements PruneableInterface use PhpFilesTrait; /** - * @param string $namespace - * @param int $defaultLifetime - * @param string|null $directory - * * @throws CacheException if OPcache is not enabled */ - public function __construct($namespace = '', $defaultLifetime = 0, $directory = null) + public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null) { if (!static::isSupported()) { throw new CacheException('OPcache is not enabled'); diff --git a/src/Symfony/Component/Cache/Simple/RedisCache.php b/src/Symfony/Component/Cache/Simple/RedisCache.php index e82c0627e241d..45bb5ff799c8a 100644 --- a/src/Symfony/Component/Cache/Simple/RedisCache.php +++ b/src/Symfony/Component/Cache/Simple/RedisCache.php @@ -22,7 +22,7 @@ class RedisCache extends AbstractCache * @param string $namespace * @param int $defaultLifetime */ - public function __construct($redisClient, $namespace = '', $defaultLifetime = 0) + public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0) { $this->init($redisClient, $namespace, $defaultLifetime); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index 217c7c2034073..096b044dc04b9 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -125,28 +125,21 @@ protected function processValue($value, $isRoot = false) return $value; } - /** - * Returns a service definition given the full name or an alias. - * - * @param string $id A full id or alias for a service definition - * - * @return Definition|null The definition related to the supplied id - */ - private function getDefinition($id) + private function getDefinition(string $id): ?Definition { $id = $this->getDefinitionId($id); return null === $id ? null : $this->container->getDefinition($id); } - private function getDefinitionId($id) + private function getDefinitionId(string $id): ?string { while ($this->container->hasAlias($id)) { $id = (string) $this->container->getAlias($id); } if (!$this->container->hasDefinition($id)) { - return; + return null; } return $id; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index cf5016cda5776..abc6205a969b6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -66,7 +66,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE /** * @final */ - public function log(CompilerPassInterface $pass, $message) + public function log(CompilerPassInterface $pass, string $message) { if (false !== strpos($message, "\n")) { $message = str_replace("\n", "\n".get_class($pass).': ', trim($message)); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php index 89548800a4432..0474541f3d761 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php @@ -30,14 +30,7 @@ class ServiceReferenceGraph */ private $nodes = array(); - /** - * Checks if the graph has a specific node. - * - * @param string $id Id to check - * - * @return bool - */ - public function hasNode($id) + public function hasNode(string $id): bool { return isset($this->nodes[$id]); } @@ -45,13 +38,9 @@ public function hasNode($id) /** * Gets a node by identifier. * - * @param string $id The id to retrieve - * - * @return ServiceReferenceGraphNode - * * @throws InvalidArgumentException if no node matches the supplied identifier */ - public function getNode($id) + public function getNode(string $id): ServiceReferenceGraphNode { if (!isset($this->nodes[$id])) { throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id)); @@ -65,7 +54,7 @@ public function getNode($id) * * @return ServiceReferenceGraphNode[] */ - public function getNodes() + public function getNodes(): array { return $this->nodes; } @@ -80,16 +69,8 @@ public function clear() /** * Connects 2 nodes together in the Graph. - * - * @param string $sourceId - * @param mixed $sourceValue - * @param string $destId - * @param mixed $destValue - * @param string $reference - * @param bool $lazy - * @param bool $weak */ - public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null, bool $lazy = false, bool $weak = false) + public function connect(?string $sourceId, $sourceValue, ?string $destId, $destValue = null, $reference = null, bool $lazy = false, bool $weak = false) { if (null === $sourceId || null === $destId) { return; @@ -103,15 +84,7 @@ public function connect($sourceId, $sourceValue, $destId, $destValue = null, $re $destNode->addInEdge($edge); } - /** - * Creates a graph node. - * - * @param string $id - * @param mixed $value - * - * @return ServiceReferenceGraphNode - */ - private function createNode($id, $value) + private function createNode(string $id, $value): ServiceReferenceGraphNode { if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) { return $this->nodes[$id]; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php index 018905394f0cf..3e5b9c92c5433 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php @@ -26,14 +26,7 @@ class ServiceReferenceGraphEdge private $lazy; private $weak; - /** - * @param ServiceReferenceGraphNode $sourceNode - * @param ServiceReferenceGraphNode $destNode - * @param mixed $value - * @param bool $lazy - * @param bool $weak - */ - public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false) + public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, bool $lazy = false, bool $weak = false) { $this->sourceNode = $sourceNode; $this->destNode = $destNode; @@ -45,7 +38,7 @@ public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceRefere /** * Returns the value of the edge. * - * @return string + * @return mixed */ public function getValue() { diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index de5e9b31f212f..2e1d245e8181a 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -311,19 +311,14 @@ public function addObjectResource($object) /** * Retrieves the requested reflection class and registers it for resource tracking. * - * @param string $class - * @param bool $throw - * - * @return \ReflectionClass|null - * * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true * * @final */ - public function getReflectionClass($class, $throw = true) + public function getReflectionClass(?string $class, bool $throw = true): ?\ReflectionClass { if (!$class = $this->getParameterBag()->resolveValue($class)) { - return; + return null; } $resource = null; @@ -368,7 +363,7 @@ public function getReflectionClass($class, $throw = true) * * @final */ - public function fileExists($path, $trackContents = true) + public function fileExists(string $path, $trackContents = true): bool { $exists = file_exists($path); @@ -1326,7 +1321,7 @@ public function getEnvCounters() /** * @final */ - public function log(CompilerPassInterface $pass, $message) + public function log(CompilerPassInterface $pass, string $message) { $this->getCompiler()->log($pass, $message); } diff --git a/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php b/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php index 60317243e9c4f..4d9699df4c9c5 100644 --- a/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php +++ b/src/Symfony/Component/OptionsResolver/Debug/OptionsResolverIntrospector.php @@ -41,61 +41,49 @@ public function __construct(OptionsResolver $optionsResolver) } /** - * @param string $option - * * @return mixed * * @throws NoConfigurationException on no configured value */ - public function getDefault($option) + public function getDefault(string $option) { return call_user_func($this->get, 'defaults', $option, sprintf('No default value was set for the "%s" option.', $option)); } /** - * @param string $option - * * @return \Closure[] * * @throws NoConfigurationException on no configured closures */ - public function getLazyClosures($option) + public function getLazyClosures(string $option): array { return call_user_func($this->get, 'lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option)); } /** - * @param string $option - * * @return string[] * * @throws NoConfigurationException on no configured types */ - public function getAllowedTypes($option) + public function getAllowedTypes(string $option): array { return call_user_func($this->get, 'allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option)); } /** - * @param string $option - * * @return mixed[] * * @throws NoConfigurationException on no configured values */ - public function getAllowedValues($option) + public function getAllowedValues(string $option): array { return call_user_func($this->get, 'allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option)); } /** - * @param string $option - * - * @return \Closure - * * @throws NoConfigurationException on no configured normalizer */ - public function getNormalizer($option) + public function getNormalizer(string $option): \Closure { return call_user_func($this->get, 'normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option)); } diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 838355f60c050..fd9803c5592d9 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -194,7 +194,7 @@ public function __clone() * * @final since version 3.3 */ - public function run($callback = null, array $env = array()) + public function run(callable $callback = null, array $env = array()) { $this->start($callback, $env); diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index a84b947b890a2..5ae275336c8c8 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -168,15 +168,7 @@ public function getTypes($class, $property, array $context = array()) return array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])); } - /** - * Gets the DocBlock for this property. - * - * @param string $class - * @param string $property - * - * @return array - */ - private function getDocBlock($class, $property) + private function getDocBlock(string $class, string $property): array { $propertyHash = sprintf('%s::%s', $class, $property); @@ -210,36 +202,19 @@ private function getDocBlock($class, $property) return $this->docBlocks[$propertyHash] = $data; } - /** - * Gets the DocBlock from a property. - * - * @param string $class - * @param string $property - * - * @return DocBlock|null - */ - private function getDocBlockFromProperty($class, $property) + private function getDocBlockFromProperty(string $class, string $property): ?DocBlock { // Use a ReflectionProperty instead of $class to get the parent class if applicable try { $reflectionProperty = new \ReflectionProperty($class, $property); } catch (\ReflectionException $e) { - return; + return null; } return $this->docBlockFactory->create($reflectionProperty, $this->contextFactory->createFromReflector($reflectionProperty)); } - /** - * Gets DocBlock from accessor or mutator method. - * - * @param string $class - * @param string $ucFirstProperty - * @param int $type - * - * @return array|null - */ - private function getDocBlockFromMethod($class, $ucFirstProperty, $type) + private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array { $prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes; $prefix = null; @@ -265,7 +240,7 @@ private function getDocBlockFromMethod($class, $ucFirstProperty, $type) } if (!isset($reflectionMethod)) { - return; + return null; } return array($this->docBlockFactory->create($reflectionMethod, $this->contextFactory->createFromReflector($reflectionMethod)), $prefix); diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index 68506c4eb4da5..b62b54691cd77 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -47,19 +47,8 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp */ public static $defaultArrayMutatorPrefixes = array('add', 'remove'); - /** - * @var string[] - */ private $mutatorPrefixes; - - /** - * @var string[] - */ private $accessorPrefixes; - - /** - * @var string[] - */ private $arrayMutatorPrefixes; /** @@ -155,11 +144,6 @@ public function isWritable($class, $property, array $context = array()) } /** - * Tries to extract type information from mutators. - * - * @param string $class - * @param string $property - * * @return Type[]|null */ private function extractFromMutator(string $class, string $property): ?array @@ -187,9 +171,6 @@ private function extractFromMutator(string $class, string $property): ?array /** * Tries to extract type information from accessors. * - * @param string $class - * @param string $property - * * @return Type[]|null */ private function extractFromAccessor(string $class, string $property): ?array @@ -210,13 +191,6 @@ private function extractFromAccessor(string $class, string $property): ?array return null; } - /** - * Extracts data from the PHP 7 reflection type. - * - * @param \ReflectionType $reflectionType - * - * @return Type - */ private function extractFromReflectionType(\ReflectionType $reflectionType): Type { $phpTypeOrClass = $reflectionType->getName(); @@ -235,14 +209,6 @@ private function extractFromReflectionType(\ReflectionType $reflectionType): Typ return $type; } - /** - * Does the class have the given public property? - * - * @param string $class - * @param string $property - * - * @return bool - */ private function isPublicProperty(string $class, string $property): bool { try { @@ -261,11 +227,6 @@ private function isPublicProperty(string $class, string $property): bool * * Returns an array with a the instance of \ReflectionMethod as first key * and the prefix of the method as second or null if not found. - * - * @param string $class - * @param string $property - * - * @return array|null */ private function getAccessorMethod(string $class, string $property): ?array { @@ -290,17 +251,10 @@ private function getAccessorMethod(string $class, string $property): ?array } /** - * Gets the mutator method. - * * Returns an array with a the instance of \ReflectionMethod as first key * and the prefix of the method as second or null if not found. - * - * @param string $class - * @param string $property - * - * @return array */ - private function getMutatorMethod(string $class, string $property) + private function getMutatorMethod(string $class, string $property): ?array { $ucProperty = ucfirst($property); $ucSingulars = (array) Inflector::singularize($ucProperty); @@ -327,17 +281,11 @@ private function getMutatorMethod(string $class, string $property) } } } + + return null; } - /** - * Extracts a property name from a method name. - * - * @param string $methodName - * @param \ReflectionProperty[] $reflectionProperties - * - * @return string - */ - private function getPropertyName(string $methodName, array $reflectionProperties) + private function getPropertyName(string $methodName, array $reflectionProperties): ?string { $pattern = implode('|', array_merge($this->accessorPrefixes, $this->mutatorPrefixes)); @@ -356,5 +304,7 @@ private function getPropertyName(string $methodName, array $reflectionProperties return $matches[2]; } + + return null; } } diff --git a/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php b/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php index 22e409c1011eb..f2d3a82964dc0 100644 --- a/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php +++ b/src/Symfony/Component/PropertyInfo/PropertyInfoExtractor.php @@ -31,7 +31,7 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface * @param iterable|PropertyDescriptionExtractorInterface[] $descriptionExtractors * @param iterable|PropertyAccessExtractorInterface[] $accessExtractors */ - public function __construct($listExtractors = array(), $typeExtractors = array(), $descriptionExtractors = array(), $accessExtractors = array()) + public function __construct(iterable $listExtractors = array(), iterable $typeExtractors = array(), iterable $descriptionExtractors = array(), iterable $accessExtractors = array()) { $this->listExtractors = $listExtractors; $this->typeExtractors = $typeExtractors; @@ -90,13 +90,9 @@ public function isWritable($class, $property, array $context = array()) /** * Iterates over registered extractors and return the first value found. * - * @param iterable $extractors - * @param string $method - * @param array $arguments - * * @return mixed */ - private function extract($extractors, $method, array $arguments) + private function extract(iterable $extractors, string $method, array $arguments) { foreach ($extractors as $extractor) { $value = call_user_func_array(array($extractor, $method), $arguments); diff --git a/src/Symfony/Component/PropertyInfo/Type.php b/src/Symfony/Component/PropertyInfo/Type.php index d7fc6869c7334..67ad7ccef1651 100644 --- a/src/Symfony/Component/PropertyInfo/Type.php +++ b/src/Symfony/Component/PropertyInfo/Type.php @@ -80,16 +80,9 @@ class Type private $collectionValueType; /** - * @param string $builtinType - * @param bool $nullable - * @param string|null $class - * @param bool $collection - * @param Type|null $collectionKeyType - * @param Type|null $collectionValueType - * * @throws \InvalidArgumentException */ - public function __construct($builtinType, $nullable = false, $class = null, $collection = false, Type $collectionKeyType = null, Type $collectionValueType = null) + public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, Type $collectionKeyType = null, Type $collectionValueType = null) { if (!in_array($builtinType, self::$builtinTypes)) { throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType)); @@ -107,20 +100,13 @@ public function __construct($builtinType, $nullable = false, $class = null, $col * Gets built-in type. * * Can be bool, int, float, string, array, object, resource, null, callback or iterable. - * - * @return string */ - public function getBuiltinType() + public function getBuiltinType(): string { return $this->builtinType; } - /** - * Allows null value? - * - * @return bool - */ - public function isNullable() + public function isNullable(): bool { return $this->nullable; } @@ -129,20 +115,13 @@ public function isNullable() * Gets the class name. * * Only applicable if the built-in type is object. - * - * @return string|null */ - public function getClassName() + public function getClassName(): ?string { return $this->class; } - /** - * Is collection? - * - * @return bool - */ - public function isCollection() + public function isCollection(): bool { return $this->collection; } @@ -151,10 +130,8 @@ public function isCollection() * Gets collection key type. * * Only applicable for a collection type. - * - * @return self|null */ - public function getCollectionKeyType() + public function getCollectionKeyType(): ?self { return $this->collectionKeyType; } @@ -163,10 +140,8 @@ public function getCollectionKeyType() * Gets collection value type. * * Only applicable for a collection type. - * - * @return self|null */ - public function getCollectionValueType() + public function getCollectionValueType(): ?self { return $this->collectionValueType; } diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index 63dc29ad75a39..2a116e375d8a2 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -59,15 +59,8 @@ public function authenticateWithToken(TokenInterface $token, Request $request) /** * Returns the "on success" response for the given GuardAuthenticator. - * - * @param TokenInterface $token - * @param Request $request - * @param AuthenticatorInterface $guardAuthenticator - * @param string $providerKey The provider (i.e. firewall) key - * - * @return null|Response */ - public function handleAuthenticationSuccess(TokenInterface $token, Request $request, AuthenticatorInterface $guardAuthenticator, $providerKey) + public function handleAuthenticationSuccess(TokenInterface $token, Request $request, AuthenticatorInterface $guardAuthenticator, string $providerKey): ?Response { $response = $guardAuthenticator->onAuthenticationSuccess($request, $token, $providerKey); @@ -86,15 +79,8 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ /** * Convenience method for authenticating the user and returning the * Response *if any* for success. - * - * @param UserInterface $user - * @param Request $request - * @param AuthenticatorInterface $authenticator - * @param string $providerKey The provider (i.e. firewall) key - * - * @return Response|null */ - public function authenticateUserAndHandleSuccess(UserInterface $user, Request $request, AuthenticatorInterface $authenticator, $providerKey) + public function authenticateUserAndHandleSuccess(UserInterface $user, Request $request, AuthenticatorInterface $authenticator, string $providerKey): ?Response { // create an authenticated token for the User $token = $authenticator->createAuthenticatedToken($user, $providerKey); @@ -108,15 +94,8 @@ public function authenticateUserAndHandleSuccess(UserInterface $user, Request $r /** * Handles an authentication failure and returns the Response for the * GuardAuthenticator. - * - * @param AuthenticationException $authenticationException - * @param Request $request - * @param AuthenticatorInterface $guardAuthenticator - * @param string $providerKey The key of the firewall - * - * @return null|Response */ - public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $guardAuthenticator, $providerKey) + public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $guardAuthenticator, string $providerKey): ?Response { $token = $this->tokenStorage->getToken(); if ($token instanceof PostAuthenticationGuardToken && $providerKey === $token->getProviderKey()) { diff --git a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php index c44510f60603b..545841fffd48b 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -57,14 +57,9 @@ public function supportsDecoding($format, array $context = array()) /** * Gets the decoder supporting the format. * - * @param string $format - * @param array $context - * - * @return DecoderInterface - * * @throws RuntimeException if no decoder is found */ - private function getDecoder($format, array $context) + private function getDecoder(string $format, array $context): DecoderInterface { if (isset($this->decoderByFormat[$format]) && isset($this->decoders[$this->decoderByFormat[$format]]) diff --git a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php index ae12cc9f29166..2737f6eba695f 100644 --- a/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -80,14 +80,9 @@ public function needsNormalization($format, array $context = array()) /** * Gets the encoder supporting the format. * - * @param string $format - * @param array $context - * - * @return EncoderInterface - * * @throws RuntimeException if no encoder is found */ - private function getEncoder($format, array $context) + private function getEncoder(string $format, array $context): EncoderInterface { if (isset($this->encoderByFormat[$format]) && isset($this->encoders[$this->encoderByFormat[$format]]) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 76fcb8ffa79d2..cc1487002eb73 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -46,7 +46,7 @@ class Parser * * @throws ParseException If the file could not be read or the YAML is not valid */ - public function parseFile($filename, $flags = 0) + public function parseFile(string $filename, int $flags = 0) { if (!is_file($filename)) { throw new ParseException(sprintf('File "%s" does not exist.', $filename)); diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 1779ad84465ab..0a97c2198a3fc 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -50,7 +50,7 @@ class Yaml * * @throws ParseException If the file could not be read or the YAML is not valid */ - public static function parseFile($filename, $flags = 0) + public static function parseFile(string $filename, int $flags = 0) { $yaml = new Parser(); From d9746d45b157910a2dde85719fab9d1b604b1ada Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 24 Oct 2017 16:40:00 +0200 Subject: [PATCH 54/92] fix merge --- .../Component/Console/Tests/Helper/QuestionHelperTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index da9aaefb7206c..2e22cba711368 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -162,7 +162,6 @@ public function testAutocompleteWithTrailingBackslash() $inputStream = $this->getInputStream('E'); $dialog = new QuestionHelper(); - $dialog->setInputStream($inputStream); $helperSet = new HelperSet(array(new FormatterHelper())); $dialog->setHelperSet($helperSet); @@ -171,7 +170,7 @@ public function testAutocompleteWithTrailingBackslash() $question->setAutocompleterValues(array($expectedCompletion)); $output = $this->createOutputInterface(); - $dialog->ask($this->createInputInterfaceMock(), $output, $question); + $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $output, $question); $outputStream = $output->getStream(); rewind($outputStream); From cc7cceef9bb7f2b9994bd17d540f62149f4d0526 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 24 Oct 2017 18:01:49 +0200 Subject: [PATCH 55/92] Allow DateTimeImmutable in Response setters. --- .../Component/HttpFoundation/Response.php | 42 ++++++++++----- .../HttpFoundation/Tests/ResponseTest.php | 54 +++++++++++++++---- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 0d3a23d4d2019..5a874aa6bb810 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -672,9 +672,13 @@ public function getDate() * * @final since version 3.2 */ - public function setDate(\DateTime $date) + public function setDate(\DateTimeInterface $date) { - $date->setTimezone(new \DateTimeZone('UTC')); + if ($date instanceof \DateTime) { + $date = \DateTimeImmutable::createFromMutable($date); + } + + $date = $date->setTimezone(new \DateTimeZone('UTC')); $this->headers->set('Date', $date->format('D, d M Y H:i:s').' GMT'); return $this; @@ -732,22 +736,27 @@ public function getExpires() * * Passing null as value will remove the header. * - * @param \DateTime|null $date A \DateTime instance or null to remove the header + * @param \DateTimeInterface|null $date A \DateTime instance or null to remove the header * * @return $this * * @final since version 3.2 */ - public function setExpires(\DateTime $date = null) + public function setExpires(\DateTimeInterface $date = null) { if (null === $date) { $this->headers->remove('Expires'); - } else { - $date = clone $date; - $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); + + return $this; + } + + if ($date instanceof \DateTime) { + $date = \DateTimeImmutable::createFromMutable($date); } + $date = $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); + return $this; } @@ -888,22 +897,27 @@ public function getLastModified() * * Passing null as value will remove the header. * - * @param \DateTime|null $date A \DateTime instance or null to remove the header + * @param \DateTimeInterface|null $date A \DateTime instance or null to remove the header * * @return $this * * @final since version 3.2 */ - public function setLastModified(\DateTime $date = null) + public function setLastModified(\DateTimeInterface $date = null) { if (null === $date) { $this->headers->remove('Last-Modified'); - } else { - $date = clone $date; - $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); + + return $this; } + if ($date instanceof \DateTime) { + $date = \DateTimeImmutable::createFromMutable($date); + } + + $date = $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); + return $this; } diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 9c5b34febfa30..4f7dc2817a1b9 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -653,6 +653,22 @@ public function testIsImmutable() $this->assertTrue($response->isImmutable()); } + public function testSetDate() + { + $response = new Response(); + $response->setDate(\DateTime::createFromFormat(\DateTime::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin'))); + + $this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTime::ATOM)); + } + + public function testSetDateWithImmutable() + { + $response = new Response(); + $response->setDate(\DateTimeImmutable::createFromFormat(\DateTime::ATOM, '2013-01-26T09:21:56+0100', new \DateTimeZone('Europe/Berlin'))); + + $this->assertEquals('2013-01-26T08:21:56+00:00', $response->getDate()->format(\DateTime::ATOM)); + } + public function testSetExpires() { $response = new Response(); @@ -666,6 +682,16 @@ public function testSetExpires() $this->assertEquals($response->getExpires()->getTimestamp(), $now->getTimestamp()); } + public function testSetExpiresWithImmutable() + { + $response = new Response(); + + $now = $this->createDateTimeImmutableNow(); + $response->setExpires($now); + + $this->assertEquals($response->getExpires()->getTimestamp(), $now->getTimestamp()); + } + public function testSetLastModified() { $response = new Response(); @@ -676,6 +702,16 @@ public function testSetLastModified() $this->assertNull($response->getLastModified()); } + public function testSetLastModifiedWithImmutable() + { + $response = new Response(); + $response->setLastModified($this->createDateTimeImmutableNow()); + $this->assertNotNull($response->getLastModified()); + + $response->setLastModified(null); + $this->assertNull($response->getLastModified()); + } + public function testIsInvalid() { $response = new Response(); @@ -912,6 +948,13 @@ protected function createDateTimeNow() return $date->setTimestamp(time()); } + protected function createDateTimeImmutableNow() + { + $date = new \DateTimeImmutable(); + + return $date->setTimestamp(time()); + } + protected function provideResponse() { return new Response(); @@ -990,14 +1033,3 @@ public function __toString() class DefaultResponse extends Response { } - -class ExtendedResponse extends Response -{ - public function setLastModified(\DateTime $date = null) - { - } - - public function getDate() - { - } -} From 5333680f7d14645161000a7b6796475807e42930 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Wed, 18 Oct 2017 12:32:05 +0100 Subject: [PATCH 56/92] Fix review points --- .../Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php index 532ce202af194..6a0d9aec99284 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php @@ -326,6 +326,12 @@ public function handleError($type, $msg, $file, $line, $context = array()) return $h ? $h($type, $msg, $file, $line, $context) : false; } + // If the message is serialized we need to extract the message. This occurs when the error is triggered by + // by the isolated test path in \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest(). + $parsedMsg = @unserialize($msg); + if (is_array($parsedMsg)) { + $msg = $parsedMsg['deprecation']; + } if (error_reporting()) { $msg = 'Unsilenced deprecation: '.$msg; } From dc7e5a39fa66283d20b6db6dcb55f8d3274f81a2 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 16 Oct 2017 14:30:39 +0100 Subject: [PATCH 57/92] Ensure that PHPUnit's error handler is still working in isolated tests --- .../Bridge/PhpUnit/DeprecationErrorHandler.php | 6 ++++++ .../Bridge/PhpUnit/Tests/ProcessIsolationTest.php | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 011c28e948f2e..9397af1f22799 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -255,6 +255,12 @@ public static function collectDeprecations($outputFile) } $deprecations[] = array(error_reporting(), $msg); }); + // This can be registered before the PHPUnit error handler. + if (!$previousErrorHandler) { + $UtilPrefix = class_exists('PHPUnit_Util_ErrorHandler') ? 'PHPUnit_Util_' : 'PHPUnit\Util\\'; + $previousErrorHandler = $UtilPrefix.'ErrorHandler::handleError'; + } + register_shutdown_function(function () use ($outputFile, &$deprecations) { file_put_contents($outputFile, serialize($deprecations)); }); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php index 0cfbe515ee9e4..ec8f124a5f2c1 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php @@ -21,4 +21,17 @@ public function testIsolation() @trigger_error('Test abc', E_USER_DEPRECATED); $this->addToAssertionCount(1); } + + public function testCallingOtherErrorHandler() + { + $class = class_exists('PHPUnit\Framework\Exception') ? 'PHPUnit\Framework\Exception' : 'PHPUnit_Framework_Exception'; + if (method_exists($this, 'expectException')) { + $this->expectException($class); + $this->expectExceptionMessage('Test that PHPUnit\'s error handler fires.'); + } else { + $this->setExpectedException($class, 'Test that PHPUnit\'s error handler fires.'); + } + + trigger_error('Test that PHPUnit\'s error handler fires.', E_USER_WARNING); + } } From 7cd3049454b173c2d26fdabc2e7a5b4321646ff1 Mon Sep 17 00:00:00 2001 From: Rudy Onfroy Date: Tue, 24 Oct 2017 20:35:27 +0200 Subject: [PATCH 58/92] fix the phpdoc that is not really inherited from response --- src/Symfony/Component/HttpFoundation/RedirectResponse.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 4118fff24c892..23eb04a19fd28 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -44,7 +44,13 @@ public function __construct($url, $status = 302, $headers = array()) } /** - * {@inheritdoc} + * Factory method for chainability. + * + * @param string $url The url to redirect to + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static */ public static function create($url = '', $status = 302, $headers = array()) { From 5fb44e767e824fe8d4de3b6bb38c3f674187970a Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Tue, 24 Oct 2017 15:52:50 -0400 Subject: [PATCH 59/92] [Guard] remove invalid deprecation notice --- .../Component/Security/Guard/AbstractGuardAuthenticator.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php b/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php index 5eceb8470a567..a5e7ba7671fee 100644 --- a/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php +++ b/src/Symfony/Component/Security/Guard/AbstractGuardAuthenticator.php @@ -24,8 +24,6 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface { /** * {@inheritdoc} - * - * @deprecated since version 3.4, to be removed in 4.0 */ public function supports(Request $request) { From b1a22059e76a1b50a68dc52ed0e27cf351c1062c Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 24 Oct 2017 19:59:40 +0100 Subject: [PATCH 60/92] Fix isolated error handling --- .../Bridge/PhpUnit/DeprecationErrorHandler.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 9397af1f22799..53f27477d78cc 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -251,15 +251,16 @@ public static function collectDeprecations($outputFile) $deprecations = array(); $previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$previousErrorHandler) { if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { - return $previousErrorHandler ? $previousErrorHandler($type, $msg, $file, $line, $context) : false; + if ($previousErrorHandler) { + return $previousErrorHandler($type, $msg, $file, $line, $context); + } + + $ErrorHandler = class_exists('PHPUnit_Util_ErrorHandler', false) ? 'PHPUnit_Util_ErrorHandler' : 'PHPUnit\Util\ErrorHandler'; + + return $ErrorHandler::handleError($type, $msg, $file, $line, $context); } $deprecations[] = array(error_reporting(), $msg); }); - // This can be registered before the PHPUnit error handler. - if (!$previousErrorHandler) { - $UtilPrefix = class_exists('PHPUnit_Util_ErrorHandler') ? 'PHPUnit_Util_' : 'PHPUnit\Util\\'; - $previousErrorHandler = $UtilPrefix.'ErrorHandler::handleError'; - } register_shutdown_function(function () use ($outputFile, &$deprecations) { file_put_contents($outputFile, serialize($deprecations)); From b6a0a38c4d3a48d6f2c4881935a5aa55a56aa9d6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 25 Oct 2017 10:48:42 +0200 Subject: [PATCH 61/92] [VarDumper] Fix test --- src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php index 49d054b5199ad..d15348937e5e9 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php @@ -190,7 +190,7 @@ public function provideIntervals() array('PT1S', 0, 0, '+ 00:00:01'.$ms, '1s'), array('PT2M', 0, 0, '+ 00:02:00'.$ms, '120s'), array('PT3H', 0, 0, '+ 03:00:00'.$ms, '10 800s'), - array('P4D', 0, 0, '+ 4d', '345 600s'), + array('P4D', 0, 0, '+ 4d', '34%x %x00s'), // %x to account for DST array('P5M', 0, 0, '+ 5m', null), array('P6Y', 0, 0, '+ 6y', null), array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null), From 7e6e2f07e2bc6ea5690aca7e6b955a3b0e96e924 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 25 Oct 2017 11:25:11 +0200 Subject: [PATCH 62/92] Fix simple-phpunit --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit index 277bb73753580..ac358dd4bed8e 100755 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -68,7 +68,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); } - passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.3.11@dev\""); + passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"~3.3.11@dev|~3.4.0-beta2@dev|^4.0.0-beta2@dev\""); $prevRoot = getenv('COMPOSER_ROOT_VERSION'); putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99"); $exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true))); From 3e3e74c3faae1cf03e939f6c6e966c33dcb611f1 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 25 Oct 2017 11:55:09 +0200 Subject: [PATCH 63/92] Fix phpunit bridge --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 53f27477d78cc..a108126a2eed8 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -254,8 +254,10 @@ public static function collectDeprecations($outputFile) if ($previousErrorHandler) { return $previousErrorHandler($type, $msg, $file, $line, $context); } + static $autoload = true; - $ErrorHandler = class_exists('PHPUnit_Util_ErrorHandler', false) ? 'PHPUnit_Util_ErrorHandler' : 'PHPUnit\Util\ErrorHandler'; + $ErrorHandler = class_exists('PHPUnit_Util_ErrorHandler', $autoload) ? 'PHPUnit_Util_ErrorHandler' : 'PHPUnit\Util\ErrorHandler'; + $autoload = false; return $ErrorHandler::handleError($type, $msg, $file, $line, $context); } From 1de6bf87b9cd10549bdbd586020071c1559a1708 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 24 Oct 2017 20:45:13 +0100 Subject: [PATCH 64/92] Make it easy for Drupal to use the PHPUnit bridge --- .../PhpUnit/Tests/DeprecationErrorHandler/default.phpt | 8 ++++++-- .../PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt | 8 ++++++-- .../PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt | 8 ++++++-- .../PhpUnit/Tests/DeprecationErrorHandler/weak.phpt | 8 ++++++-- .../weak_vendors_on_non_vendor.phpt | 8 ++++++-- .../DeprecationErrorHandler/weak_vendors_on_vendor.phpt | 8 ++++++-- src/Symfony/Bridge/PhpUnit/bootstrap.php | 2 +- 7 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt index cd733724870cd..db60e3d25076e 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt index 0115bbd24259a..b2aa84f3b84d7 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; echo (int) set_error_handler('var_dump'); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt index 3b7207b85f8ee..2bea6d3bb5fcb 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt index 9e78d96e70efb..e65cd8648dfc0 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt index 7568d54a9ce91..a56db364171b2 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt index 7e9c6f8ed7682..f43ebde4929b7 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt @@ -12,8 +12,12 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); -require PHPUNIT_COMPOSER_INSTALL; +// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). +class PHPUnit_TextUI_Command +{ + +} +require $vendor.'/vendor/autoload.php'; require_once __DIR__.'/../../bootstrap.php'; require __DIR__.'/fake_vendor/autoload.php'; require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php'; diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php index 2803caf02bcae..570eb97389a9e 100644 --- a/src/Symfony/Bridge/PhpUnit/bootstrap.php +++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -13,7 +13,7 @@ use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; // Detect if we're loaded by an actual run of phpunit -if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { +if (!class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { if ($ser = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { DeprecationErrorHandler::collectDeprecations($ser); } From 572e02cec598d61b3ff2e2a1910f9840b191c84b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 25 Oct 2017 18:42:56 +0200 Subject: [PATCH 65/92] [HttpFoundation] Fix caching of session-enabled pages --- .../HttpFoundation/Session/Storage/NativeSessionStorage.php | 6 ++++-- .../Tests/Session/Storage/Handler/Fixtures/storage.expected | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index de77008472afb..2975e4104c9e0 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -60,7 +60,8 @@ class NativeSessionStorage implements SessionStorageInterface * ("auto_start", is not supported as it tells PHP to start a session before * PHP starts to execute user-land code. Setting during runtime has no effect). * - * cache_limiter, "" (use "0" to prevent headers from being sent entirely). + * cache_limiter, "private_no_expire" (use "0" to prevent headers from being sent entirely). + * cache_expire, "0" * cookie_domain, "" * cookie_httponly, "" * cookie_lifetime, "0" @@ -101,6 +102,7 @@ public function __construct(array $options = array(), $handler = null, MetadataB { $options += array( 'cache_limiter' => 'private_no_expire', + 'cache_expire' => 0, 'use_cookies' => 1, 'lazy_write' => 1, ); @@ -347,7 +349,7 @@ public function setOptions(array $options) } $validOptions = array_flip(array( - 'cache_limiter', 'cookie_domain', 'cookie_httponly', + 'cache_limiter', 'cache_expire', 'cookie_domain', 'cookie_httponly', 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'entropy_file', 'entropy_length', 'gc_divisor', 'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character', diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected index 5e8deb557c5c1..3bc9beeb758f1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected @@ -15,6 +15,6 @@ $_SESSION is not empty Array ( [0] => Content-Type: text/plain; charset=utf-8 - [1] => Cache-Control: private, max-age=10800 + [1] => Cache-Control: private, max-age=0 ) shutdown From ea3a9a9f963ebf8fb596aab5634f3653d376ae10 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 25 Oct 2017 18:54:16 +0200 Subject: [PATCH 66/92] Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)" This reverts commit 41509a2dcff9c56910b0298f8f315cd837403fc3, reversing changes made to 3e3e74c3faae1cf03e939f6c6e966c33dcb611f1. --- .../PhpUnit/Tests/DeprecationErrorHandler/default.phpt | 8 ++------ .../PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt | 8 ++------ .../PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt | 8 ++------ .../PhpUnit/Tests/DeprecationErrorHandler/weak.phpt | 8 ++------ .../weak_vendors_on_non_vendor.phpt | 8 ++------ .../DeprecationErrorHandler/weak_vendors_on_vendor.phpt | 8 ++------ src/Symfony/Bridge/PhpUnit/bootstrap.php | 2 +- 7 files changed, 13 insertions(+), 37 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt index db60e3d25076e..cd733724870cd 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt index b2aa84f3b84d7..0115bbd24259a 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; echo (int) set_error_handler('var_dump'); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt index 2bea6d3bb5fcb..3b7207b85f8ee 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt index e65cd8648dfc0..9e78d96e70efb 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt index a56db364171b2..7568d54a9ce91 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; @trigger_error('root deprecation', E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt index f43ebde4929b7..7e9c6f8ed7682 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt @@ -12,12 +12,8 @@ $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { $vendor = dirname($vendor); } -// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register(). -class PHPUnit_TextUI_Command -{ - -} -require $vendor.'/vendor/autoload.php'; +define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); +require PHPUNIT_COMPOSER_INSTALL; require_once __DIR__.'/../../bootstrap.php'; require __DIR__.'/fake_vendor/autoload.php'; require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php'; diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php index 570eb97389a9e..2803caf02bcae 100644 --- a/src/Symfony/Bridge/PhpUnit/bootstrap.php +++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -13,7 +13,7 @@ use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; // Detect if we're loaded by an actual run of phpunit -if (!class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { +if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { if ($ser = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { DeprecationErrorHandler::collectDeprecations($ser); } From e2b4a35a720b85173d15055d0554f86602d43593 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 25 Oct 2017 22:09:13 +0100 Subject: [PATCH 67/92] [Intl] Allow passing null as a locale fallback Null is passed in update-data.php to prevent falling back to English locale during icu data import. --- src/Symfony/Component/Intl/Locale.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Intl/Locale.php b/src/Symfony/Component/Intl/Locale.php index 236e58e3f676f..9b74fa4da3fa4 100644 --- a/src/Symfony/Component/Intl/Locale.php +++ b/src/Symfony/Component/Intl/Locale.php @@ -21,7 +21,7 @@ final class Locale extends \Locale { /** - * @var string + * @var string|null */ private static $defaultFallback = 'en'; @@ -31,11 +31,11 @@ final class Locale extends \Locale * The default fallback locale is used as fallback for locales that have no * fallback otherwise. * - * @param string $locale The default fallback locale + * @param string|null $locale The default fallback locale * * @see getFallback() */ - public static function setDefaultFallback(string $locale) + public static function setDefaultFallback(?string $locale) { self::$defaultFallback = $locale; } @@ -43,12 +43,12 @@ public static function setDefaultFallback(string $locale) /** * Returns the default fallback locale. * - * @return string The default fallback locale + * @return string|null The default fallback locale * * @see setDefaultFallback() * @see getFallback() */ - public static function getDefaultFallback(): string + public static function getDefaultFallback(): ?string { return self::$defaultFallback; } From 14e30857ea421135ad076abc0a16868814f398ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 24 Oct 2017 11:37:59 +0200 Subject: [PATCH 68/92] [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) --- .../Compiler/CheckDefinitionValidityPass.php | 13 ++++++++++ .../CheckDefinitionValidityPassTest.php | 24 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php index 5666ecd173c4c..a8a652c7a2319 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\EnvParameterException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** @@ -75,6 +76,18 @@ public function process(ContainerBuilder $container) } } } + + $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); + if (null !== $usedEnvs) { + throw new EnvParameterException(array($resolvedId), null, 'A service name ("%s") cannot contain dynamic values.'); + } + } + + foreach ($container->getAliases() as $id => $alias) { + $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); + if (null !== $usedEnvs) { + throw new EnvParameterException(array($resolvedId), null, 'An alias name ("%s") cannot contain dynamic values.'); + } } } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php index 585bb357669b4..473d5667d448e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php @@ -76,6 +76,30 @@ public function testInvalidTags() $this->process($container); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\EnvParameterException + */ + public function testDynamicServiceName() + { + $container = new ContainerBuilder(); + $env = $container->getParameterBag()->get('env(BAR)'); + $container->register("foo.$env", 'class'); + + $this->process($container); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\EnvParameterException + */ + public function testDynamicAliasName() + { + $container = new ContainerBuilder(); + $env = $container->getParameterBag()->get('env(BAR)'); + $container->setAlias("foo.$env", 'class'); + + $this->process($container); + } + protected function process(ContainerBuilder $container) { $pass = new CheckDefinitionValidityPass(); From 8ea2860996328cbfd381e7cdee1111d2c4df6bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Wed, 18 Oct 2017 17:59:47 +0200 Subject: [PATCH 69/92] [HttpFoundation] Fix FileBag issue with associative arrays --- .../Component/HttpFoundation/FileBag.php | 5 ++++- .../HttpFoundation/Tests/FileBagTest.php | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index 722ec2a9c4a92..41f8c9269f49d 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -87,7 +87,10 @@ protected function convertFileInformation($file) $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); } } else { - $file = array_filter(array_map(array($this, 'convertFileInformation'), $file)); + $file = array_map(array($this, 'convertFileInformation'), $file); + if (array_keys($keys) === $keys) { + $file = array_filter($file); + } } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index 7d2902d325d46..b1bbba0d3f57c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -62,7 +62,7 @@ public function testShouldSetEmptyUploadedFilesToNull() public function testShouldRemoveEmptyUploadedFilesForMultiUpload() { - $bag = new FileBag(array('file' => array( + $bag = new FileBag(array('files' => array( 'name' => array(''), 'type' => array(''), 'tmp_name' => array(''), @@ -70,7 +70,20 @@ public function testShouldRemoveEmptyUploadedFilesForMultiUpload() 'size' => array(0), ))); - $this->assertSame(array(), $bag->get('file')); + $this->assertSame(array(), $bag->get('files')); + } + + public function testShouldNotRemoveEmptyUploadedFilesForAssociativeArray() + { + $bag = new FileBag(array('files' => array( + 'name' => array('file1' => ''), + 'type' => array('file1' => ''), + 'tmp_name' => array('file1' => ''), + 'error' => array('file1' => UPLOAD_ERR_NO_FILE), + 'size' => array('file1' => 0), + ))); + + $this->assertSame(array('file1' => null), $bag->get('files')); } public function testShouldConvertUploadedFilesWithPhpBug() From 6ed9919d24eda663e5e9bda720a06204f3b788e7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 24 Oct 2017 18:19:59 -0700 Subject: [PATCH 70/92] fixed $_ENV/$_SERVER precedence in test framework --- .../Bundle/FrameworkBundle/Test/KernelTestCase.php | 12 ++++++------ .../Component/DependencyInjection/Container.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index 800c1c9e33f9a..a121f483bda2b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -107,7 +107,7 @@ private static function getPhpUnitCliConfigArgument() protected static function getKernelClass() { if (isset($_SERVER['KERNEL_CLASS']) || isset($_ENV['KERNEL_CLASS'])) { - $class = isset($_SERVER['KERNEL_CLASS']) ? $_SERVER['KERNEL_CLASS'] : $_ENV['KERNEL_CLASS']; + $class = isset($_ENV['KERNEL_CLASS']) ? $_ENV['KERNEL_CLASS'] : $_SERVER['KERNEL_CLASS']; if (!class_exists($class)) { throw new \RuntimeException(sprintf('Class "%s" doesn\'t exist or cannot be autoloaded. Check that the KERNEL_CLASS value in phpunit.xml matches the fully-qualified class name of your Kernel or override the %s::createKernel() method.', $class, static::class)); } @@ -116,7 +116,7 @@ protected static function getKernelClass() } if (isset($_SERVER['KERNEL_DIR']) || isset($_ENV['KERNEL_DIR'])) { - $dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : $_ENV['KERNEL_DIR']; + $dir = isset($_ENV['KERNEL_DIR']) ? $_ENV['KERNEL_DIR'] : $_SERVER['KERNEL_DIR']; if (!is_dir($dir)) { $phpUnitDir = static::getPhpUnitXmlDir(); @@ -176,20 +176,20 @@ protected static function createKernel(array $options = array()) if (isset($options['environment'])) { $env = $options['environment']; - } elseif (isset($_SERVER['APP_ENV'])) { - $env = $_SERVER['APP_ENV']; } elseif (isset($_ENV['APP_ENV'])) { $env = $_ENV['APP_ENV']; + } elseif (isset($_SERVER['APP_ENV'])) { + $env = $_SERVER['APP_ENV']; } else { $env = 'test'; } if (isset($options['debug'])) { $debug = $options['debug']; - } elseif (isset($_SERVER['APP_DEBUG'])) { - $debug = $_SERVER['APP_DEBUG']; } elseif (isset($_ENV['APP_DEBUG'])) { $debug = $_ENV['APP_DEBUG']; + } elseif (isset($_SERVER['APP_DEBUG'])) { + $debug = $_SERVER['APP_DEBUG']; } else { $debug = true; } diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 703b57b574b7f..ffe162c74fe32 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -432,12 +432,12 @@ protected function getEnv($name) if (isset($this->envCache[$name]) || array_key_exists($name, $this->envCache)) { return $this->envCache[$name]; } - if (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) { - return $this->envCache[$name] = $_SERVER[$name]; - } if (isset($_ENV[$name])) { return $this->envCache[$name] = $_ENV[$name]; } + if (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) { + return $this->envCache[$name] = $_SERVER[$name]; + } if (false !== ($env = getenv($name)) && null !== $env) { // null is a possible value because of thread safety issues return $this->envCache[$name] = $env; } From 8579e24750abff70ac9c352dd8eb7c20fd6877cf Mon Sep 17 00:00:00 2001 From: Renato Mendes Figueiredo Date: Fri, 27 Oct 2017 14:47:38 +0200 Subject: [PATCH 71/92] [FrameworkBundle] Allow to disable assets via framework:assets xml configuration --- .../Resources/config/schema/symfony-1.0.xsd | 1 + .../Fixtures/php/assets_disabled.php | 7 +++++++ .../Fixtures/xml/assets_disabled.xml | 12 ++++++++++++ .../Fixtures/yml/assets_disabled.yml | 3 +++ .../DependencyInjection/FrameworkExtensionTest.php | 7 +++++++ 5 files changed, 30 insertions(+) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index d6138133cf2ea..bde02d5875d5b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -138,6 +138,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php new file mode 100644 index 0000000000000..3ade7047a100c --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php @@ -0,0 +1,7 @@ +loadFromExtension('framework', array( + 'assets' => array( + 'enabled' => false, + ), +)); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml new file mode 100644 index 0000000000000..0ce70d275c324 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml new file mode 100644 index 0000000000000..17ba4e90afb75 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml @@ -0,0 +1,3 @@ +framework: + assets: + enabled: false diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 44a853dd148eb..27893757c4f84 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -423,6 +423,13 @@ public function testAssetsDefaultVersionStrategyAsService() $this->assertEquals('assets.custom_version_strategy', (string) $defaultPackage->getArgument(1)); } + public function testAssetsCanBeDisabled() + { + $container = $this->createContainerFromFile('assets_disabled'); + + $this->assertFalse($container->has('templating.helper.assets'), 'The templating.helper.assets helper service is removed when assets are disabled.'); + } + public function testWebLink() { $container = $this->createContainerFromFile('web_link'); From c9174dff7c3eb92de0df68240e12db8790fd4625 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 27 Oct 2017 19:43:59 +0200 Subject: [PATCH 72/92] [TwigBridge] Fix template paths in profiler --- .../Bridge/Twig/DataCollector/TwigDataCollector.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php index 66f2a764e7617..c1956974f8f99 100644 --- a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php +++ b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php @@ -63,9 +63,18 @@ public function lateCollect() $this->data['template_paths'] = array(); $templateFinder = function (Profile $profile) use (&$templateFinder) { - if ($profile->isTemplate() && $template = $this->twig->load($profile->getName())->getSourceContext()->getPath()) { - $this->data['template_paths'][$profile->getName()] = $template; + if ($profile->isTemplate()) { + try { + $template = $this->twig->load($name = $profile->getName()); + } catch (\Twig_Error_Loader $e) { + $template = null; + } + + if (null !== $template && '' !== $path = $template->getSourceContext()->getPath()) { + $this->data['template_paths'][$name] = $path; + } } + foreach ($profile as $p) { $templateFinder($p); } From 8ac8f9d2a8dc4aa9e0949bd80ec849bef00e3ba4 Mon Sep 17 00:00:00 2001 From: Arkadius Stefanski Date: Fri, 27 Oct 2017 20:50:34 +0200 Subject: [PATCH 73/92] [TwigBridge] Re-add Bootstrap 3 Checkbox Layout --- .../Resources/views/Form/bootstrap_3_layout.html.twig | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index 07ca81f5061ee..1601684b1a8fc 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -123,10 +123,15 @@ {%- endblock datetime_row %} {% block checkbox_row -%} +{% spaceless %}
- {{- form_widget(form) -}} - {{- form_errors(form) -}} +
+
+ {{- form_widget(form) -}} + {{- form_errors(form) -}} +
+{% endspaceless %} {%- endblock checkbox_row %} {% block radio_row -%} From 14c62dad5f93dd76f8f67cd239634c3c84e94250 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Fri, 27 Oct 2017 16:39:37 -0400 Subject: [PATCH 74/92] fix CachePoolPrunerPass to use correct command service id --- .../DependencyInjection/Compiler/CachePoolPrunerPass.php | 3 ++- .../Compiler/CachePoolPrunerPassTest.php | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPrunerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPrunerPass.php index cd79f58ce84cd..d02e2c372c3d4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPrunerPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CachePoolPrunerPass.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; +use Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand; use Symfony\Component\Cache\PruneableInterface; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -26,7 +27,7 @@ class CachePoolPrunerPass implements CompilerPassInterface private $cacheCommandServiceId; private $cachePoolTag; - public function __construct($cacheCommandServiceId = 'cache.command.pool_pruner', $cachePoolTag = 'cache.pool') + public function __construct($cacheCommandServiceId = CachePoolPruneCommand::class, $cachePoolTag = 'cache.pool') { $this->cacheCommandServiceId = $cacheCommandServiceId; $this->cachePoolTag = $cachePoolTag; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.php index 51dba222a3a44..0006070f51ddb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPrunerPass; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\PhpFilesAdapter; @@ -24,7 +25,7 @@ class CachePoolPrunerPassTest extends TestCase public function testCompilerPassReplacesCommandArgument() { $container = new ContainerBuilder(); - $container->register('cache.command.pool_pruner')->addArgument(array()); + $container->register(CachePoolPruneCommand::class)->addArgument(array()); $container->register('pool.foo', FilesystemAdapter::class)->addTag('cache.pool'); $container->register('pool.bar', PhpFilesAdapter::class)->addTag('cache.pool'); @@ -35,7 +36,7 @@ public function testCompilerPassReplacesCommandArgument() 'pool.foo' => new Reference('pool.foo'), 'pool.bar' => new Reference('pool.bar'), ); - $argument = $container->getDefinition('cache.command.pool_pruner')->getArgument(0); + $argument = $container->getDefinition(CachePoolPruneCommand::class)->getArgument(0); $this->assertInstanceOf(IteratorArgument::class, $argument); $this->assertEquals($expected, $argument->getValues()); @@ -51,7 +52,7 @@ public function testCompilePassIsIgnoredIfCommandDoesNotExist() $container ->expects($this->atLeastOnce()) ->method('hasDefinition') - ->with('cache.command.pool_pruner') + ->with(CachePoolPruneCommand::class) ->will($this->returnValue(false)); $container @@ -73,7 +74,7 @@ public function testCompilePassIsIgnoredIfCommandDoesNotExist() public function testCompilerPassThrowsOnInvalidDefinitionClass() { $container = new ContainerBuilder(); - $container->register('cache.command.pool_pruner')->addArgument(array()); + $container->register(CachePoolPruneCommand::class)->addArgument(array()); $container->register('pool.not-found', NotFound::class)->addTag('cache.pool'); $pass = new CachePoolPrunerPass(); From 206fb743815cb6af748232f885c21973b0bb2600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 26 Oct 2017 08:11:55 +0200 Subject: [PATCH 75/92] Config: mark builder property deprecated --- UPGRADE-3.4.md | 5 +++++ .../Component/Config/Definition/Builder/TreeBuilder.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/UPGRADE-3.4.md b/UPGRADE-3.4.md index 1b9a40c452dde..0119ca02f5577 100644 --- a/UPGRADE-3.4.md +++ b/UPGRADE-3.4.md @@ -1,6 +1,11 @@ UPGRADE FROM 3.3 to 3.4 ======================= +Config +------ + + * Using protected builder property of TreeBuilder is deprecated and property will be removed in 4.0. + DependencyInjection ------------------- diff --git a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php index 5d02848a09003..384477c501082 100644 --- a/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php +++ b/src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php @@ -22,6 +22,10 @@ class TreeBuilder implements NodeParentInterface { protected $tree; protected $root; + + /** + * @deprecated since 3.4. To be removed in 4.0 + */ protected $builder; /** From e7da1606f0781640a1b839feba6ff111edbde971 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 24 Oct 2017 20:45:13 +0100 Subject: [PATCH 76/92] Ensure DeprecationErrorHandler::collectDeprecations() is triggered --- .../PhpUnit/Legacy/SymfonyTestsListenerTrait.php | 1 + src/Symfony/Bridge/PhpUnit/bootstrap.php | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php index 6a0d9aec99284..43394cea79706 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php @@ -262,6 +262,7 @@ public function endTest($test, $time) if ($this->runsInSeparateProcess) { $deprecations = file_get_contents($this->runsInSeparateProcess); unlink($this->runsInSeparateProcess); + putenv('SYMFONY_DEPRECATIONS_SERIALIZE'); foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) { if ($deprecation[0]) { trigger_error(serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false))), E_USER_DEPRECATED); diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php index 2803caf02bcae..a265a129e6fdc 100644 --- a/src/Symfony/Bridge/PhpUnit/bootstrap.php +++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -12,12 +12,15 @@ use Doctrine\Common\Annotations\AnnotationRegistry; use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; +// Detect if we need to serialize deprecations to a file. +if ($file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { + DeprecationErrorHandler::collectDeprecations($file); + + return; +} + // Detect if we're loaded by an actual run of phpunit if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) { - if ($ser = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { - DeprecationErrorHandler::collectDeprecations($ser); - } - return; } From 1e7d4877b7301f8a5ccae0306617cd7a3c2dc057 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 28 Oct 2017 18:56:07 +0200 Subject: [PATCH 77/92] Minor fix in UPGRADE files --- UPGRADE-3.4.md | 2 +- UPGRADE-4.0.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPGRADE-3.4.md b/UPGRADE-3.4.md index 0119ca02f5577..b3058828ce3f6 100644 --- a/UPGRADE-3.4.md +++ b/UPGRADE-3.4.md @@ -4,7 +4,7 @@ UPGRADE FROM 3.3 to 3.4 Config ------ - * Using protected builder property of TreeBuilder is deprecated and property will be removed in 4.0. + * The protected `TreeBuilder::$builder` property is deprecated and will be removed in 4.0. DependencyInjection ------------------- diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 4132d06ab6146..e4aec3709008d 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -6,6 +6,11 @@ ClassLoader * The component has been removed. Use Composer instead. +Config +------ + + * The protected `TreeBuilder::$builder` property has been removed. + Console ------- From 7a81576b97da2ab7ebd67cf6aeb3aacaf5d627ad Mon Sep 17 00:00:00 2001 From: Michel Weimerskirch Date: Sat, 28 Oct 2017 16:13:03 +0200 Subject: [PATCH 78/92] Fixed a few spelling mistakes in Luxembourgish translation Also adjusted trans-unit "51" to commit #21335 --- .../Validator/Resources/translations/validators.lb.xlf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index d631797018bb8..668b2a631e9f3 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -140,7 +140,7 @@ This value is not a valid language. - Dëse Wäert aentsprécht kenger gëlteger Sprooch. + Dëse Wäert entsprécht kenger gëlteger Sprooch. This value is not a valid locale. @@ -180,7 +180,7 @@ This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Dëse Wäert sollt exactly {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn. + Dëse Wäert sollt exakt {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn. The file was only partially uploaded. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini. - Et gouf keen temporären Dossier an der php.ini konfiguréiert. + Et gouf keen temporären Dossier an der php.ini konfiguréiert oder den temporären Dossier existéiert net. Cannot write temporary file to disk. @@ -304,7 +304,7 @@ The host could not be resolved. - Den Domain-Numm konnt net opgeléist ginn. + Den Host-Numm konnt net opgeléist ginn. This value does not match the expected {{ charset }} charset. From a913f705831f5e8bbbab5623ed09c9959769ecb5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 28 Oct 2017 20:22:29 +0200 Subject: [PATCH 79/92] [HttpFoundation] Mark new methods on Response as final --- src/Symfony/Component/HttpFoundation/Response.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 765e388520f71..9c98203147247 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -612,6 +612,8 @@ public function setPublic() * @param bool $immutable enables or disables the immutable directive * * @return $this + * + * @final */ public function setImmutable($immutable = true) { @@ -628,6 +630,8 @@ public function setImmutable($immutable = true) * Returns true if the response is marked as "immutable". * * @return bool returns true if the response is marked as "immutable"; otherwise false + * + * @final */ public function isImmutable() { From d297e2760026f2898a400c3dcc9da50841fcd802 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Wed, 18 Oct 2017 16:30:35 +0200 Subject: [PATCH 80/92] [FrameworkBundle] Do not load property_access.xml if the component isn't installed --- .../DependencyInjection/FrameworkExtension.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 85a1a9ba208f3..1d2eb1d8b3c34 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -63,9 +63,6 @@ public function load(array $configs, ContainerBuilder $container) // will be used and everything will still work as expected. $loader->load('translation.xml'); - // Property access is used by both the Form and the Validator component - $loader->load('property_access.xml'); - $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); @@ -129,7 +126,7 @@ public function load(array $configs, ContainerBuilder $container) } $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader); - $this->registerPropertyAccessConfiguration($config['property_access'], $container); + $this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader); if (isset($config['serializer'])) { $this->registerSerializerConfiguration($config['serializer'], $container, $loader); @@ -852,8 +849,14 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde } } - private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container) + private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { + if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) { + return; + } + + $loader->load('property_access.xml'); + $container ->getDefinition('property_accessor') ->replaceArgument(0, $config['magic_call']) @@ -900,6 +903,11 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $loader->load('serializer.xml'); $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); + if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) { + $container->removeAlias('serializer.property_accessor'); + $container->removeDefinition('serializer.normalizer.object'); + } + $serializerLoaders = array(); if (isset($config['enable_annotations']) && $config['enable_annotations']) { $annotationLoader = new Definition( From 8df6787e7a8a8348551335fea6816945afa9b243 Mon Sep 17 00:00:00 2001 From: Amrouche Hamza Date: Sun, 29 Oct 2017 08:35:26 +0100 Subject: [PATCH 81/92] [SecurityBundle] hotfix: update phpdocs on logout url --- .../SecurityBundle/DataCollector/SecurityDataCollector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php index ad65b51d60f90..6ac33dbb925ff 100644 --- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php +++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php @@ -169,9 +169,9 @@ public function getTokenClass() } /** - * Get the provider key (i.e. the name of the active firewall). + * Get the logout URL. * - * @return string The provider key + * @return string The logout URL */ public function getLogoutUrl() { From c5c7a2304d1b46dda990d1e5bf34283bde499f43 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Sun, 29 Oct 2017 16:04:35 +0000 Subject: [PATCH 82/92] Do not activate the cache if Doctrine's cache is not present --- .../FrameworkBundle/DependencyInjection/Configuration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 14c61e1395323..7c7cc59142173 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; use Doctrine\Common\Annotations\Annotation; +use Doctrine\Common\Cache\Cache; use Symfony\Bundle\FullStack; use Symfony\Component\Asset\Package; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; @@ -741,7 +742,7 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode) ->info('annotation configuration') ->{class_exists(Annotation::class) ? 'canBeDisabled' : 'canBeEnabled'}() ->children() - ->scalarNode('cache')->defaultValue('php_array')->end() + ->scalarNode('cache')->defaultValue(interface_exists(Cache::class) ? 'php_array' : 'none')->end() ->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end() ->booleanNode('debug')->defaultValue($this->debug)->end() ->end() From 4bb9d8207f76b8760ee0023790065273b5a44a12 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 29 Oct 2017 13:47:23 -0400 Subject: [PATCH 83/92] Fixing a bug where non-existent classes would cause issues --- .../Command/ContainerDebugCommand.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index 810c9972b559d..21d1e6d3c9976 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -238,7 +238,18 @@ public function filterToServiceTypes($serviceId) return false; } - // see if the class exists (only need to trigger autoload once) - return class_exists($serviceId) || interface_exists($serviceId, false); + // if the id has a \, assume it is a class + if (false !== strpos($serviceId, '\\')) { + return true; + } + + try { + $r = new \ReflectionClass($serviceId); + + return true; + } catch (\ReflectionException $e) { + // the service id is not a valid class/interface + return false; + } } } From a1863c3b7c29cd8b0fbb2225fe95f97a4c3478d7 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Sun, 29 Oct 2017 21:05:50 +0100 Subject: [PATCH 84/92] [VarDumper] HtmlDumper: fix collapsing nodes with depth <= maxDepth --- src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php index e554d4ae5fe1d..37c1a1a468b1c 100644 --- a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php @@ -383,8 +383,9 @@ function xpathString(str) { x += elt.parentNode.getAttribute('data-depth')/1; } elt.setAttribute('data-depth', x); - if (elt.className ? 'sf-dump-expanded' !== elt.className : (x > options.maxDepth)) { - elt.className = 'sf-dump-expanded'; + var className = elt.className; + elt.className = 'sf-dump-expanded'; + if (className ? 'sf-dump-expanded' !== className : (x > options.maxDepth)) { toggle(a); } } else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) { From e55c67ad178bc6ff8c5b92ccb650cc303e934459 Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Fri, 27 Oct 2017 04:40:00 +0300 Subject: [PATCH 85/92] [TwigBridge] Bootstrap 4 form theme fixes --- .../Twig/Resources/views/Form/bootstrap_4_layout.html.twig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig index 7dda32ace2fc4..f9cb62209daf3 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig @@ -70,11 +70,12 @@ {# Labels #} {% block form_label -%} - {%- if expanded is defined and expanded -%} + {%- if compound is defined and compound -%} {%- set element = 'legend' -%} {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-legend')|trim}) -%} + {%- else -%} + {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%} {%- endif -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%} {{- parent() -}} {%- endblock form_label %} @@ -107,7 +108,7 @@ {# Rows #} {% block form_row -%} - {%- if expanded is defined and expanded -%} + {%- if compound is defined and compound -%} {%- set element = 'fieldset' -%} {%- endif -%} <{{ element|default('div') }} class="form-group"> From e375e9ae81046e93d722761e80c06e7666904397 Mon Sep 17 00:00:00 2001 From: Dany Maillard Date: Mon, 30 Oct 2017 16:50:58 +1000 Subject: [PATCH 86/92] Fix DST --- .../VarDumper/Tests/Caster/DateCasterTest.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php index d15348937e5e9..96c167d3e44a3 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php @@ -187,10 +187,10 @@ public function provideIntervals() return array( array('PT0S', 0, 0, '0s', '0s'), array('PT0S', 0.1, 0, $withMs ? '+ 00:00:00.100' : '0s', '%is'), - array('PT1S', 0, 0, '+ 00:00:01'.$ms, '1s'), - array('PT2M', 0, 0, '+ 00:02:00'.$ms, '120s'), - array('PT3H', 0, 0, '+ 03:00:00'.$ms, '10 800s'), - array('P4D', 0, 0, '+ 4d', '34%x %x00s'), // %x to account for DST + array('PT1S', 0, 0, '+ 00:00:01'.$ms, '%is'), + array('PT2M', 0, 0, '+ 00:02:00'.$ms, '%is'), + array('PT3H', 0, 0, '+ 03:00:00'.$ms, '%ss'), + array('P4D', 0, 0, '+ 4d', '%ss'), array('P5M', 0, 0, '+ 5m', null), array('P6Y', 0, 0, '+ 6y', null), array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null), @@ -201,10 +201,10 @@ public function provideIntervals() array('PT0S', 0, 1, '0s', '0s'), array('PT0S', 0.1, 1, $withMs ? '- 00:00:00.100' : '0s', '%is'), - array('PT1S', 0, 1, '- 00:00:01'.$ms, '-1s'), - array('PT2M', 0, 1, '- 00:02:00'.$ms, '-120s'), - array('PT3H', 0, 1, '- 03:00:00'.$ms, '-10 800s'), - array('P4D', 0, 1, '- 4d', '-345 600s'), + array('PT1S', 0, 1, '- 00:00:01'.$ms, '%is'), + array('PT2M', 0, 1, '- 00:02:00'.$ms, '%is'), + array('PT3H', 0, 1, '- 03:00:00'.$ms, '%ss'), + array('P4D', 0, 1, '- 4d', '%ss'), array('P5M', 0, 1, '- 5m', null), array('P6Y', 0, 1, '- 6y', null), array('P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06'.$ms, null), @@ -252,7 +252,7 @@ public function testDumpTimeZoneExcludingVerbosity($timezone, $expected) } EODUMP; - $this->assertDumpEquals($xDump, $timezone, Caster::EXCLUDE_VERBOSE); + $this->assertDumpMatchesFormat($xDump, $timezone, Caster::EXCLUDE_VERBOSE); } /** @@ -275,7 +275,7 @@ public function testCastTimeZone($timezone, $xTimezone, $xRegion) ] EODUMP; - $this->assertDumpEquals($xDump, $cast); + $this->assertDumpMatchesFormat($xDump, $cast); $xDump = << Date: Fri, 27 Oct 2017 17:36:31 +0200 Subject: [PATCH 87/92] [HttpKernel] Move services reset to Kernel --- .../Resources/config/services.xml | 6 +- .../ResettableServicePass.php | 14 ++-- .../DependencyInjection/ServicesResetter.php | 39 ++++++++++ .../EventListener/ServiceResetListener.php | 50 ------------ src/Symfony/Component/HttpKernel/Kernel.php | 34 +++++--- .../ResettableServicePassTest.php | 26 ++----- .../ServicesResetterTest.php | 42 ++++++++++ .../ServiceResetListenerTest.php | 77 ------------------- .../Component/HttpKernel/Tests/KernelTest.php | 46 ++++++++++- 9 files changed, 164 insertions(+), 170 deletions(-) create mode 100644 src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php delete mode 100644 src/Symfony/Component/HttpKernel/EventListener/ServiceResetListener.php create mode 100644 src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/EventListener/ServiceResetListenerTest.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml index 31ca2075e4a98..da0e5b55edaf8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml @@ -75,10 +75,6 @@
- - - - - + diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php index 56cd059284afe..52cc3a4a8383f 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ResettableServicePass.php @@ -17,7 +17,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\EventListener\ServiceResetListener; /** * @author Alexander M. Turek @@ -26,9 +25,6 @@ class ResettableServicePass implements CompilerPassInterface { private $tagName; - /** - * @param string $tagName - */ public function __construct($tagName = 'kernel.reset') { $this->tagName = $tagName; @@ -39,7 +35,7 @@ public function __construct($tagName = 'kernel.reset') */ public function process(ContainerBuilder $container) { - if (!$container->has(ServiceResetListener::class)) { + if (!$container->has('services_resetter')) { return; } @@ -57,13 +53,13 @@ public function process(ContainerBuilder $container) } if (empty($services)) { - $container->removeDefinition(ServiceResetListener::class); + $container->removeDefinition('services_resetter'); return; } - $container->findDefinition(ServiceResetListener::class) - ->replaceArgument(0, new IteratorArgument($services)) - ->replaceArgument(1, $methods); + $container->findDefinition('services_resetter') + ->setArgument(0, new IteratorArgument($services)) + ->setArgument(1, $methods); } } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php new file mode 100644 index 0000000000000..b82d2fef3c056 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +/** + * Resets provided services. + * + * @author Alexander M. Turek + * @author Nicolas Grekas + * + * @internal + */ +class ServicesResetter +{ + private $resettableServices; + private $resetMethods; + + public function __construct(\Traversable $resettableServices, array $resetMethods) + { + $this->resettableServices = $resettableServices; + $this->resetMethods = $resetMethods; + } + + public function reset() + { + foreach ($this->resettableServices as $id => $service) { + $service->{$this->resetMethods[$id]}(); + } + } +} diff --git a/src/Symfony/Component/HttpKernel/EventListener/ServiceResetListener.php b/src/Symfony/Component/HttpKernel/EventListener/ServiceResetListener.php deleted file mode 100644 index cf6d15930315f..0000000000000 --- a/src/Symfony/Component/HttpKernel/EventListener/ServiceResetListener.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Clean up services between requests. - * - * @author Alexander M. Turek - */ -class ServiceResetListener implements EventSubscriberInterface -{ - private $services; - private $resetMethods; - - public function __construct(\Traversable $services, array $resetMethods) - { - $this->services = $services; - $this->resetMethods = $resetMethods; - } - - public function onKernelTerminate() - { - foreach ($this->services as $id => $service) { - $method = $this->resetMethods[$id]; - $service->$method(); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return array( - KernelEvents::TERMINATE => array('onKernelTerminate', -2048), - ); - } -} diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index cb143d327cb07..f4e4fb7a5171b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -64,6 +64,8 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $projectDir; private $warmupDir; + private $requestStackSize = 0; + private $resetServices = false; const VERSION = '3.4.0-DEV'; const VERSION_ID = 30400; @@ -99,6 +101,8 @@ public function __clone() $this->booted = false; $this->container = null; + $this->requestStackSize = 0; + $this->resetServices = false; } /** @@ -107,8 +111,20 @@ public function __clone() public function boot() { if (true === $this->booted) { + if (!$this->requestStackSize && $this->resetServices) { + if ($this->container->has('services_resetter')) { + $this->container->get('services_resetter')->reset(); + } + $this->resetServices = false; + } + return; } + if ($this->debug && !isset($_SERVER['SHELL_VERBOSITY'])) { + putenv('SHELL_VERBOSITY=3'); + $_ENV['SHELL_VERBOSITY'] = 3; + $_SERVER['SHELL_VERBOSITY'] = 3; + } if ($this->loadClassCache) { $this->doLoadClassCache($this->loadClassCache[0], $this->loadClassCache[1]); @@ -169,6 +185,8 @@ public function shutdown() } $this->container = null; + $this->requestStackSize = 0; + $this->resetServices = false; } /** @@ -176,17 +194,15 @@ public function shutdown() */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { - if (false === $this->booted) { - if ($this->debug && !isset($_SERVER['SHELL_VERBOSITY'])) { - putenv('SHELL_VERBOSITY=3'); - $_ENV['SHELL_VERBOSITY'] = 3; - $_SERVER['SHELL_VERBOSITY'] = 3; - } + $this->boot(); + ++$this->requestStackSize; + $this->resetServices = true; - $this->boot(); + try { + return $this->getHttpKernel()->handle($request, $type, $catch); + } finally { + --$this->requestStackSize; } - - return $this->getHttpKernel()->handle($request, $type, $catch); } /** diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php index c998ef2eaf086..f7ea16dbfb036 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ResettableServicePassTest.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass; -use Symfony\Component\HttpKernel\EventListener\ServiceResetListener; +use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; use Symfony\Component\HttpKernel\Tests\Fixtures\ClearableService; use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService; @@ -24,14 +24,14 @@ public function testCompilerPass() ->setPublic(true) ->addTag('kernel.reset', array('method' => 'clear')); - $container->register(ServiceResetListener::class) + $container->register('services_resetter', ServicesResetter::class) ->setPublic(true) ->setArguments(array(null, array())); - $container->addCompilerPass(new ResettableServicePass('kernel.reset')); + $container->addCompilerPass(new ResettableServicePass()); $container->compile(); - $definition = $container->getDefinition(ServiceResetListener::class); + $definition = $container->getDefinition('services_resetter'); $this->assertEquals( array( @@ -57,9 +57,9 @@ public function testMissingMethod() $container = new ContainerBuilder(); $container->register(ResettableService::class) ->addTag('kernel.reset'); - $container->register(ServiceResetListener::class) + $container->register('services_resetter', ServicesResetter::class) ->setArguments(array(null, array())); - $container->addCompilerPass(new ResettableServicePass('kernel.reset')); + $container->addCompilerPass(new ResettableServicePass()); $container->compile(); } @@ -67,22 +67,12 @@ public function testMissingMethod() public function testCompilerPassWithoutResetters() { $container = new ContainerBuilder(); - $container->register(ServiceResetListener::class) + $container->register('services_resetter', ServicesResetter::class) ->setArguments(array(null, array())); $container->addCompilerPass(new ResettableServicePass()); $container->compile(); - $this->assertFalse($container->has(ServiceResetListener::class)); - } - - public function testCompilerPassWithoutListener() - { - $container = new ContainerBuilder(); - $container->addCompilerPass(new ResettableServicePass()); - - $container->compile(); - - $this->assertFalse($container->has(ServiceResetListener::class)); + $this->assertFalse($container->has('services_resetter')); } } diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php new file mode 100644 index 0000000000000..47c62abd0d998 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; +use Symfony\Component\HttpKernel\Tests\Fixtures\ClearableService; +use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService; + +class ServicesResetterTest extends TestCase +{ + protected function setUp() + { + ResettableService::$counter = 0; + ClearableService::$counter = 0; + } + + public function testResetServices() + { + $resetter = new ServicesResetter(new \ArrayIterator(array( + 'id1' => new ResettableService(), + 'id2' => new ClearableService(), + )), array( + 'id1' => 'reset', + 'id2' => 'clear', + )); + + $resetter->reset(); + + $this->assertEquals(1, ResettableService::$counter); + $this->assertEquals(1, ClearableService::$counter); + } +} diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ServiceResetListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ServiceResetListenerTest.php deleted file mode 100644 index 603d11b2bf412..0000000000000 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ServiceResetListenerTest.php +++ /dev/null @@ -1,77 +0,0 @@ -buildContainer(); - $container->get('reset_subscriber')->onKernelTerminate(); - - $this->assertEquals(0, ResettableService::$counter); - $this->assertEquals(0, ClearableService::$counter); - } - - public function testResetServicesPartially() - { - $container = $this->buildContainer(); - $container->get('one'); - $container->get('reset_subscriber')->onKernelTerminate(); - - $this->assertEquals(1, ResettableService::$counter); - $this->assertEquals(0, ClearableService::$counter); - } - - public function testResetServicesTwice() - { - $container = $this->buildContainer(); - $container->get('one'); - $container->get('reset_subscriber')->onKernelTerminate(); - $container->get('two'); - $container->get('reset_subscriber')->onKernelTerminate(); - - $this->assertEquals(2, ResettableService::$counter); - $this->assertEquals(1, ClearableService::$counter); - } - - /** - * @return ContainerBuilder - */ - private function buildContainer() - { - $container = new ContainerBuilder(); - $container->register('one', ResettableService::class)->setPublic(true); - $container->register('two', ClearableService::class)->setPublic(true); - - $container->register('reset_subscriber', ServiceResetListener::class) - ->setPublic(true) - ->addArgument(new IteratorArgument(array( - 'one' => new Reference('one', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE), - 'two' => new Reference('two', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE), - ))) - ->addArgument(array( - 'one' => 'reset', - 'two' => 'clear', - )); - - $container->compile(); - - return $container; - } -} diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index fd7f6f09da13d..21342f026e4d7 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -18,6 +18,8 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Config\EnvParametersResource; +use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass; +use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; @@ -25,6 +27,7 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest; use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName; use Symfony\Component\HttpKernel\Tests\Fixtures\KernelWithoutBundles; +use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService; class KernelTest extends TestCase { @@ -840,6 +843,38 @@ public function testKernelPass() $this->assertTrue($kernel->getContainer()->getParameter('test.processed')); } + public function testServicesResetter() + { + $httpKernelMock = $this->getMockBuilder(HttpKernelInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $httpKernelMock + ->expects($this->exactly(2)) + ->method('handle'); + + $kernel = new CustomProjectDirKernel(function ($container) { + $container->addCompilerPass(new ResettableServicePass()); + $container->register('one', ResettableService::class) + ->setPublic(true) + ->addTag('kernel.reset', array('method' => 'reset')); + $container->register('services_resetter', ServicesResetter::class)->setPublic(true); + }, $httpKernelMock, 'resetting'); + + ResettableService::$counter = 0; + + $request = new Request(); + + $kernel->handle($request); + $kernel->getContainer()->get('one'); + + $this->assertEquals(0, ResettableService::$counter); + $this->assertFalse($kernel->getContainer()->initialized('services_resetter')); + + $kernel->handle($request); + + $this->assertEquals(1, ResettableService::$counter); + } + /** * Returns a mock for the BundleInterface. * @@ -941,13 +976,15 @@ class CustomProjectDirKernel extends Kernel { private $baseDir; private $buildContainer; + private $httpKernel; - public function __construct(\Closure $buildContainer = null) + public function __construct(\Closure $buildContainer = null, HttpKernelInterface $httpKernel = null, $name = 'custom') { - parent::__construct('custom', true); + parent::__construct($name, true); $this->baseDir = 'foo'; $this->buildContainer = $buildContainer; + $this->httpKernel = $httpKernel; } public function registerBundles() @@ -975,6 +1012,11 @@ protected function build(ContainerBuilder $container) $build($container); } } + + protected function getHttpKernel() + { + return $this->httpKernel; + } } class PassKernel extends CustomProjectDirKernel implements CompilerPassInterface From f84749f7455f0874a1f526b2e4ef7e35aacd8fdb Mon Sep 17 00:00:00 2001 From: Arkadius Stefanski Date: Mon, 30 Oct 2017 12:59:08 +0100 Subject: [PATCH 88/92] [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless --- .../bootstrap_3_horizontal_layout.html.twig | 44 +++++++++-------- .../views/Form/bootstrap_3_layout.html.twig | 47 +++++++++---------- .../bootstrap_4_horizontal_layout.html.twig | 22 ++++++--- .../views/Form/bootstrap_4_layout.html.twig | 4 +- src/Symfony/Bridge/Twig/composer.json | 2 +- ...AbstractBootstrap3HorizontalLayoutTest.php | 9 ++++ ...AbstractBootstrap4HorizontalLayoutTest.php | 15 ++++-- .../Tests/AbstractBootstrap4LayoutTest.php | 6 +-- 8 files changed, 88 insertions(+), 61 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig index 478de622da435..f0c4626daf45e 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig @@ -8,14 +8,12 @@ {# Labels #} {% block form_label -%} -{% spaceless %} - {% if label is same as(false) %} + {%- if label is same as(false) -%}
- {% else %} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %} + {%- else -%} + {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} {{- parent() -}} - {% endif %} -{% endspaceless %} + {%- endif -%} {%- endblock form_label %} {% block form_label_class -%} @@ -35,27 +33,33 @@ col-sm-2 {%- endblock form_row %} {% block submit_row -%} -{% spaceless %} -
-
+
{#--#} +
{#--#}
- {{ form_widget(form) }} -
+ {{- form_widget(form) -}} +
{#--#}
-{% endspaceless %} -{% endblock submit_row %} +{%- endblock submit_row %} {% block reset_row -%} -{% spaceless %} -
-
+
{#--#} +
{#--#}
- {{ form_widget(form) }} -
+ {{- form_widget(form) -}} +
{#--#}
-{% endspaceless %} -{% endblock reset_row %} +{%- endblock reset_row %} {% block form_group_class -%} col-sm-10 {%- endblock form_group_class %} + +{% block checkbox_row -%} +
{#--#} +
{#--#} +
+ {{- form_widget(form) -}} + {{- form_errors(form) -}} +
{#--#} +
+{%- endblock checkbox_row %} \ No newline at end of file diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index 1601684b1a8fc..64fc2a210ee3e 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -10,7 +10,7 @@ {%- endblock form_widget_simple %} {% block button_widget -%} - {% set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) %} + {%- set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) -%} {{- parent() -}} {%- endblock button_widget %} @@ -22,18 +22,18 @@
{{- form_label(form, null, { widget: parent() }) -}}
- {%- endif %} + {%- endif -%} {%- endblock checkbox_widget %} {% block radio_widget -%} {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {% if 'radio-inline' in parent_label_class %} + {%- if 'radio-inline' in parent_label_class -%} {{- form_label(form, null, { widget: parent() }) -}} - {% else -%} + {%- else -%}
{{- form_label(form, null, { widget: parent() }) -}}
- {%- endif %} + {%- endif -%} {%- endblock radio_widget %} {# Labels #} @@ -61,30 +61,30 @@ {{- block('checkbox_radio_label') -}} {%- endblock radio_label %} -{% block checkbox_radio_label %} +{% block checkbox_radio_label -%} {# Do not display the label if widget is not defined in order to prevent double label rendering #} - {% if widget is defined %} - {% if required %} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} - {% endif %} - {% if parent_label_class is defined %} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %} - {% endif %} - {% if label is not same as(false) and label is empty %} + {%- if widget is defined -%} + {%- if required -%} + {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} + {%- endif -%} + {%- if parent_label_class is defined -%} + {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) -%} + {%- endif -%} + {%- if label is not same as(false) and label is empty -%} {%- if label_format is not empty -%} - {% set label = label_format|replace({ + {%- set label = label_format|replace({ '%name%': name, '%id%': id, - }) %} + }) -%} {%- else -%} {% set label = name|humanize %} {%- endif -%} - {% endif %} + {%- endif -%} {{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}} - {% endif %} -{% endblock checkbox_radio_label %} + {%- endif -%} +{%- endblock checkbox_radio_label %} {# Rows #} @@ -123,15 +123,10 @@ {%- endblock datetime_row %} {% block checkbox_row -%} -{% spaceless %}
-
-
- {{- form_widget(form) -}} - {{- form_errors(form) -}} -
+ {{- form_widget(form) -}} + {{- form_errors(form) -}}
-{% endspaceless %} {%- endblock checkbox_row %} {% block radio_row -%} diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig index 32b4944bab3d0..0f0a0953282d8 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig @@ -47,23 +47,33 @@ col-sm-2 {%- endblock fieldset_form_row %} {% block submit_row -%} -
-
+
{#--#} +
{#--#}
{{- form_widget(form) -}} -
+
{#--#}
{%- endblock submit_row %} {% block reset_row -%} -
-
+
{#--#} +
{#--#}
{{- form_widget(form) -}} -
+
{#--#}
{%- endblock reset_row %} {% block form_group_class -%} col-sm-10 {%- endblock form_group_class %} + +{% block checkbox_row -%} +
{#--#} +
{#--#} +
+ {{- form_widget(form) -}} + {{- form_errors(form) -}} +
{#--#} +
+{%- endblock checkbox_row %} \ No newline at end of file diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig index f9cb62209daf3..2407b16d9b99a 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig @@ -24,9 +24,9 @@ {% block checkbox_widget -%} {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} {%- set attr = attr|merge({class: attr.class|default('form-check-input')}) -%} - {%- if 'checkbox-inline' in parent_label_class -%} + {% if 'checkbox-inline' in parent_label_class %} {{- form_label(form, null, { widget: parent() }) -}} - {%- else -%} + {% else -%}
{{- form_label(form, null, { widget: parent() }) -}}
diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 33ac7d5849c7c..320440fab05ea 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -24,7 +24,7 @@ "symfony/asset": "~2.8|~3.0|~4.0", "symfony/dependency-injection": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/form": "~3.4|~4.0", + "symfony/form": "~3.4-beta2|~4.0", "symfony/http-foundation": "^3.3.11|~4.0", "symfony/http-kernel": "~3.2|~4.0", "symfony/polyfill-intl-icu": "~1.0", diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php index 1273fa505bd2c..04b5b5836c650 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php @@ -154,4 +154,13 @@ public function testStartTagWithExtraAttributes() $this->assertSame('
', $html); } + + public function testCheckboxRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'); + $view = $form->createView(); + $html = $this->renderRow($view, array('label' => 'foo')); + + $this->assertMatchesXpath($html, '/div[@class="form-group"]/div[@class="col-sm-2" or @class="col-sm-10"]', 2); + } } diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php index 990fffbe94689..2833de7d91de0 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php @@ -26,8 +26,8 @@ public function testLabelOnForm() $html = $this->renderLabel($view); $this->assertMatchesXpath($html, -'/label - [@class="col-form-label col-sm-2 form-control-label required"] +'/legend + [@class="col-form-label col-sm-2 col-form-legend required"] [.="[trans]Name[/trans]"] ' ); @@ -118,7 +118,7 @@ public function testLegendOnExpandedType() $this->assertMatchesXpath($html, '/legend - [@class="col-sm-2 col-form-legend form-control-label required"] + [@class="col-sm-2 col-form-legend required"] [.="[trans]Custom label[/trans]"] ' ); @@ -178,4 +178,13 @@ public function testStartTagWithExtraAttributes() $this->assertSame('', $html); } + + public function testCheckboxRow() + { + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'); + $view = $form->createView(); + $html = $this->renderRow($view, array('label' => 'foo')); + + $this->assertMatchesXpath($html, '/div[@class="form-group row"]/div[@class="col-sm-2" or @class="col-sm-10"]', 2); + } } diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php index 35bd1203b3f80..84f93cc332037 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php @@ -28,8 +28,8 @@ public function testLabelOnForm() $html = $this->renderLabel($view); $this->assertMatchesXpath($html, -'/label - [@class="form-control-label required"] +'/legend + [@class="col-form-legend required"] [.="[trans]Name[/trans]"] ' ); @@ -120,7 +120,7 @@ public function testLegendOnExpandedType() $this->assertMatchesXpath($html, '/legend - [@class="col-form-legend form-control-label required"] + [@class="col-form-legend required"] [.="[trans]Custom label[/trans]"] ' ); From dbf544487f9037b0ea85c4f6fc0eb51b10725ccf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Oct 2017 12:08:07 -0700 Subject: [PATCH 89/92] fixed CS --- .../views/Form/bootstrap_4_horizontal_layout.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig index 0f0a0953282d8..e236d12cb709a 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig @@ -76,4 +76,4 @@ col-sm-10 {{- form_errors(form) -}} {#--#} -{%- endblock checkbox_row %} \ No newline at end of file +{%- endblock checkbox_row %} From 2280f844bf1326ec64aad103e84eed03049bc065 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Oct 2017 14:07:44 -0700 Subject: [PATCH 90/92] fixed tests --- src/Symfony/Bridge/Twig/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 320440fab05ea..9161fb345481a 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -24,7 +24,7 @@ "symfony/asset": "~2.8|~3.0|~4.0", "symfony/dependency-injection": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/form": "~3.4-beta2|~4.0", + "symfony/form": "~3.4-beta2|~4.0-beta2", "symfony/http-foundation": "^3.3.11|~4.0", "symfony/http-kernel": "~3.2|~4.0", "symfony/polyfill-intl-icu": "~1.0", From 4f86b02e5457029a74c8f6d62601f8c4ffe2a783 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Oct 2017 15:53:39 -0700 Subject: [PATCH 91/92] updated CHANGELOG for 4.0.0-BETA2 --- CHANGELOG-4.0.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/CHANGELOG-4.0.md b/CHANGELOG-4.0.md index 6bd14a10e3ba7..1779e607688d1 100644 --- a/CHANGELOG-4.0.md +++ b/CHANGELOG-4.0.md @@ -7,6 +7,52 @@ in 4.0 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/v4.0.0...v4.0.1 +* 4.0.0-BETA2 (2017-10-30) + + * bug #24728 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless (arkste) + * bug #24709 [HttpKernel] Move services reset to Kernel::handle()+boot() (nicolas-grekas) + * bug #24703 [TwigBridge] Bootstrap 4 form theme fixes (vudaltsov) + * bug #24744 debug:container --types: Fix bug with non-existent classes (weaverryan) + * bug #24747 [VarDumper] HtmlDumper: fix collapsing nodes with depth < maxDepth (ogizanagi) + * bug #24743 [FrameworkBundle] Do not activate the cache if Doctrine's cache is not present (sroze) + * bug #24605 [FrameworkBundle] Do not load property_access.xml if the component isn't installed (ogizanagi) + * bug #24710 [TwigBridge] Fix template paths in profiler (ro0NL) + * bug #24706 [DependencyInjection] Add the possibility to disable assets via xml (renatomefi) + * bug #24696 Ensure DeprecationErrorHandler::collectDeprecations() is triggered (alexpott) + * bug #24711 [TwigBridge] Re-add Bootstrap 3 Checkbox Layout (arkste) + * bug #24713 [FrameworkBundle] fix CachePoolPrunerPass to use correct command service id (kbond) + * bug #24686 Fix $_ENV/$_SERVER precedence in test framework (fabpot) + * bug #24691 [HttpFoundation] Fix caching of session-enabled pages (nicolas-grekas) + * feature #24677 [HttpFoundation] Allow DateTimeImmutable in Response setters (derrabus) + * bug #24694 [Intl] Allow passing null as a locale fallback (jakzal) + * bug #24606 [HttpFoundation] Fix FileBag issue with associative arrays (enumag) + * bug #24673 [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) (dunglas) + * bug #24684 [Security] remove invalid deprecation notice on AbstractGuardAuthenticator::supports() (kbond) + * bug #24681 Fix isolated error handling (alexpott) + * bug #24575 Ensure that PHPUnit's error handler is still working in isolated tests (alexpott) + * bug #24597 [PhpUnitBridge] fix deprecation triggering test detection (xabbuh) + * feature #24671 [DI] Handle container.autowiring.strict_mode to opt-out from legacy autowiring (nicolas-grekas) + * bug #24660 Escape trailing \ in QuestionHelper autocompletion (kamazee) + * bug #24624 [Security] Fix missing BC layer for AbstractGuardAuthenticator::getCredentials() (chalasr) + * bug #24598 Prefer line formatter on missing cli dumper (greg0ire) + * bug #24635 [DI] Register default env var provided types (ro0NL) + * bug #24620 [FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command (Jean-Beru) + * bug #24644 [Security] Fixed auth provider authenticate() cannot return void (glye) + * bug #24642 [Routing] Fix resource miss (dunglas) + * bug #24608 Adding the Form default theme files to be warmed up in Twig's cache (weaverryan) + * bug #24626 streamed response should return $this (DQNEO) + * feature #24631 [Form] Fix FormEvents::* constant and value matching (yceruto, javiereguiluz) + * bug #24630 [WebServerBundle] Prevent commands from being registered by convention (chalasr) + * bug #24589 Username and password in basic auth are allowed to contain '.' (Richard Quadling) + * bug #24566 Fixed unsetting from loosely equal keys OrderedHashMap (maryo) + * bug #24570 [Debug] Fix same vendor detection in class loader (Jean-Beru) + * bug #24573 Fixed pathinfo calculation for requests starting with a question mark. (syzygymsu) + * bug #24565 [Serializer] YamlEncoder: throw if the Yaml component isn't installed (dunglas) + * bug #24563 [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed (dunglas) + * bug #24571 [PropertyInfo] Add support for the iterable type (dunglas) + * bug #24579 pdo session fix (mxp100) + * bug #24536 [Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails (kbond) + * 4.0.0-BETA1 (2017-10-19) * feature #24583 Adding a new debug:autowiring command (weaverryan) From cfdf415b51f4164121d8de60fe0e17c1e64e14aa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Oct 2017 15:53:48 -0700 Subject: [PATCH 92/92] updated VERSION for 4.0.0-BETA2 --- 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 d935ade836a1f..ff0964009ddab 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.0.0-DEV'; + const VERSION = '4.0.0-BETA2'; const VERSION_ID = 40000; const MAJOR_VERSION = 4; const MINOR_VERSION = 0; const RELEASE_VERSION = 0; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = 'BETA2'; const END_OF_MAINTENANCE = '07/2018'; const END_OF_LIFE = '01/2019';