Merge branch '3.4' into 4.3

* 3.4:
  [Routing] Add a param annotation for $annot.
  [DI] fix docblock
  Add missing translations for Armenian locale
  [Process] Doc block backport.
  Fix some docblocks.
This commit is contained in:
Nicolas Grekas 2019-08-19 13:14:47 +02:00
commit 3aa4537ef8
9 changed files with 92 additions and 19 deletions

View File

@ -14,6 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Command;
use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\StyleInterface; use Symfony\Component\Console\Style\StyleInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
@ -26,6 +27,9 @@ use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
*/ */
abstract class AbstractConfigCommand extends ContainerDebugCommand abstract class AbstractConfigCommand extends ContainerDebugCommand
{ {
/**
* @param OutputInterface|StyleInterface $output
*/
protected function listBundles($output) protected function listBundles($output)
{ {
$title = 'Available registered bundles with their extension alias if available'; $title = 'Available registered bundles with their extension alias if available';

View File

@ -199,6 +199,11 @@ class Cookie
); );
} }
/**
* @param string $dateValue
*
* @return string|null
*/
private static function parseDate($dateValue) private static function parseDate($dateValue)
{ {
// trim single quotes around date if present // trim single quotes around date if present
@ -216,6 +221,8 @@ class Cookie
if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) { if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) {
return $date->format('U'); return $date->format('U');
} }
return null;
} }
/** /**

View File

@ -111,8 +111,8 @@ class CookieJar
/** /**
* Updates the cookie jar from a response Set-Cookie headers. * Updates the cookie jar from a response Set-Cookie headers.
* *
* @param array $setCookies Set-Cookie headers from an HTTP response * @param string[] $setCookies Set-Cookie headers from an HTTP response
* @param string $uri The base URL * @param string $uri The base URL
*/ */
public function updateFromSetCookie(array $setCookies, $uri = null) public function updateFromSetCookie(array $setCookies, $uri = null)
{ {

View File

@ -89,7 +89,7 @@ class ChildDefinition extends Definition
* @param int|string $index * @param int|string $index
* @param mixed $value * @param mixed $value
* *
* @return self the current instance * @return $this
* *
* @throws InvalidArgumentException when $index isn't an integer * @throws InvalidArgumentException when $index isn't an integer
*/ */

View File

@ -742,6 +742,11 @@ class Filesystem
return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]];
} }
/**
* @param callable $func
*
* @return mixed
*/
private static function box($func) private static function box($func)
{ {
self::$lastError = null; self::$lastError = null;

View File

@ -242,7 +242,7 @@ class Process implements \IteratorAggregate
* This is identical to run() except that an exception is thrown if the process * This is identical to run() except that an exception is thrown if the process
* exits with a non-zero exit code. * exits with a non-zero exit code.
* *
* @return self * @return $this
* *
* @throws ProcessFailedException if the process didn't terminate successfully * @throws ProcessFailedException if the process didn't terminate successfully
* *
@ -966,7 +966,7 @@ class Process implements \IteratorAggregate
* *
* @param string|array $commandline The command to execute * @param string|array $commandline The command to execute
* *
* @return self The current Process instance * @return $this
* *
* @deprecated since Symfony 4.2. * @deprecated since Symfony 4.2.
*/ */
@ -1000,13 +1000,13 @@ class Process implements \IteratorAggregate
} }
/** /**
* Sets the process timeout (max. runtime). * Sets the process timeout (max. runtime) in seconds.
* *
* To disable the timeout, set this value to null. * To disable the timeout, set this value to null.
* *
* @param int|float|null $timeout The timeout in seconds * @param int|float|null $timeout The timeout in seconds
* *
* @return self The current Process instance * @return $this
* *
* @throws InvalidArgumentException if the timeout is negative * @throws InvalidArgumentException if the timeout is negative
*/ */
@ -1024,7 +1024,7 @@ class Process implements \IteratorAggregate
* *
* @param int|float|null $timeout The timeout in seconds * @param int|float|null $timeout The timeout in seconds
* *
* @return self The current Process instance * @return $this
* *
* @throws LogicException if the output is disabled * @throws LogicException if the output is disabled
* @throws InvalidArgumentException if the timeout is negative * @throws InvalidArgumentException if the timeout is negative
@ -1045,7 +1045,7 @@ class Process implements \IteratorAggregate
* *
* @param bool $tty True to enabled and false to disable * @param bool $tty True to enabled and false to disable
* *
* @return self The current Process instance * @return $this
* *
* @throws RuntimeException In case the TTY mode is not supported * @throws RuntimeException In case the TTY mode is not supported
*/ */
@ -1079,7 +1079,7 @@ class Process implements \IteratorAggregate
* *
* @param bool $bool * @param bool $bool
* *
* @return self * @return $this
*/ */
public function setPty($bool) public function setPty($bool)
{ {
@ -1119,7 +1119,7 @@ class Process implements \IteratorAggregate
* *
* @param string $cwd The new working directory * @param string $cwd The new working directory
* *
* @return self The current Process instance * @return $this
*/ */
public function setWorkingDirectory($cwd) public function setWorkingDirectory($cwd)
{ {
@ -1151,7 +1151,7 @@ class Process implements \IteratorAggregate
* *
* @param array $env The new environment variables * @param array $env The new environment variables
* *
* @return self The current Process instance * @return $this
*/ */
public function setEnv(array $env) public function setEnv(array $env)
{ {
@ -1182,7 +1182,7 @@ class Process implements \IteratorAggregate
* *
* @param string|int|float|bool|resource|\Traversable|null $input The content * @param string|int|float|bool|resource|\Traversable|null $input The content
* *
* @return self The current Process instance * @return $this
* *
* @throws LogicException In case the process is running * @throws LogicException In case the process is running
*/ */
@ -1202,7 +1202,7 @@ class Process implements \IteratorAggregate
* *
* @param bool $inheritEnv * @param bool $inheritEnv
* *
* @return self The current Process instance * @return $this
*/ */
public function inheritEnvironmentVariables($inheritEnv = true) public function inheritEnvironmentVariables($inheritEnv = true)
{ {

View File

@ -15,6 +15,7 @@ use Doctrine\Common\Annotations\Reader;
use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Loader\LoaderResolverInterface; use Symfony\Component\Config\Loader\LoaderResolverInterface;
use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Annotation\Route as RouteAnnotation;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouteCollection;
@ -129,6 +130,10 @@ abstract class AnnotationClassLoader implements LoaderInterface
return $collection; return $collection;
} }
/**
* @param RouteAnnotation $annot or an object that exposes a similar interface
* @param array $globals
*/
protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method) protected function addRoute(RouteCollection $collection, $annot, $globals, \ReflectionClass $class, \ReflectionMethod $method)
{ {
$name = $annot->getName(); $name = $annot->getName();

View File

@ -41,11 +41,11 @@ class LogoutUrlGenerator
/** /**
* Registers a firewall's LogoutListener, allowing its URL to be generated. * Registers a firewall's LogoutListener, allowing its URL to be generated.
* *
* @param string $key The firewall key * @param string $key The firewall key
* @param string $logoutPath The path that starts the logout process * @param string $logoutPath The path that starts the logout process
* @param string $csrfTokenId The ID of the CSRF token * @param string|null $csrfTokenId The ID of the CSRF token
* @param string $csrfParameter The CSRF token parameter name * @param string|null $csrfParameter The CSRF token parameter name
* @param CsrfTokenManagerInterface|null $csrfTokenManager A CsrfTokenManagerInterface instance * @param string|null $context The listener context
*/ */
public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null, string $context = null) public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null, string $context = null)
{ {

View File

@ -314,6 +314,58 @@
<source>This is not a valid Business Identifier Code (BIC).</source> <source>This is not a valid Business Identifier Code (BIC).</source>
<target>Սա վավեր Business Identifier Code (BIC) չէ։</target> <target>Սա վավեր Business Identifier Code (BIC) չէ։</target>
</trans-unit> </trans-unit>
<trans-unit id="82">
<source>Error</source>
<target>Սխալ</target>
</trans-unit>
<trans-unit id="83">
<source>This is not a valid UUID.</source>
<target>Սա վավեր UUID չէ:</target>
</trans-unit>
<trans-unit id="84">
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>Այս արժեքը պետք է լինի բազմակի {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>Բիզնեսի նույնականացման կոդը (BIC) կապված չէ IBAN- ի հետ {{ iban }}.</target>
</trans-unit>
<trans-unit id="86">
<source>This value should be valid JSON.</source>
<target>Այս արժեքը պետք է լինի վավեր JSON:</target>
</trans-unit>
<trans-unit id="87">
<source>This collection should contain only unique elements.</source>
<target>Այս հավաքածուն պետք է պարունակի միայն եզակի տարրեր:</target>
</trans-unit>
<trans-unit id="88">
<source>This value should be positive.</source>
<target>Այս արժեքը պետք է լինի դրական:</target>
</trans-unit>
<trans-unit id="89">
<source>This value should be either positive or zero.</source>
<target>Այս արժեքը պետք է լինի դրական կամ զրոյական:</target>
</trans-unit>
<trans-unit id="90">
<source>This value should be negative.</source>
<target>Այս արժեքը պետք է լինի բացասական:</target>
</trans-unit>
<trans-unit id="91">
<source>This value should be either negative or zero.</source>
<target>Այս արժեքը պետք է լինի բացասական կամ զրոյական:</target>
</trans-unit>
<trans-unit id="92">
<source>This value is not a valid timezone.</source>
<target>Այս արժեքը վավեր ժամանակի գոտի չէ:</target>
</trans-unit>
<trans-unit id="93">
<source>This password has been leaked in a data breach, it must not be used. Please use another password.</source>
<target>Այս գաղտնաբառն արտահոսվել է տվյալների խախտման մեջ, այն չպետք է օգտագործվի: Խնդրում ենք օգտագործել մեկ այլ գաղտնաբառ:</target>
</trans-unit>
<trans-unit id="94">
<source>This value should be between {{ min }} and {{ max }}.</source>
<target>Այս արժեքը պետք է լինի միջև {{ min }} և {{ max }}.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>