From b0253e58ea136aeab6fabb13de63aef4ea1af8e1 Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Fri, 5 Oct 2018 17:13:57 +0300 Subject: [PATCH 1/6] Replace deprecated validateValue with validate --- .../Component/Validator/Context/ExecutionContextInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php index d38d33747a..548a4db1c1 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -88,7 +88,7 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface * { * $validator = $this->context->getValidator(); * - * $violations = $validator->validateValue($value, new Length(array('min' => 3))); + * $violations = $validator->validate($value, new Length(array('min' => 3))); * * if (count($violations) > 0) { * // ... From d3a43e0297876ea0debc2599365be87e1000d885 Mon Sep 17 00:00:00 2001 From: mweimerskirch <362092+mweimerskirch@users.noreply.github.com> Date: Fri, 5 Oct 2018 17:41:17 +0200 Subject: [PATCH 2/6] Added LB translation for #27993 (UUID validator message translation) --- .../Validator/Resources/translations/validators.lb.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index 4a06dbd45b..bdbc9da09c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -318,6 +318,10 @@ Error Feeler + + This is not a valid UUID. + Dëst ass keng gëlteg UUID. + From 545a8eef05e2d406bccc0c362bc0cf30a3af00b9 Mon Sep 17 00:00:00 2001 From: Samuel NELA Date: Thu, 4 Oct 2018 20:06:57 +0200 Subject: [PATCH 3/6] [EventDispatcher] Remove template method in test case --- .../Component/EventDispatcher/Tests/GenericEventTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php index 9cf68c987f..b63f69df14 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php @@ -31,8 +31,6 @@ class GenericEventTest extends TestCase */ protected function setUp() { - parent::setUp(); - $this->subject = new \stdClass(); $this->event = new GenericEvent($this->subject, array('name' => 'Event')); } @@ -44,8 +42,6 @@ class GenericEventTest extends TestCase { $this->subject = null; $this->event = null; - - parent::tearDown(); } public function testConstruct() From 7196e49f7e20fae51fa4700a0de00283956e9640 Mon Sep 17 00:00:00 2001 From: mschop Date: Wed, 3 Oct 2018 20:15:00 +0200 Subject: [PATCH 4/6] Fix phpdocs See https://github.com/phan/phan/issues/2025 for explaination --- .../Component/Console/Command/Command.php | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index dc6fa509ad..796224b6a6 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -363,10 +363,12 @@ class Command /** * Adds an argument. * - * @param string $name The argument name - * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) + * @param string $name The argument name + * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) + * + * @throws InvalidArgumentException When argument mode is not valid * * @return $this */ @@ -380,11 +382,13 @@ class Command /** * Adds an option. * - * @param string $name The option name - * @param string $shortcut The shortcut (can be null) - * @param int $mode The option mode: One of the InputOption::VALUE_* constants - * @param string $description A description text - * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) + * @param string $name The option name + * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the VALUE_* constants + * @param string $description A description text + * @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE) + * + * @throws InvalidArgumentException If option mode is invalid or incompatible * * @return $this */ From 9d70e22794027908c2afb2029a4c62dad25526a5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 8 Oct 2018 13:49:05 +0100 Subject: [PATCH 5/6] [Validator] Add a missing translation --- .../Validator/Resources/translations/validators.pl.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index f33274e6e6..51a76eefc1 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -318,6 +318,10 @@ Error Błąd + + This is not a valid UUID. + To nie jest poprawne UUID. + From 5a51bb24dce5e30a18553d190237694de4cf0045 Mon Sep 17 00:00:00 2001 From: Florent Viel Date: Mon, 8 Oct 2018 15:32:18 +0200 Subject: [PATCH 6/6] Fix class documentation The phpdoc references the PHP flush function, neither a method of this class nor its parent. --- src/Symfony/Component/HttpFoundation/StreamedResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index ed1c5ff3ec..44f654aef6 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -17,7 +17,7 @@ namespace Symfony\Component\HttpFoundation; * A StreamedResponse uses a callback for its content. * * The callback should use the standard PHP functions like echo - * to stream the response back to the client. The flush() method + * to stream the response back to the client. The flush() function * can also be used if needed. * * @see flush()