From 0edbbd3feaaf1fa852dd4b92c1004f7d383c23b1 Mon Sep 17 00:00:00 2001 From: Julien Fredon Date: Sun, 8 Jul 2018 23:39:51 +0200 Subject: [PATCH 01/55] Format file size in validation message according to binaryFormat option --- .../Component/Validator/Constraints/FileValidator.php | 2 +- .../Validator/Tests/Constraints/FileValidatorTest.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index bb96e2c9a18d8..33c784b68cddd 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -58,7 +58,7 @@ public function validate($value, Constraint $constraint) $binaryFormat = $constraint->binaryFormat; } else { $limitInBytes = $iniLimitSize; - $binaryFormat = true; + $binaryFormat = null === $constraint->binaryFormat ? true : $constraint->binaryFormat; } list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index add06817d0e81..6e2199ce02a14 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -455,11 +455,17 @@ public function uploadedFileErrorProvider() '{{ suffix }}' => 'bytes', ), '1'); + // access FileValidator::factorizeSizes() private method to format max file size + $reflection = new \ReflectionClass(\get_class(new FileValidator())); + $method = $reflection->getMethod('factorizeSizes'); + $method->setAccessible(true); + list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), array(0, UploadedFile::getMaxFilesize(), false)); + // it correctly parses the maxSize option and not only uses simple string comparison // 1000M should be bigger than the ini value $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( - '{{ limit }}' => UploadedFile::getMaxFilesize() / 1048576, - '{{ suffix }}' => 'MiB', + '{{ limit }}' => $limit, + '{{ suffix }}' => $suffix, ), '1000M'); // it correctly parses the maxSize option and not only uses simple string comparison From a8b16054e7de14cf92a933ea5e014895a8720ca2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 27 Aug 2018 19:44:28 +0200 Subject: [PATCH 02/55] bumped Symfony version to 2.8.46 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 276b2a1516b57..15425cdf92726 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.45'; - const VERSION_ID = 20845; + const VERSION = '2.8.46-DEV'; + const VERSION_ID = 20846; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 45; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 46; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 4623fe74ca2bd58605f426d74ebb82f238e5e318 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 27 Aug 2018 20:13:17 +0200 Subject: [PATCH 03/55] [travis] disable symfony/flex during phpunit install --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6896ac7a16e7f..f646b2997118c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -221,7 +221,11 @@ install: ([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer config platform.ext-mongodb 1.5.0; composer require --dev --no-update mongodb/mongodb) fi tfold 'composer update' $COMPOSER_UP - tfold 'phpunit install' ./phpunit install + if [[ $TRAVIS_PHP_VERSION = 5.* || $TRAVIS_PHP_VERSION = hhvm* ]]; then + tfold 'phpunit install' 'composer global remove symfony/flex && ./phpunit install && composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master' + else + tfold 'phpunit install' ./phpunit install + fi if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" elif [[ $deps = low ]]; then From b04ef43d221c85d796395a132686d339f853df19 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Tue, 28 Aug 2018 18:06:40 +0200 Subject: [PATCH 04/55] [HttpKernel] Fix inheritdocs --- .../ContainerAwareInterface.php | 3 ++ .../Component/HttpKernel/Bundle/Bundle.php | 32 ++++++------------- src/Symfony/Component/HttpKernel/Kernel.php | 2 +- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php index d78491bb96335..e7b9d575ece50 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -18,5 +18,8 @@ */ interface ContainerAwareInterface { + /** + * Sets the container. + */ public function setContainer(ContainerInterface $container = null); } diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index c99862a10f4bb..a1d9472d9bad9 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -35,23 +35,21 @@ abstract class Bundle implements BundleInterface protected $path; /** - * Boots the Bundle. + * {@inheritdoc} */ public function boot() { } /** - * Shutdowns the Bundle. + * {@inheritdoc} */ public function shutdown() { } /** - * Builds the bundle. - * - * It is only ever called once when the cache is empty. + * {@inheritdoc} * * This method can be overridden to register compilation passes, * other extensions, ... @@ -61,9 +59,7 @@ public function build(ContainerBuilder $container) } /** - * Sets the container. - * - * @param ContainerInterface|null $container A ContainerInterface instance or null + * {@inheritdoc} */ public function setContainer(ContainerInterface $container = null) { @@ -71,9 +67,7 @@ public function setContainer(ContainerInterface $container = null) } /** - * Returns the bundle's container extension. - * - * @return ExtensionInterface|null The container extension + * {@inheritdoc} * * @throws \LogicException */ @@ -110,9 +104,7 @@ public function getContainerExtension() } /** - * Gets the Bundle namespace. - * - * @return string The Bundle namespace + * {@inheritdoc} */ public function getNamespace() { @@ -122,9 +114,7 @@ public function getNamespace() } /** - * Gets the Bundle directory path. - * - * @return string The Bundle absolute path + * {@inheritdoc} */ public function getPath() { @@ -137,18 +127,14 @@ public function getPath() } /** - * Returns the bundle parent name. - * - * @return string|null The Bundle parent name it overrides or null if no parent + * {@inheritdoc} */ public function getParent() { } /** - * Returns the bundle name (the class short name). - * - * @return string The Bundle name + * {@inheritdoc} */ final public function getName() { diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 15425cdf92726..041b77bff9ae7 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -112,7 +112,7 @@ public function __clone() } /** - * Boots the current kernel. + * {@inheritdoc} */ public function boot() { From 1afb043dc5dfcd1009b0c94e116189c00ad0c097 Mon Sep 17 00:00:00 2001 From: Dany Maillard Date: Tue, 28 Aug 2018 23:39:52 +0200 Subject: [PATCH 05/55] Fix code examples in PHPDoc --- .../RememberMe/DoctrineTokenProvider.php | 15 +-- .../Twig/TokenParser/DumpTokenParser.php | 9 +- .../Kernel/MicroKernelTrait.php | 10 +- .../Templating/Helper/FormHelper.php | 14 +-- .../Config/Definition/PrototypedArrayNode.php | 28 +++--- .../Component/Console/Helper/Table.php | 25 ++--- .../Console/Input/InputDefinition.php | 4 +- .../Component/Console/Output/StreamOutput.php | 4 +- .../Component/CssSelector/CssSelector.php | 2 +- .../DependencyInjection/Container.php | 8 +- .../DependencyInjection/ContainerBuilder.php | 20 ++-- src/Symfony/Component/DomCrawler/Crawler.php | 6 +- .../DomCrawler/FormFieldRegistry.php | 2 - src/Symfony/Component/Finder/Finder.php | 42 ++++----- src/Symfony/Component/Finder/Glob.php | 14 +-- .../Form/ChoiceList/ArrayKeyChoiceList.php | 14 ++- .../Factory/PropertyAccessDecorator.php | 10 +- .../Extension/Core/ChoiceList/ChoiceList.php | 8 +- .../Core/ChoiceList/ObjectChoiceList.php | 8 +- .../Core/ChoiceList/SimpleChoiceList.php | 10 +- .../ViolationMapper/ViolationPath.php | 4 +- .../Form/FormRendererEngineInterface.php | 16 ++-- .../Component/Form/FormRendererInterface.php | 14 +-- src/Symfony/Component/Form/Forms.php | 92 ++++++++----------- .../OptionsResolver/OptionsResolver.php | 8 +- .../OptionsResolverInterface.php | 10 +- src/Symfony/Component/Process/PhpProcess.php | 6 +- .../Routing/RouteCollectionBuilder.php | 2 +- .../Security/Core/User/UserInterface.php | 10 +- .../Guard/GuardAuthenticatorInterface.php | 18 ++-- .../AuthenticationEntryPointInterface.php | 12 ++- .../Component/Serializer/Serializer.php | 6 +- .../Templating/Helper/AssetsHelper.php | 4 +- .../Templating/Helper/CoreAssetsHelper.php | 4 +- .../Catalogue/AbstractOperation.php | 29 +++--- .../ConstraintViolationInterface.php | 8 +- .../Validator/ExecutionContextInterface.php | 56 ++++------- src/Symfony/Component/Yaml/Yaml.php | 9 +- 38 files changed, 247 insertions(+), 314 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index e0dcaae6c2f6d..c3b7588e95049 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -27,13 +27,14 @@ * and to do the conversion of the datetime column. * * In order to use this class, you need the following table in your database: - * CREATE TABLE `rememberme_token` ( - * `series` char(88) UNIQUE PRIMARY KEY NOT NULL, - * `value` char(88) NOT NULL, - * `lastUsed` datetime NOT NULL, - * `class` varchar(100) NOT NULL, - * `username` varchar(200) NOT NULL - * ); + * + * CREATE TABLE `rememberme_token` ( + * `series` char(88) UNIQUE PRIMARY KEY NOT NULL, + * `value` char(88) NOT NULL, + * `lastUsed` datetime NOT NULL, + * `class` varchar(100) NOT NULL, + * `username` varchar(200) NOT NULL + * ); */ class DoctrineTokenProvider implements TokenProviderInterface { diff --git a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php index 7cdbb77b4349b..a4d7d6f690078 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php @@ -19,11 +19,10 @@ * Token Parser for the 'dump' tag. * * Dump variables with: - *
- *  {% dump %}
- *  {% dump foo %}
- *  {% dump foo, bar %}
- * 
+ * + * {% dump %} + * {% dump foo %} + * {% dump foo, bar %} * * @author Julien Galenski */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index fec5b72a5b3be..869e5b4679e26 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -38,17 +38,17 @@ abstract protected function configureRoutes(RouteCollectionBuilder $routes); * * You can register extensions: * - * $c->loadFromExtension('framework', array( - * 'secret' => '%secret%' - * )); + * $c->loadFromExtension('framework', array( + * 'secret' => '%secret%' + * )); * * Or services: * - * $c->register('halloween', 'FooBundle\HalloweenProvider'); + * $c->register('halloween', 'FooBundle\HalloweenProvider'); * * Or parameters: * - * $c->setParameter('halloween', 'lot of fun'); + * $c->setParameter('halloween', 'lot of fun'); * * @param ContainerBuilder $c * @param LoaderInterface $loader diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php index fd9da17ef21d6..091b5d10f8221 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @@ -232,18 +232,14 @@ public function block(FormView $view, $blockName, array $variables = array()) * Use this helper for CSRF protection without the overhead of creating a * form. * - * - * echo $view['form']->csrfToken('rm_user_'.$user->getId()); - * + * echo $view['form']->csrfToken('rm_user_'.$user->getId()); * * Check the token in your action using the same intention. * - * - * $csrfProvider = $this->get('security.csrf.token_generator'); - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * + * $csrfProvider = $this->get('security.csrf.token_generator'); + * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { + * throw new \RuntimeException('CSRF attack detected.'); + * } * * @param string $intention The intention of the protected action * diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index 6af4a61e475d4..91e98eaeb3ddc 100644 --- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -342,27 +342,31 @@ protected function mergeValues($leftSide, $rightSide) * one is same as this->keyAttribute and the other is 'value', then the prototype will be different. * * For example, assume $this->keyAttribute is 'name' and the value array is as follows: - * array( + * * array( - * 'name' => 'name001', - * 'value' => 'value001' + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) * ) - * ) * * Now, the key is 0 and the child node is: - * array( - * 'name' => 'name001', - * 'value' => 'value001' - * ) + * + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) * * When normalizing the value array, the 'name' element will removed from the child node * and its value becomes the new key of the child node: - * array( - * 'name001' => array('value' => 'value001') - * ) + * + * array( + * 'name001' => array('value' => 'value001') + * ) * * Now only 'value' element is left in the child node which can be further simplified into a string: - * array('name001' => 'value001') + * + * array('name001' => 'value001') * * Now, the key becomes 'name001' and the child node becomes 'value001' and * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index ce5a819e142e2..f3fc3b0b0a73e 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -224,15 +224,14 @@ public function setRow($column, array $row) * Renders table to output. * * Example: - * - * +---------------+-----------------------+------------------+ - * | ISBN | Title | Author | - * +---------------+-----------------------+------------------+ - * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | - * +---------------+-----------------------+------------------+ - * + * + * +---------------+-----------------------+------------------+ + * | ISBN | Title | Author | + * +---------------+-----------------------+------------------+ + * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + * +---------------+-----------------------+------------------+ */ public function render() { @@ -266,7 +265,9 @@ public function render() /** * Renders horizontal header separator. * - * Example: +-----+-----------+-------+ + * Example: + * + * +-----+-----------+-------+ */ private function renderRowSeparator() { @@ -297,7 +298,9 @@ private function renderColumnSeparator() /** * Renders table row. * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * Example: + * + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * * @param array $row * @param string $cellFormat diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index dc6e2701f1f18..72f784cebb8b8 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -23,8 +23,8 @@ * Usage: * * $definition = new InputDefinition(array( - * new InputArgument('name', InputArgument::REQUIRED), - * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), + * new InputArgument('name', InputArgument::REQUIRED), + * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), * )); * * @author Fabien Potencier diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index 20f45082836f6..47da3270f1a1b 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -20,11 +20,11 @@ * * Usage: * - * $output = new StreamOutput(fopen('php://stdout', 'w')); + * $output = new StreamOutput(fopen('php://stdout', 'w')); * * As `StreamOutput` can use any stream, you can also use a file: * - * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); + * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/CssSelector/CssSelector.php b/src/Symfony/Component/CssSelector/CssSelector.php index b4ac866b051b3..c1f8c88829470 100644 --- a/src/Symfony/Component/CssSelector/CssSelector.php +++ b/src/Symfony/Component/CssSelector/CssSelector.php @@ -17,7 +17,7 @@ * CssSelector is the main entry point of the component and can convert CSS * selectors to XPath expressions. * - * $xpath = CssSelector::toXpath('h1.foo'); + * $xpath = CssSelector::toXpath('h1.foo'); * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 00b34b59682cd..25532ead233d5 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -33,11 +33,9 @@ * A service can also be defined by creating a method named * getXXXService(), where XXX is the camelized version of the id: * - *
    - *
  • request -> getRequestService()
  • - *
  • mysql_session_storage -> getMysqlSessionStorageService()
  • - *
  • symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()
  • - *
+ * * request -> getRequestService() + * * mysql_session_storage -> getMysqlSessionStorageService() + * * symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService() * * The container can have three possible behaviors when a service does not exist: * diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index dc09a65820587..c31eeea4177f9 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -493,10 +493,10 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV * the parameters passed to the container constructor to have precedence * over the loaded ones. * - * $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); - * $loader = new LoaderXXX($container); - * $loader->load('resource_name'); - * $container->register('foo', 'stdClass'); + * $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + * $loader = new LoaderXXX($container); + * $loader->load('resource_name'); + * $container->register('foo', 'stdClass'); * * In the above example, even if the loaded resource defines a foo * parameter, the value will still be 'bar' as defined in the ContainerBuilder @@ -999,14 +999,14 @@ private function doResolveServices($value, \SplObjectStorage $inlinedDefinitions * * Example: * - * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); + * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); * - * $serviceIds = $container->findTaggedServiceIds('my.tag'); - * foreach ($serviceIds as $serviceId => $tags) { - * foreach ($tags as $tag) { - * echo $tag['hello']; + * $serviceIds = $container->findTaggedServiceIds('my.tag'); + * foreach ($serviceIds as $serviceId => $tags) { + * foreach ($tags as $tag) { + * echo $tag['hello']; + * } * } - * } * * @param string $name The tag name * diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 565a22431228f..afcfbe8cb824e 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -579,7 +579,7 @@ public function html() * * Example: * - * $crawler->filter('h1 a')->extract(array('_text', 'href')); + * $crawler->filter('h1 a')->extract(array('_text', 'href')); * * @param array $attributes An array of attributes * @@ -787,7 +787,7 @@ public function registerNamespace($prefix, $namespace) * Escaped characters are: quotes (") and apostrophe ('). * * Examples: - * + * * echo Crawler::xpathLiteral('foo " bar'); * //prints 'foo " bar' * @@ -796,7 +796,7 @@ public function registerNamespace($prefix, $namespace) * * echo Crawler::xpathLiteral('a\'b"c'); * //prints concat('a', "'", 'b"c') - * + * * * @param string $s String to be escaped * diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index d2acb15adac06..6398cc60693ad 100644 --- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -186,9 +186,7 @@ private function walk(array $array, $base = '', array &$output = array()) /** * Splits a field name into segments as a web browser would do. * - * * getSegments('base[foo][3][]') = array('base', 'foo, '3', ''); - * * * @param string $name The name of the field * diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 007b68867532b..1c5caa3de7ae6 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -36,7 +36,7 @@ * * All methods return the current Finder object to allow easy chaining: * - * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); + * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); * * @author Fabien Potencier */ @@ -215,8 +215,8 @@ public function files() * * Usage: * - * $finder->depth('> 1') // the Finder will start matching at level 1. - * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. + * $finder->depth('> 1') // the Finder will start matching at level 1. + * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. * * @param string|int $level The depth level expression * @@ -237,10 +237,10 @@ public function depth($level) * * The date must be something that strtotime() is able to parse: * - * $finder->date('since yesterday'); - * $finder->date('until 2 days ago'); - * $finder->date('> now - 2 hours'); - * $finder->date('>= 2005-10-15'); + * $finder->date('since yesterday'); + * $finder->date('until 2 days ago'); + * $finder->date('> now - 2 hours'); + * $finder->date('>= 2005-10-15'); * * @param string $date A date range string * @@ -262,9 +262,9 @@ public function date($date) * * You can use patterns (delimited with / sign), globs or simple strings. * - * $finder->name('*.php') - * $finder->name('/\.php$/') // same as above - * $finder->name('test.php') + * $finder->name('*.php') + * $finder->name('/\.php$/') // same as above + * $finder->name('test.php') * * @param string $pattern A pattern (a regexp, a glob, or a string) * @@ -300,8 +300,8 @@ public function notName($pattern) * * Strings or PCRE patterns can be used: * - * $finder->contains('Lorem ipsum') - * $finder->contains('/Lorem ipsum/i') + * $finder->contains('Lorem ipsum') + * $finder->contains('/Lorem ipsum/i') * * @param string $pattern A pattern (string or regexp) * @@ -321,8 +321,8 @@ public function contains($pattern) * * Strings or PCRE patterns can be used: * - * $finder->notContains('Lorem ipsum') - * $finder->notContains('/Lorem ipsum/i') + * $finder->notContains('Lorem ipsum') + * $finder->notContains('/Lorem ipsum/i') * * @param string $pattern A pattern (string or regexp) * @@ -342,8 +342,8 @@ public function notContains($pattern) * * You can use patterns (delimited with / sign) or simple strings. * - * $finder->path('some/special/dir') - * $finder->path('/some\/special\/dir/') // same as above + * $finder->path('some/special/dir') + * $finder->path('/some\/special\/dir/') // same as above * * Use only / as dirname separator. * @@ -365,8 +365,8 @@ public function path($pattern) * * You can use patterns (delimited with / sign) or simple strings. * - * $finder->notPath('some/special/dir') - * $finder->notPath('/some\/special\/dir/') // same as above + * $finder->notPath('some/special/dir') + * $finder->notPath('/some\/special\/dir/') // same as above * * Use only / as dirname separator. * @@ -386,9 +386,9 @@ public function notPath($pattern) /** * Adds tests for file sizes. * - * $finder->size('> 10K'); - * $finder->size('<= 1Ki'); - * $finder->size(4); + * $finder->size('> 10K'); + * $finder->size('<= 1Ki'); + * $finder->size(4); * * @param string|int $size A size range string or an integer * diff --git a/src/Symfony/Component/Finder/Glob.php b/src/Symfony/Component/Finder/Glob.php index 2e56cf2800511..e2988f25768ec 100644 --- a/src/Symfony/Component/Finder/Glob.php +++ b/src/Symfony/Component/Finder/Glob.php @@ -14,14 +14,14 @@ /** * Glob matches globbing patterns against text. * - * if match_glob("foo.*", "foo.bar") echo "matched\n"; + * if match_glob("foo.*", "foo.bar") echo "matched\n"; * - * // prints foo.bar and foo.baz - * $regex = glob_to_regex("foo.*"); - * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) - * { - * if (/$regex/) echo "matched: $car\n"; - * } + * // prints foo.bar and foo.baz + * $regex = glob_to_regex("foo.*"); + * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) + * { + * if (/$regex/) echo "matched: $car\n"; + * } * * Glob implements glob(3) style matching that can be used to match * against text, rather than fetching names from a filesystem. diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php index b51a5a575f7dd..3a0168d170b5c 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php @@ -29,16 +29,14 @@ * * Example: * - * ```php - * $choices = array('' => 'Don\'t know', 0 => 'No', 1 => 'Yes'); - * $choiceList = new ArrayKeyChoiceList(array_keys($choices)); + * $choices = array('' => 'Don\'t know', 0 => 'No', 1 => 'Yes'); + * $choiceList = new ArrayKeyChoiceList(array_keys($choices)); * - * $values = $choiceList->getValues() - * // => array('', '0', '1') + * $values = $choiceList->getValues() + * // => array('', '0', '1') * - * $selectedValues = $choiceList->getValuesForChoices(array(true)); - * // => array('1') - * ``` + * $selectedValues = $choiceList->getValuesForChoices(array(true)); + * // => array('1') * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index 146669b27f7e7..ee749ca029ae2 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -24,18 +24,14 @@ * * Pass the decorated factory to the constructor: * - * ```php - * $decorator = new PropertyAccessDecorator($factory); - * ``` + * $decorator = new PropertyAccessDecorator($factory); * * You can now pass property paths for generating choice values, labels, view * indices, HTML attributes and for determining the preferred choices and the * choice groups: * - * ```php - * // extract values from the $value property - * $list = $createListFromChoices($objects, 'value'); - * ``` + * // extract values from the $value property + * $list = $createListFromChoices($objects, 'value'); * * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 8e4695011fea9..ec3857aa8729c 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -28,11 +28,9 @@ * can be stored in the array key pointing to the nested array. The topmost * level of the hierarchy may also be a \Traversable. * - * - * $choices = array(true, false); - * $labels = array('Agree', 'Disagree'); - * $choiceList = new ArrayChoiceList($choices, $labels); - * + * $choices = array(true, false); + * $labels = array('Agree', 'Disagree'); + * $choiceList = new ArrayChoiceList($choices, $labels); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php index 67a783284f44a..265d85691a211 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -26,12 +26,10 @@ * Supports generation of choice labels, choice groups and choice values * by calling getters of the object (or associated objects). * - * - * $choices = array($user1, $user2); + * $choices = array($user1, $user2); * - * // call getName() to determine the choice labels - * $choiceList = new ObjectChoiceList($choices, 'name'); - * + * // call getName() to determine the choice labels + * $choiceList = new ObjectChoiceList($choices, 'name'); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php index 7255b1254ee35..47500045ed7d7 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php @@ -22,12 +22,10 @@ * creating nested arrays. The title of the sub-hierarchy can be stored in the * array key pointing to the nested array. * - * - * $choiceList = new SimpleChoiceList(array( - * 'creditcard' => 'Credit card payment', - * 'cash' => 'Cash payment', - * )); - * + * $choiceList = new SimpleChoiceList(array( + * 'creditcard' => 'Credit card payment', + * 'cash' => 'Cash payment', + * )); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php index 805150f2d1d00..19020c7a6926a 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php @@ -198,9 +198,7 @@ public function isIndex($index) * * Consider the following violation path: * - * - * children[address].children[office].data.street - * + * children[address].children[office].data.street * * In this example, "address" and "office" map to forms, while * "street does not. diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Symfony/Component/Form/FormRendererEngineInterface.php index e2300ef5a2dd2..d283837432c42 100644 --- a/src/Symfony/Component/Form/FormRendererEngineInterface.php +++ b/src/Symfony/Component/Form/FormRendererEngineInterface.php @@ -53,11 +53,9 @@ public function getResourceForBlockName(FormView $view, $blockName); * and continues with the child of that root, the child of that child etc. * The following is an example for a block hierarchy: * - * - * form_widget - * text_widget - * url_widget - * + * form_widget + * text_widget + * url_widget * * In this example, "url_widget" is the most specific block, while the other * blocks are its ancestors in the hierarchy. @@ -91,11 +89,9 @@ public function getResourceForBlockNameHierarchy(FormView $view, array $blockNam * and continues with the child of that root, the child of that child etc. * The following is an example for a block hierarchy: * - * - * form_widget - * text_widget - * url_widget - * + * form_widget + * text_widget + * url_widget * * The second parameter $hierarchyLevel determines the level of the hierarchy * that should be rendered. diff --git a/src/Symfony/Component/Form/FormRendererInterface.php b/src/Symfony/Component/Form/FormRendererInterface.php index f0f51e4f59251..edddeff5b78dd 100644 --- a/src/Symfony/Component/Form/FormRendererInterface.php +++ b/src/Symfony/Component/Form/FormRendererInterface.php @@ -69,18 +69,14 @@ public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $va * Use this helper for CSRF protection without the overhead of creating a * form. * - * - * - * + * * * Check the token in your action using the same token ID. * - * - * $csrfProvider = $this->get('security.csrf.token_generator'); - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * + * $csrfProvider = $this->get('security.csrf.token_generator'); + * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { + * throw new \RuntimeException('CSRF attack detected.'); + * } * * @param string $tokenId The ID of the CSRF token * diff --git a/src/Symfony/Component/Form/Forms.php b/src/Symfony/Component/Form/Forms.php index 2a47513f61a25..079ceda750d44 100644 --- a/src/Symfony/Component/Form/Forms.php +++ b/src/Symfony/Component/Form/Forms.php @@ -18,29 +18,25 @@ * * Use this class to conveniently create new form factories: * - * - * use Symfony\Component\Form\Forms; - * - * $formFactory = Forms::createFormFactory(); - * - * $form = $formFactory->createBuilder() - * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') - * ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - * 'choices' => array('Male' => 'm', 'Female' => 'f'), - * 'choices_as_values' => true, - * )) - * ->getForm(); - * + * use Symfony\Component\Form\Forms; + * + * $formFactory = Forms::createFormFactory(); + * + * $form = $formFactory->createBuilder() + * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') + * ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( + * 'choices' => array('Male' => 'm', 'Female' => 'f'), + * 'choices_as_values' => true, + * )) + * ->getForm(); * * You can also add custom extensions to the form factory: * - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new AcmeExtension()) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new AcmeExtension()) + * ->getFormFactory(); * * If you create custom form types or type extensions, it is * generally recommended to create your own extensions that lazily @@ -48,54 +44,46 @@ * does not matter that much, you can also pass them directly to the * form factory: * - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addType(new PersonType()) - * ->addType(new PhoneNumberType()) - * ->addTypeExtension(new FormTypeHelpTextExtension()) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addType(new PersonType()) + * ->addType(new PhoneNumberType()) + * ->addTypeExtension(new FormTypeHelpTextExtension()) + * ->getFormFactory(); * * Support for the Validator component is provided by ValidatorExtension. * This extension needs a validator object to function properly: * - * - * use Symfony\Component\Validator\Validation; - * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; + * use Symfony\Component\Validator\Validation; + * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; * - * $validator = Validation::createValidator(); - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new ValidatorExtension($validator)) - * ->getFormFactory(); - * + * $validator = Validation::createValidator(); + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new ValidatorExtension($validator)) + * ->getFormFactory(); * * Support for the Templating component is provided by TemplatingExtension. * This extension needs a PhpEngine object for rendering forms. As second * argument you should pass the names of the default themes. Here is an * example for using the default layout with "
" tags: * - * - * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; + * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( - * 'FrameworkBundle:Form', - * ))) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new TemplatingExtension($engine, null, array( + * 'FrameworkBundle:Form', + * ))) + * ->getFormFactory(); * * The next example shows how to include the "" layout: * - * - * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; + * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( - * 'FrameworkBundle:Form', - * 'FrameworkBundle:FormTable', - * ))) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new TemplatingExtension($engine, null, array( + * 'FrameworkBundle:Form', + * 'FrameworkBundle:FormTable', + * ))) + * ->getFormFactory(); * * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index be9d44ed05796..9c1d458d89a65 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -360,11 +360,9 @@ public function getDefinedOptions() * * The normalizer should be a closure with the following signature: * - * ```php - * function (Options $options, $value) { - * // ... - * } - * ``` + * function (Options $options, $value) { + * // ... + * } * * The closure is invoked when {@link resolve()} is called. The closure * has access to the resolved values of other options through the passed diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php index 24f343e026aa6..156cc751e70b1 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php @@ -29,10 +29,8 @@ interface OptionsResolverInterface * evaluate the option value lazily. These closures must have one * of the following signatures: * - * - * function (Options $options) - * function (Options $options, $value) - * + * function (Options $options) + * function (Options $options, $value) * * The second parameter passed to the closure is the previously * set default value, in case you are overwriting an existing @@ -154,9 +152,7 @@ public function addAllowedTypes($allowedTypes); * * The normalizers should be closures with the following signature: * - * - * function (Options $options, $value) - * + * function (Options $options, $value) * * The second parameter passed to the closure is the value of * the option. diff --git a/src/Symfony/Component/Process/PhpProcess.php b/src/Symfony/Component/Process/PhpProcess.php index 6bf6bb67495b2..31a855d943af2 100644 --- a/src/Symfony/Component/Process/PhpProcess.php +++ b/src/Symfony/Component/Process/PhpProcess.php @@ -16,9 +16,9 @@ /** * PhpProcess runs a PHP script in an independent process. * - * $p = new PhpProcess(''); - * $p->run(); - * print $p->getOutput()."\n"; + * $p = new PhpProcess(''); + * $p->run(); + * print $p->getOutput()."\n"; * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/src/Symfony/Component/Routing/RouteCollectionBuilder.php index 4503eca5a85b3..34b2abc5bf6c7 100644 --- a/src/Symfony/Component/Routing/RouteCollectionBuilder.php +++ b/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -46,7 +46,7 @@ public function __construct(LoaderInterface $loader = null) /** * Import an external routing resource and returns the RouteCollectionBuilder. * - * $routes->import('blog.yml', '/blog'); + * $routes->import('blog.yml', '/blog'); * * @param mixed $resource * @param string|null $prefix diff --git a/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/Symfony/Component/Security/Core/User/UserInterface.php index 747884282dcaa..613db8ecc0fac 100644 --- a/src/Symfony/Component/Security/Core/User/UserInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -36,12 +36,10 @@ interface UserInterface /** * Returns the roles granted to the user. * - * - * public function getRoles() - * { - * return array('ROLE_USER'); - * } - * + * public function getRoles() + * { + * return array('ROLE_USER'); + * } * * Alternatively, the roles might be stored on a ``roles`` property, * and populated in any number of different ways when the user object diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php index 307d70f9e973e..3cafddcdaa15c 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php @@ -40,18 +40,18 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * * For example, for a form login, you might: * - * if ($request->request->has('_username')) { - * return array( - * 'username' => $request->request->get('_username'), - * 'password' => $request->request->get('_password'), - * ); - * } else { - * return; - * } + * if ($request->request->has('_username')) { + * return array( + * 'username' => $request->request->get('_username'), + * 'password' => $request->request->get('_password'), + * ); + * } else { + * return; + * } * * Or for an API token that's on a header, you might use: * - * return array('api_key' => $request->headers->get('X-API-TOKEN')); + * return array('api_key' => $request->headers->get('X-API-TOKEN')); * * @param Request $request * diff --git a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php index f9484e0a6c7dc..c37a0e4875797 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php @@ -31,10 +31,14 @@ interface AuthenticationEntryPointInterface * response that "helps" the user start into the authentication process. * * Examples: - * A) For a form login, you might redirect to the login page - * return new RedirectResponse('/login'); - * B) For an API token authentication system, you return a 401 response - * return new Response('Auth header required', 401); + * + * - For a form login, you might redirect to the login page + * + * return new RedirectResponse('/login'); + * + * - For an API token authentication system, you return a 401 response + * + * return new Response('Auth header required', 401); * * @param Request $request The request that resulted in an AuthenticationException * @param AuthenticationException $authException The exception that started the authentication process diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 1214771eb131d..f935d1db35a95 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -26,9 +26,9 @@ * objects are turned into arrays by normalizers. * arrays are turned into various output formats by encoders. * - * $serializer->serialize($obj, 'xml') - * $serializer->decode($data, 'xml') - * $serializer->denormalize($data, 'Class', 'xml') + * $serializer->serialize($obj, 'xml') + * $serializer->decode($data, 'xml') + * $serializer->denormalize($data, 'Class', 'xml') * * @author Jordi Boggiano * @author Johannes M. Schmitt diff --git a/src/Symfony/Component/Templating/Helper/AssetsHelper.php b/src/Symfony/Component/Templating/Helper/AssetsHelper.php index 363b4aa6d1e16..43f62c19c5df9 100644 --- a/src/Symfony/Component/Templating/Helper/AssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/AssetsHelper.php @@ -21,9 +21,7 @@ * * Usage: * - * - * - * + * * * @author Fabien Potencier * @author Kris Wallsmith diff --git a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php index a246a1b52251c..b8b0a9a70dcc6 100644 --- a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php @@ -20,9 +20,7 @@ * * Usage: * - * - * - * + * * * @author Fabien Potencier * @author Kris Wallsmith diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index 4f0e26fa9729f..0a94476ab7b31 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -37,21 +37,20 @@ abstract class AbstractOperation implements OperationInterface * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. * * The data structure of this array is as follows: - * ```php - * array( - * 'domain 1' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), - * 'domain 2' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), - * ... - * ) - * ``` + * + * array( + * 'domain 1' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * 'domain 2' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * ... + * ) * * @var array The array that stores 'all', 'new' and 'obsolete' messages */ diff --git a/src/Symfony/Component/Validator/ConstraintViolationInterface.php b/src/Symfony/Component/Validator/ConstraintViolationInterface.php index 9889b92fe31b6..0ab53b0fef61e 100644 --- a/src/Symfony/Component/Validator/ConstraintViolationInterface.php +++ b/src/Symfony/Component/Validator/ConstraintViolationInterface.php @@ -19,11 +19,9 @@ * element in the validation graph and the root element that was originally * passed to the validator. For example, take the following graph: * - *
- * (Person)---(firstName: string)
- *      \
- *   (address: Address)---(street: string)
- * 
+ * (Person)---(firstName: string) + * \ + * (address: Address)---(street: string) * * If the Person object is validated and validation fails for the * "firstName" property, the generated violation has the Person diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 2f352fa6809dc..08979cb964f6c 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -16,21 +16,17 @@ * * For example, let's validate the following object graph: * - *
- * (Person)---($firstName: string)
- *      \
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) * * We validate the Person instance, which becomes the "root" of the * validation run (see {@link getRoot}). The state of the context after the * first step will be like this: * - *
- * (Person)---($firstName: string)
- *    ^ \
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * ^ \ + * ($address: Address)---($street: string) * * The validator is stopped at the Person node, both the root and the * value (see {@link getValue}) of the context point to the Person @@ -41,11 +37,9 @@ * After advancing to the property $firstName of the Person * instance, the state of the context looks like this: * - *
- * (Person)---($firstName: string)
- *      \              ^
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * \ ^ + * ($address: Address)---($street: string) * * The validator is stopped at the property $firstName. The root still * points to the Person instance, because this is where the validation @@ -56,12 +50,10 @@ * $street property of the Address instance, the context state * looks like this: * - *
- * (Person)---($firstName: string)
- *      \
- *   ($address: Address)---($street: string)
- *                               ^
- * 
+ * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) + * ^ * * The validator is stopped at the property $street. The root still * points to the Person instance, but the property path is now @@ -128,19 +120,14 @@ public function addViolationAt($subPath, $message, array $parameters = array(), * argument which is appended to the current property path when a violation * is created. For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($phoneNumber: PhoneNumber)
-     *                     ^
-     * 
+ * (Person)---($address: Address)---($phoneNumber: PhoneNumber) * * When the execution context stops at the Person instance, the * property path is "address". When you validate the PhoneNumber * instance now, pass "phoneNumber" as sub path to correct the property path * to "address.phoneNumber": * - *
-     * $context->validate($address->phoneNumber, 'phoneNumber');
-     * 
+ * $context->validate($address->phoneNumber, 'phoneNumber'); * * Any violations generated during the validation will be added to the * violation list that you can access with {@link getViolations}. @@ -167,19 +154,14 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals * Use the parameter $subPath to adapt the property path for the * validated value. For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($street: string)
-     *                     ^
-     * 
+ * (Person)---($address: Address)---($street: string) * * When the validator validates the Address instance, the * property path stored in the execution context is "address". When you * manually validate the property $street now, pass the sub path * "street" to adapt the full property path to "address.street": * - *
-     * $context->validate($address->street, new NotNull(), 'street');
-     * 
+ * $context->validate($address->street, new NotNull(), 'street'); * * @param mixed $value The value to validate * @param Constraint|Constraint[] $constraints The constraint(s) to validate against @@ -290,9 +272,7 @@ public function getPropertyName(); * * For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($street: string)
-     * 
+ * (Person)---($address: Address)---($street: string) * * When the Person instance is passed to the validator, the * property path is initially empty. When the $address property diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 595fbef07f889..3f93cba9ef55f 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -23,11 +23,10 @@ class Yaml /** * Parses YAML into a PHP value. * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * + * Usage: + * + * $array = Yaml::parse(file_get_contents('config.yml')); + * print_r($array); * * As this method accepts both plain strings and file names as an input, * you must validate the input before calling this method. Passing a file From f1d594b732c52eb92d7392a2b617bdaca895ac00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Thu, 30 Aug 2018 11:30:49 +0200 Subject: [PATCH 06/55] [DI] Fix phpdoc --- src/Symfony/Component/DependencyInjection/Definition.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 70f68469e30dc..0880646b34abd 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -79,7 +79,7 @@ public function setFactory($factory) /** * Gets the factory. * - * @return string|array The PHP function or an array containing a class/Reference and a method to call + * @return string|array|null The PHP function or an array containing a class/Reference and a method to call */ public function getFactory() { From 111d9bc6f5ac372b614a6160c671f9db38ff0fc4 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Thu, 30 Aug 2018 10:00:46 +0200 Subject: [PATCH 07/55] [Finder] Update PHPdoc append() --- src/Symfony/Component/Finder/Finder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 007b68867532b..757760cf3e5bb 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -699,7 +699,7 @@ public function getIterator() * * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. * - * @param mixed $iterator + * @param iterable $iterator * * @return $this * @@ -751,7 +751,7 @@ private function sortAdapters() } /** - * @param $dir + * @param string $dir * * @return \Iterator */ From d2e9e0bcf3d0860e19f95872ad566763adbc9910 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Fri, 31 Aug 2018 10:56:24 +0200 Subject: [PATCH 08/55] Fixed the interface description of the url generator interface --- .../Component/Routing/Generator/UrlGeneratorInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index f501ebd9a8389..c7f4fca74418c 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -73,7 +73,7 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * @param mixed $parameters An array of parameters * @param int $referenceType The type of reference to be generated (one of the constants) * - * @return string The generated URL + * @return string|null The generated URL * * @throws RouteNotFoundException If the named route doesn't exist * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route From 886f7390b84390fd3a174f87d32dab5f233dbbb5 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Sun, 2 Sep 2018 18:03:13 +0100 Subject: [PATCH 09/55] Use the real image URL for the filesystem tests --- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 6a7fad69ed54e..cfb0519fbee78 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -161,7 +161,7 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist() */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { - $sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png'; + $sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png'; $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; file_put_contents($targetFilePath, 'TARGET FILE'); From 599de83b3342367eee9dc317db0fa17d8128be56 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 10:32:25 +0200 Subject: [PATCH 10/55] Fix appveyor --- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index cfb0519fbee78..3488de078e6e4 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -161,6 +161,9 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist() */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { + if (!in_array('https', stream_get_wrappers())) { + $this->markTestSkipped('"https" stream wrapper is not enabled.'); + } $sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png'; $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; From a39133179197e9b9f9bbc5ae3ad9d32209410f2c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 11:07:34 +0200 Subject: [PATCH 11/55] [appveyor] minor CI fix --- .github/build-packages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/build-packages.php b/.github/build-packages.php index b67a699609d66..83f4b4336c89f 100644 --- a/.github/build-packages.php +++ b/.github/build-packages.php @@ -14,7 +14,7 @@ $flags = \PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0; foreach ($dirs as $k => $dir) { - if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) { + if (!system("git diff --name-only \"$mergeBase\" -- $dir", $exitStatus)) { if ($exitStatus) { exit($exitStatus); } From 9d24400b1f52c842c9d13feb376fd860966c1e9f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 12:05:33 +0200 Subject: [PATCH 12/55] [appveyor] fix bis --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8d335c600d716..e909b1beb4e8f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -56,7 +56,7 @@ install: - php composer.phar self-update - copy /Y .composer\* %APPDATA%\Composer\ - php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master - - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit + - php .github/build-packages.php %APPVEYOR_REPO_COMMIT%^^ src\Symfony\Bridge\PhpUnit - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) - php composer.phar config platform.php 5.3.9 - php composer.phar update --no-progress --no-suggest --ansi From 74b6689838625112aef5e696b932aec16ca04e6f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 14:29:28 +0200 Subject: [PATCH 13/55] [travis][appveyor] fix ter --- .github/build-packages.php | 9 ++++----- .travis.yml | 2 +- appveyor.yml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/build-packages.php b/.github/build-packages.php index 83f4b4336c89f..ab190c339a9f3 100644 --- a/.github/build-packages.php +++ b/.github/build-packages.php @@ -49,7 +49,7 @@ $packages[$package->name][$package->version] = $package; - $versions = file_get_contents('https://packagist.org/p/'.$package->name.'.json'); + $versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json')); $versions = json_decode($versions)->packages->{$package->name}; if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) { @@ -74,8 +74,7 @@ 'type' => 'composer', 'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/', )); - if (false === strpos($json, "\n \"repositories\": [\n")) { - $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); - file_put_contents('composer.json', $json); - } + $json = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json); + $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); + file_put_contents('composer.json', $json); } diff --git a/.travis.yml b/.travis.yml index f646b2997118c..8ee26e5249af2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ dist: trusty sudo: false git: - depth: 1 + depth: 2 addons: apt_packages: diff --git a/appveyor.yml b/appveyor.yml index e909b1beb4e8f..2e04c58473b13 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ build: false -clone_depth: 1 +clone_depth: 2 clone_folder: c:\projects\symfony cache: From f9bd8acc580f69d3af8bea56dcc31f1d2322a4d8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 15:07:08 +0200 Subject: [PATCH 14/55] [travis] minor fix (quater) --- .github/rm-invalid-lowest-lock-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/rm-invalid-lowest-lock-files.php b/.github/rm-invalid-lowest-lock-files.php index c71463262171a..3105942a09030 100644 --- a/.github/rm-invalid-lowest-lock-files.php +++ b/.github/rm-invalid-lowest-lock-files.php @@ -79,7 +79,7 @@ function getContentHash(array $composerJson) continue 2; } - if (isset($composerJsons[$name][2]['repositories']) && !isset($lockedJson[$key]['repositories'])) { + if (isset($composerJsons[$name][2]['repositories']) && !isset($lockedJson['repositories'])) { // the locked package has been patched locally but the lock references a commit, // which means the referencing package itself is not modified continue; From b133bd6bd30e54f9dfedff68f998def65988ae03 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Mon, 3 Sep 2018 20:51:33 +0200 Subject: [PATCH 15/55] chore: rename Appveyor filename --- appveyor.yml => .appveyor.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename appveyor.yml => .appveyor.yml (100%) diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml From 62e620843e30a228fc830783215384b68f31ba5f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Sep 2018 07:42:16 +0200 Subject: [PATCH 16/55] fixed usage of setUp in tests --- .../Component/Security/Csrf/Tests/CsrfTokenManagerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php b/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php index 214a189e99b17..2ec282144cfe3 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php @@ -210,12 +210,12 @@ private function getGeneratorAndStorage() ); } - public function setUp() + protected function setUp() { $_SERVER['HTTPS'] = 'on'; } - public function tearDown() + protected function tearDown() { parent::tearDown(); From 255455430a9363b5b7862e8729d870533e34826c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 3 Sep 2018 16:40:22 +0200 Subject: [PATCH 17/55] [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients --- src/Symfony/Bundle/FrameworkBundle/Client.php | 20 +++++++++---------- src/Symfony/Component/HttpKernel/Client.php | 16 +++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Client.php b/src/Symfony/Bundle/FrameworkBundle/Client.php index 6cd0832b13cd0..d8c7380d18e89 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Client.php +++ b/src/Symfony/Bundle/FrameworkBundle/Client.php @@ -161,19 +161,19 @@ protected function doRequestInProcess($request) */ protected function getScript($request) { - $kernel = str_replace("'", "\\'", serialize($this->kernel)); - $request = str_replace("'", "\\'", serialize($request)); + $kernel = var_export(serialize($this->kernel), true); + $request = var_export(serialize($request), true); $r = new \ReflectionObject($this->kernel); $autoloader = \dirname($r->getFileName()).'/autoload.php'; if (is_file($autoloader)) { - $autoloader = str_replace("'", "\\'", $autoloader); + $autoloader = var_export($autoloader, true); } else { - $autoloader = ''; + $autoloader = 'false'; } - $path = str_replace("'", "\\'", $r->getFileName()); + $path = var_export($r->getFileName(), true); $profilerCode = ''; if ($this->profiler) { @@ -187,16 +187,16 @@ protected function getScript($request) error_reporting($errorReporting); -if ('$autoloader') { - require_once '$autoloader'; +if ($autoloader) { + require_once $autoloader; } -require_once '$path'; +require_once $path; -\$kernel = unserialize('$kernel'); +\$kernel = unserialize($kernel); \$kernel->boot(); $profilerCode -\$request = unserialize('$request'); +\$request = unserialize($request); EOF; return $code.$this->getHandleScript(); diff --git a/src/Symfony/Component/HttpKernel/Client.php b/src/Symfony/Component/HttpKernel/Client.php index 49f0e4c16943f..2175b567a76d6 100644 --- a/src/Symfony/Component/HttpKernel/Client.php +++ b/src/Symfony/Component/HttpKernel/Client.php @@ -71,12 +71,12 @@ protected function doRequest($request) */ protected function getScript($request) { - $kernel = str_replace("'", "\\'", serialize($this->kernel)); - $request = str_replace("'", "\\'", serialize($request)); + $kernel = var_export(serialize($this->kernel), true); + $request = var_export(serialize($request), true); $r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\ClassLoader'); - $requirePath = str_replace("'", "\\'", $r->getFileName()); - $symfonyPath = str_replace("'", "\\'", \dirname(\dirname(\dirname(__DIR__)))); + $requirePath = var_export($r->getFileName(), true); + $symfonyPath = var_export(\dirname(\dirname(\dirname(__DIR__))), true); $errorReporting = error_reporting(); $code = <<addPrefix('Symfony', '$symfonyPath'); +\$loader->addPrefix('Symfony', $symfonyPath); \$loader->register(); -\$kernel = unserialize('$kernel'); -\$request = unserialize('$request'); +\$kernel = unserialize($kernel); +\$request = unserialize($request); EOF; return $code.$this->getHandleScript(); From ef1f7ff0bb1f3ac80c34505148532c3a34ab0bd3 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 23 Jul 2018 10:03:04 +0200 Subject: [PATCH 18/55] remove cache warmers when Twig cache is disabled --- .../DependencyInjection/Compiler/ExtensionPass.php | 9 +++++++-- .../TwigBundle/DependencyInjection/TwigExtension.php | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php index b91744781a1bb..4420a02b30bf2 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -49,10 +49,15 @@ public function process(ContainerBuilder $container) $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 = $container->getDefinition('twig.template_iterator')->getArgument(2); $paths[$coreThemePath] = null; - $container->getDefinition('twig.cache_warmer')->replaceArgument(2, $paths); $container->getDefinition('twig.template_iterator')->replaceArgument(2, $paths); + + if ($container->hasDefinition('twig.cache_warmer')) { + $paths = $container->getDefinition('twig.cache_warmer')->getArgument(2); + $paths[$coreThemePath] = null; + $container->getDefinition('twig.cache_warmer')->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 f23147440ed2e..2b5f1d1a4ed39 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -132,6 +132,11 @@ public function load(array $configs, ContainerBuilder $container) $container->getDefinition('twig')->replaceArgument(1, $config); + if (false === $config['cache']) { + $container->removeDefinition('twig.cache_warmer'); + $container->removeDefinition('twig.template_cache_warmer'); + } + $this->addClassesToCompile(array( 'Twig_Environment', 'Twig_Extension', From 90494c20cc1f029293d12b480c280cb056751a2b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 5 Sep 2018 07:00:57 +0200 Subject: [PATCH 19/55] Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)" This reverts commit 487f8acde58baf73c601f480b217488e549caca2, reversing changes made to cf359c2e79c85992bfcd3cd7588eb6cbea2a2f80. --- .../Component/Routing/Generator/UrlGeneratorInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index c7f4fca74418c..f501ebd9a8389 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -73,7 +73,7 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * @param mixed $parameters An array of parameters * @param int $referenceType The type of reference to be generated (one of the constants) * - * @return string|null The generated URL + * @return string The generated URL * * @throws RouteNotFoundException If the named route doesn't exist * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route From 992a174470fd557e1cddccd3a35447209602aea3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 5 Sep 2018 13:23:46 +0200 Subject: [PATCH 20/55] [appveyor] fix --- .appveyor.yml | 2 +- .github/build-packages.php | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2e04c58473b13..8fb89ca158094 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -56,7 +56,7 @@ install: - php composer.phar self-update - copy /Y .composer\* %APPDATA%\Composer\ - php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master - - php .github/build-packages.php %APPVEYOR_REPO_COMMIT%^^ src\Symfony\Bridge\PhpUnit + - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) - php composer.phar config platform.php 5.3.9 - php composer.phar update --no-progress --no-suggest --ansi diff --git a/.github/build-packages.php b/.github/build-packages.php index ab190c339a9f3..b09cea2fe230a 100644 --- a/.github/build-packages.php +++ b/.github/build-packages.php @@ -6,15 +6,20 @@ } chdir(dirname(__DIR__)); +$json = ltrim(file_get_contents('composer.json')); +if ($json !== $package = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json)) { + file_put_contents('composer.json', $package); +} + $dirs = $_SERVER['argv']; array_shift($dirs); -$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs)))); +$mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($dirs)))); $packages = array(); $flags = \PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0; foreach ($dirs as $k => $dir) { - if (!system("git diff --name-only \"$mergeBase\" -- $dir", $exitStatus)) { + if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) { if ($exitStatus) { exit($exitStatus); } @@ -74,7 +79,6 @@ 'type' => 'composer', 'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/', )); - $json = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json); $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); file_put_contents('composer.json', $json); } From a4347a4389018aa21af19a1a791b83419ca32330 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Date: Thu, 6 Sep 2018 10:47:51 +0100 Subject: [PATCH 21/55] Update .editorconfig --- .editorconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 153cf3ef5bd04..d769b46a4b6ff 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,8 +3,17 @@ root = true ; Unix-style newlines [*] +charset = utf-8 end_of_line = LF +insert_final_newline = true +trim_trailing_whitespace = true -[*.php] +[*.{php,html,twig}] indent_style = space indent_size = 4 + +[*.md] +max_line_length = 80 + +[COMMIT_EDITMSG] +max_line_length = 0 From 6d155ed059e63f5ff1cb2dec4dfba3b7be04f7bd Mon Sep 17 00:00:00 2001 From: SpacePossum Date: Thu, 6 Sep 2018 19:11:15 +0200 Subject: [PATCH 22/55] fix fopen calls --- src/Symfony/Component/Process/Process.php | 4 ++-- src/Symfony/Component/Translation/Dumper/CsvFileDumper.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 9589136c6b096..b0a5916adfcaa 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1413,8 +1413,8 @@ private function resetProcessData() $this->exitcode = null; $this->fallbackStatus = array(); $this->processInformation = null; - $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+'); - $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+'); + $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); + $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); $this->process = null; $this->latestSignal = null; $this->status = self::STATUS_READY; diff --git a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php index 18caa3657d2f5..36fd5b382cd30 100644 --- a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php @@ -38,7 +38,7 @@ public function format(MessageCatalogue $messages, $domain = 'messages') */ public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) { - $handle = fopen('php://memory', 'rb+'); + $handle = fopen('php://memory', 'r+b'); foreach ($messages->all($domain) as $source => $target) { fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); From 253d0a683b3e5390fa5944f709f2d077af028673 Mon Sep 17 00:00:00 2001 From: Franz Wilding Date: Mon, 14 May 2018 10:16:24 +0200 Subject: [PATCH 23/55] [Form] Fix DateTimeType html5 input format --- ...ateTimeToHtml5DateTimeLocalTransformer.php | 97 +++++++++++++ .../Form/Extension/Core/Type/DateTimeType.php | 21 +-- .../Tests/AbstractBootstrap3LayoutTest.php | 4 +- .../Form/Tests/AbstractLayoutTest.php | 4 +- ...meToHtml5DateTimeLocaleTransformerTest.php | 129 ++++++++++++++++++ .../Extension/Core/Type/DateTimeTypeTest.php | 12 +- 6 files changed, 240 insertions(+), 27 deletions(-) create mode 100644 src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php create mode 100644 src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php new file mode 100644 index 0000000000000..10b2e9aa7feed --- /dev/null +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Extension\Core\DataTransformer; + +use Symfony\Component\Form\Exception\TransformationFailedException; + +/** + * @author Franz Wilding + * @author Bernhard Schussek + */ +class DateTimeToHtml5DateTimeLocalTransformer extends BaseDateTimeTransformer +{ + const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; + + /** + * Transforms a normalized date into a localized date without trailing timezone. + * + * According to the HTML standard, the input string of a datetime-local + * input is a RFC3339 date followed by 'T', followed by a RFC3339 time. + * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local + * + * @param \DateTime|\DateTimeInterface $dateTime A DateTime object + * + * @return string The formatted date + * + * @throws TransformationFailedException If the given value is not an + * instance of \DateTime or \DateTimeInterface + */ + public function transform($dateTime) + { + if (null === $dateTime) { + return ''; + } + + if (!$dateTime instanceof \DateTime && !$dateTime instanceof \DateTimeInterface) { + throw new TransformationFailedException('Expected a \DateTime or \DateTimeInterface.'); + } + + if ($this->inputTimezone !== $this->outputTimezone) { + if (!$dateTime instanceof \DateTimeImmutable) { + $dateTime = clone $dateTime; + } + + $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); + } + + return $dateTime->format(self::HTML5_FORMAT); + } + + /** + * Transforms a formatted datetime-local string into a normalized date. + * + * @param string $dateTimeLocal Formatted string + * + * @return \DateTime Normalized date + * + * @throws TransformationFailedException If the given value is not a string, + * if the value could not be transformed + */ + public function reverseTransform($dateTimeLocal) + { + if (!\is_string($dateTimeLocal)) { + throw new TransformationFailedException('Expected a string.'); + } + + if ('' === $dateTimeLocal) { + return; + } + + try { + $dateTime = new \DateTime($dateTimeLocal, new \DateTimeZone($this->outputTimezone)); + } catch (\Exception $e) { + throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); + } + + if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { + $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); + } + + if (preg_match('/(\d{4})-(\d{2})-(\d{2})/', $dateTimeLocal, $m)) { + if (!checkdate($m[2], $m[3], $m[1])) { + throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $m[1], $m[2], $m[3])); + } + } + + return $dateTime; + } +} diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index e6598a3f10cd0..28df7eb7eda7b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -15,8 +15,8 @@ use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5DateTimeLocalTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToRfc3339Transformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; use Symfony\Component\Form\FormBuilderInterface; @@ -33,21 +33,8 @@ class DateTimeType extends AbstractType const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM; /** - * This is not quite the HTML5 format yet, because ICU lacks the - * capability of parsing and generating RFC 3339 dates. - * - * For more information see: - * - * http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax - * https://www.w3.org/TR/html5/sec-forms.html#local-date-and-time-state-typedatetimelocal - * http://tools.ietf.org/html/rfc3339 - * - * An ICU ticket was created: - * http://icu-project.org/trac/ticket/9421 - * - * It was supposedly fixed, but is not available in all PHP installations - * yet. To temporarily circumvent this issue, DateTimeToRfc3339Transformer - * is used when the format matches this constant. + * The HTML5 datetime-local format as defined in + * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local. */ const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; @@ -88,7 +75,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) if ('single_text' === $options['widget']) { if (self::HTML5_FORMAT === $pattern) { - $builder->addViewTransformer(new DateTimeToRfc3339Transformer( + $builder->addViewTransformer(new DateTimeToHtml5DateTimeLocalTransformer( $options['model_timezone'], $options['view_timezone'] )); diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php index 576b29e52616d..ef3c17a4c692d 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php @@ -1603,7 +1603,7 @@ public function testDateTimeWithWidgetSingleText() [@type="datetime-local"] [@name="name"] [@class="my&class form-control"] - [@value="2011-02-03T04:05:06Z"] + [@value="2011-02-03T04:05:06"] ' ); } @@ -1624,7 +1624,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets() [@type="datetime-local"] [@name="name"] [@class="my&class form-control"] - [@value="2011-02-03T04:05:06Z"] + [@value="2011-02-03T04:05:06"] ' ); } diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index fbeab910928bc..1d5ebc96a2952 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -1502,7 +1502,7 @@ public function testDateTimeWithWidgetSingleText() '/input [@type="datetime-local"] [@name="name"] - [@value="2011-02-03T04:05:06Z"] + [@value="2011-02-03T04:05:06"] ' ); } @@ -1522,7 +1522,7 @@ public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets() '/input [@type="datetime-local"] [@name="name"] - [@value="2011-02-03T04:05:06Z"] + [@value="2011-02-03T04:05:06"] ' ); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php new file mode 100644 index 0000000000000..f2645ac0c5e3a --- /dev/null +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5DateTimeLocalTransformer; + +class DateTimeToHtml5DateTimeLocaleTransformerTest extends TestCase +{ + public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) + { + if ($expected instanceof \DateTime && $actual instanceof \DateTime) { + $expected = $expected->format('c'); + $actual = $actual->format('c'); + } + + parent::assertEquals($expected, $actual, $message, $delta, $maxDepth, $canonicalize, $ignoreCase); + } + + public function transformProvider() + { + return array( + array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'), + array('UTC', 'UTC', null, ''), + array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'), + array('America/New_York', 'Asia/Hong_Kong', null, ''), + array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'), + array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'), + ); + } + + public function reverseTransformProvider() + { + return array( + // format without seconds, as appears in some browsers + array('UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'), + array('UTC', 'UTC', null, ''), + array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:06 America/New_York', '2010-02-03T17:05:06'), + array('America/New_York', 'Asia/Hong_Kong', null, ''), + array('UTC', 'Asia/Hong_Kong', '2010-02-03 04:05:06 UTC', '2010-02-03T12:05:06'), + array('America/New_York', 'UTC', '2010-02-03 04:05:06 America/New_York', '2010-02-03T09:05:06'), + array('UTC', 'UTC', '2010-02-03 04:05:00 UTC', '2010-02-03T04:05'), + array('America/New_York', 'Asia/Hong_Kong', '2010-02-03 04:05:00 America/New_York', '2010-02-03T17:05'), + array('Europe/Amsterdam', 'Europe/Amsterdam', '2013-08-21 10:30:00 Europe/Amsterdam', '2013-08-21T10:30:00'), + ); + } + + /** + * @dataProvider transformProvider + */ + public function testTransform($fromTz, $toTz, $from, $to) + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer($fromTz, $toTz); + + $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTime($from) : null)); + } + + /** + * @dataProvider transformProvider + * @requires PHP 5.5 + */ + public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to) + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer($fromTz, $toTz); + + $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTimeImmutable($from) : null)); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testTransformRequiresValidDateTime() + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer(); + $transformer->transform('2010-01-01'); + } + + /** + * @dataProvider reverseTransformProvider + */ + public function testReverseTransform($toTz, $fromTz, $to, $from) + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer($toTz, $fromTz); + + if (null !== $to) { + $this->assertEquals(new \DateTime($to), $transformer->reverseTransform($from)); + } else { + $this->assertNull($transformer->reverseTransform($from)); + } + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformRequiresString() + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer(); + $transformer->reverseTransform(12345); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformWithNonExistingDate() + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer('UTC', 'UTC'); + + $transformer->reverseTransform('2010-04-31T04:05'); + } + + /** + * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException + */ + public function testReverseTransformExpectsValidDateString() + { + $transformer = new DateTimeToHtml5DateTimeLocalTransformer('UTC', 'UTC'); + + $transformer->reverseTransform('2010-2010-2010'); + } +} diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php index f4bc3f8827276..27c6581f0bea0 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -221,12 +221,12 @@ public function testSubmitDifferentTimezonesDateTime() $outputTime = new \DateTime('2010-06-02 03:04:00 Pacific/Tahiti'); - $form->submit('2010-06-02T03:04:00-10:00'); + $form->submit('2010-06-02T03:04:00'); $outputTime->setTimezone(new \DateTimeZone('America/New_York')); $this->assertEquals($outputTime, $form->getData()); - $this->assertEquals('2010-06-02T03:04:00-10:00', $form->getViewData()); + $this->assertEquals('2010-06-02T03:04:00', $form->getViewData()); } public function testSubmitStringSingleText() @@ -238,10 +238,10 @@ public function testSubmitStringSingleText() 'widget' => 'single_text', )); - $form->submit('2010-06-02T03:04:00Z'); + $form->submit('2010-06-02T03:04:00'); $this->assertEquals('2010-06-02 03:04:00', $form->getData()); - $this->assertEquals('2010-06-02T03:04:00Z', $form->getViewData()); + $this->assertEquals('2010-06-02T03:04:00', $form->getViewData()); } public function testSubmitStringSingleTextWithSeconds() @@ -254,10 +254,10 @@ public function testSubmitStringSingleTextWithSeconds() 'with_seconds' => true, )); - $form->submit('2010-06-02T03:04:05Z'); + $form->submit('2010-06-02T03:04:05'); $this->assertEquals('2010-06-02 03:04:05', $form->getData()); - $this->assertEquals('2010-06-02T03:04:05Z', $form->getViewData()); + $this->assertEquals('2010-06-02T03:04:05', $form->getViewData()); } public function testSubmitDifferentPattern() From c51dda0fe152adfa95249e9d801f96e4202ed53b Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 8 Sep 2018 13:31:39 +0200 Subject: [PATCH 24/55] [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default --- .../Console/Helper/SymfonyQuestionHelper.php | 2 +- .../Tests/Helper/SymfonyQuestionHelperTest.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php index 94596d4af5305..cfcdf44e3a98c 100644 --- a/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php @@ -82,7 +82,7 @@ protected function writePrompt(OutputInterface $output, Question $question) case $question instanceof ChoiceQuestion: $choices = $question->getChoices(); - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default])); + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(isset($choices[$default]) ? $choices[$default] : $default)); break; diff --git a/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php index bbd0fa8f742a3..500dd190b20be 100644 --- a/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php @@ -75,6 +75,19 @@ public function testAskChoice() $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output); } + public function testAskChoiceWithChoiceValueAsDefault() + { + $questionHelper = new SymfonyQuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $questionHelper->setHelperSet($helperSet); + $questionHelper->setInputStream($this->getInputStream("Batman\n")); + $question = new ChoiceQuestion('What is your favorite superhero?', array('Superman', 'Batman', 'Spiderman'), 'Batman'); + $question->setMaxAttempts(1); + + $this->assertSame('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + $this->assertOutputContains('What is your favorite superhero? [Batman]', $output); + } + public function testAskReturnsNullIfValidatorAllowsIt() { $questionHelper = new SymfonyQuestionHelper(); From 83a75f4313ba1d8e03707840e8daac352898f037 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Wed, 5 Sep 2018 20:27:19 -0400 Subject: [PATCH 25/55] Caching missed templates on cache warmup --- src/Symfony/Bundle/TwigBundle/TemplateIterator.php | 2 +- .../Fixtures/templates/Resources/BarBundle/views/base.html.twig | 0 src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig diff --git a/src/Symfony/Bundle/TwigBundle/TemplateIterator.php b/src/Symfony/Bundle/TwigBundle/TemplateIterator.php index cc93e27b5577b..3c6a615382784 100644 --- a/src/Symfony/Bundle/TwigBundle/TemplateIterator.php +++ b/src/Symfony/Bundle/TwigBundle/TemplateIterator.php @@ -57,7 +57,7 @@ public function getIterator() $this->templates = array_merge( $this->templates, $this->findTemplatesInDirectory($bundle->getPath().'/Resources/views', $name), - $this->findTemplatesInDirectory($this->rootDir.'/'.$bundle->getName().'/views', $name) + $this->findTemplatesInDirectory($this->rootDir.'/Resources/'.$bundle->getName().'/views', $name) ); } diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig b/src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php b/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php index 636d5796f874f..1b2835ccb2711 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php @@ -31,6 +31,7 @@ public function testGetIterator() sort($sorted); $this->assertEquals( array( + '@Bar/base.html.twig', '@Bar/index.html.twig', '@Foo/index.html.twig', 'layout.html.twig', From 721dc8661fd7d81b8e999b72c85df11707de90c6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 8 Sep 2018 14:44:02 +0200 Subject: [PATCH 26/55] Consistently throw exceptions on a single line --- .../Form/ChoiceList/EntityChoiceList.php | 5 +- .../Doctrine/Form/Type/DoctrineType.php | 6 +- .../Bundle/FrameworkBundle/Routing/Router.php | 9 +-- .../Factory/GuardAuthenticationFactory.php | 10 +-- .../Component/Config/Definition/ArrayNode.php | 23 ++---- .../Component/Config/Definition/BaseNode.php | 7 +- .../Config/Definition/BooleanNode.php | 6 +- .../Builder/ArrayNodeDefinition.php | 32 +++------ .../Component/Config/Definition/EnumNode.php | 6 +- .../Config/Definition/PrototypedArrayNode.php | 18 ++--- .../Config/Definition/ScalarNode.php | 6 +- .../Config/Definition/VariableNode.php | 6 +- .../Formatter/OutputFormatterStyle.php | 24 ++----- .../XPath/Extension/FunctionExtension.php | 10 +-- .../XPath/Extension/HtmlExtension.php | 5 +- .../Compiler/CheckDefinitionValidityPass.php | 8 +-- .../Compiler/CheckReferenceValidityPass.php | 7 +- .../Loader/XmlFileLoader.php | 8 +-- .../Loader/YamlFileLoader.php | 8 +-- .../Filesystem/Tests/FilesystemTest.php | 2 +- .../Form/ChoiceList/ArrayKeyChoiceList.php | 5 +- .../ArrayToPartsTransformer.php | 4 +- .../DateTimeToArrayTransformer.php | 4 +- .../DateTimeToRfc3339Transformer.php | 7 +- .../DateTimeToStringTransformer.php | 7 +- .../NumberToLocalizedStringTransformer.php | 4 +- .../ValueToDuplicatesTransformer.php | 8 +-- .../FixCheckboxInputListener.php | 5 +- .../Form/Extension/Core/Type/ChoiceType.php | 5 +- .../DependencyInjectionExtension.php | 16 +---- src/Symfony/Component/Form/Form.php | 38 ++-------- .../Component/Form/FormConfigBuilder.php | 11 +-- .../Component/Form/FormErrorIterator.php | 7 +- .../Component/Form/ResolvedFormType.php | 6 +- .../Form/Test/FormPerformanceTestCase.php | 9 +-- .../Handler/MemcacheSessionHandler.php | 4 +- .../Handler/MemcachedSessionHandler.php | 4 +- .../Component/HttpKernel/Bundle/Bundle.php | 5 +- src/Symfony/Component/HttpKernel/Kernel.php | 6 +- .../Data/Bundle/Compiler/GenrbCompiler.php | 12 +--- .../Data/Bundle/Reader/IntlBundleReader.php | 6 +- .../Data/Bundle/Reader/JsonBundleReader.php | 16 +---- .../Data/Bundle/Reader/PhpBundleReader.php | 12 +--- .../Data/Generator/LanguageDataGenerator.php | 19 +---- .../Intl/Data/Util/RecursiveArrayAccess.php | 5 +- .../Component/Intl/Data/Util/RingBuffer.php | 5 +- .../DateFormat/TimeZoneTransformer.php | 5 +- .../Intl/NumberFormatter/NumberFormatter.php | 5 +- .../OptionsResolver/OptionsResolver.php | 71 ++++--------------- .../PropertyAccess/PropertyAccessor.php | 13 +--- .../Component/PropertyAccess/PropertyPath.php | 14 +--- .../Routing/Loader/YamlFileLoader.php | 20 ++---- .../Firewall/GuardAuthenticationListener.php | 5 +- .../Guard/GuardAuthenticatorHandler.php | 12 +--- .../Normalizer/AbstractNormalizer.php | 13 +--- .../Component/Validator/Constraint.php | 20 ++---- .../Constraints/AbstractComparison.php | 5 +- .../Constraints/CallbackValidator.php | 5 +- .../Validator/Constraints/Composite.php | 8 +-- .../Validator/Constraints/GroupSequence.php | 5 +- .../Validator/Constraints/Traverse.php | 5 +- .../Component/Validator/Constraints/Valid.php | 5 +- .../Validator/Mapping/ClassMetadata.php | 10 +-- .../Validator/Mapping/GenericMetadata.php | 6 +- .../Validator/Mapping/MemberMetadata.php | 5 +- src/Symfony/Component/Validator/Validator.php | 16 +---- .../RecursiveContextualValidator.php | 40 ++--------- 67 files changed, 130 insertions(+), 594 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index b196e8918344c..6b0766fada05a 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -530,10 +530,7 @@ private function getSingleIdentifierValue($entity) private function getIdentifierValues($entity) { if (!$this->em->contains($entity)) { - throw new RuntimeException( - 'Entities passed to the choice field must be managed. Maybe '. - 'persist them in the entity manager?' - ); + throw new RuntimeException('Entities passed to the choice field must be managed. Maybe persist them in the entity manager?'); } $this->em->initializeObject($entity); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index f76872a5818c7..8fef469f2c042 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -237,11 +237,7 @@ public function configureOptions(OptionsResolver $resolver) $em = $registry->getManagerForClass($options['class']); if (null === $em) { - throw new RuntimeException(sprintf( - 'Class "%s" seems not to be a managed Doctrine entity. '. - 'Did you forget to map it?', - $options['class'] - )); + throw new RuntimeException(sprintf('Class "%s" seems not to be a managed Doctrine entity. Did you forget to map it?', $options['class'])); } return $em; diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php index 82c2f1b70de71..a6835b70bc60b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -152,14 +152,7 @@ private function resolve($value) return (string) $resolved; } - throw new RuntimeException(sprintf( - 'The container parameter "%s", used in the route configuration value "%s", '. - 'must be a string or numeric, but it is of type %s.', - $match[1], - $value, - \gettype($resolved) - ) - ); + throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type %s.', $match[1], $value, \gettype($resolved))); }, $value); return str_replace('%%', '%', $escapedValue); diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php index 8970051c27512..df3642b553530 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php @@ -94,10 +94,7 @@ private function determineEntryPoint($defaultEntryPointId, array $config) if ($defaultEntryPointId) { // explode if they've configured the entry_point, but there is already one if ($config['entry_point']) { - throw new \LogicException(sprintf( - 'The guard authentication provider cannot use the "%s" entry_point because another entry point is already configured by another provider! Either remove the other provider or move the entry_point configuration as a root key under your firewall (i.e. at the same level as "guard").', - $config['entry_point'] - )); + throw new \LogicException(sprintf('The guard authentication provider cannot use the "%s" entry_point because another entry point is already configured by another provider! Either remove the other provider or move the entry_point configuration as a root key under your firewall (i.e. at the same level as "guard").', $config['entry_point'])); } return $defaultEntryPointId; @@ -115,9 +112,6 @@ private function determineEntryPoint($defaultEntryPointId, array $config) } // we have multiple entry points - we must ask them to configure one - throw new \LogicException(sprintf( - 'Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of your configurators (%s)', - implode(', ', $authenticatorIds) - )); + throw new \LogicException(sprintf('Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of your configurators (%s)', implode(', ', $authenticatorIds))); } } diff --git a/src/Symfony/Component/Config/Definition/ArrayNode.php b/src/Symfony/Component/Config/Definition/ArrayNode.php index 1ab4a3ae59e43..c8cb82c41ff9c 100644 --- a/src/Symfony/Component/Config/Definition/ArrayNode.php +++ b/src/Symfony/Component/Config/Definition/ArrayNode.php @@ -219,15 +219,13 @@ public function addChild(NodeInterface $node) protected function finalizeValue($value) { if (false === $value) { - $msg = sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)); - throw new UnsetKeyException($msg); + throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value))); } foreach ($this->children as $name => $child) { if (!array_key_exists($name, $value)) { if ($child->isRequired()) { - $msg = sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()); - $ex = new InvalidConfigurationException($msg); + $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -260,11 +258,7 @@ protected function finalizeValue($value) protected function validateType($value) { if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { - $ex = new InvalidTypeException(sprintf( - 'Invalid type for path "%s". Expected array, but got %s', - $this->getPath(), - \gettype($value) - )); + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected array, but got %s', $this->getPath(), \gettype($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } @@ -303,8 +297,7 @@ protected function normalizeValue($value) // if extra fields are present, throw exception if (\count($value) && !$this->ignoreExtraKeys) { - $msg = sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); - $ex = new InvalidConfigurationException($msg); + $ex = new InvalidConfigurationException(sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -363,13 +356,7 @@ protected function mergeValues($leftSide, $rightSide) // no conflict if (!array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf( - 'You are not allowed to define new elements for path "%s". ' - .'Please define all elements for this path in one config file. ' - .'If you are trying to overwrite an element, make sure you redefine it ' - .'with the same name.', - $this->getPath() - )); + $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); $ex->setPath($this->getPath()); throw $ex; diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/Component/Config/Definition/BaseNode.php index 8885775e607dc..c78b6e762738c 100644 --- a/src/Symfony/Component/Config/Definition/BaseNode.php +++ b/src/Symfony/Component/Config/Definition/BaseNode.php @@ -205,12 +205,7 @@ public function getPath() final public function merge($leftSide, $rightSide) { if (!$this->allowOverwrite) { - throw new ForbiddenOverwriteException(sprintf( - 'Configuration path "%s" cannot be overwritten. You have to ' - .'define all options for this path, and any of its sub-paths in ' - .'one configuration section.', - $this->getPath() - )); + throw new ForbiddenOverwriteException(sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath())); } $this->validateType($leftSide); diff --git a/src/Symfony/Component/Config/Definition/BooleanNode.php b/src/Symfony/Component/Config/Definition/BooleanNode.php index 77e90cf7d624a..85f467b6bea92 100644 --- a/src/Symfony/Component/Config/Definition/BooleanNode.php +++ b/src/Symfony/Component/Config/Definition/BooleanNode.php @@ -26,11 +26,7 @@ class BooleanNode extends ScalarNode protected function validateType($value) { if (!\is_bool($value)) { - $ex = new InvalidTypeException(sprintf( - 'Invalid type for path "%s". Expected boolean, but got %s.', - $this->getPath(), - \gettype($value) - )); + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected boolean, but got %s.', $this->getPath(), \gettype($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php index 27fadba6f8ab6..31e918af1ce47 100644 --- a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -411,27 +411,19 @@ protected function validateConcreteNode(ArrayNode $node) $path = $node->getPath(); if (null !== $this->key) { - throw new InvalidDefinitionException( - sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path)); } if (true === $this->atLeastOne) { - throw new InvalidDefinitionException( - sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path)); } if ($this->default) { - throw new InvalidDefinitionException( - sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path)); } if (false !== $this->addDefaultChildren) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path)); } } @@ -445,28 +437,20 @@ protected function validatePrototypeNode(PrototypedArrayNode $node) $path = $node->getPath(); if ($this->addDefaults) { - throw new InvalidDefinitionException( - sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s"', $path)); } if (false !== $this->addDefaultChildren) { if ($this->default) { - throw new InvalidDefinitionException( - sprintf('A default value and default children might not be used together at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('A default value and default children might not be used together at path "%s"', $path)); } if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path)); } if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) { - throw new InvalidDefinitionException( - sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s"', $path) - ); + throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s"', $path)); } } } diff --git a/src/Symfony/Component/Config/Definition/EnumNode.php b/src/Symfony/Component/Config/Definition/EnumNode.php index 0cb40018b04fe..a214a854b7587 100644 --- a/src/Symfony/Component/Config/Definition/EnumNode.php +++ b/src/Symfony/Component/Config/Definition/EnumNode.php @@ -43,11 +43,7 @@ protected function finalizeValue($value) $value = parent::finalizeValue($value); if (!\in_array($value, $this->values, true)) { - $ex = new InvalidConfigurationException(sprintf( - 'The value %s is not allowed for path "%s". Permissible values: %s', - json_encode($value), - $this->getPath(), - implode(', ', array_map('json_encode', $this->values)))); + $ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values)))); $ex->setPath($this->getPath()); throw $ex; diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index 91e98eaeb3ddc..eddcb32a77871 100644 --- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -185,8 +185,7 @@ public function addChild(NodeInterface $node) protected function finalizeValue($value) { if (false === $value) { - $msg = sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)); - throw new UnsetKeyException($msg); + throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value))); } foreach ($value as $k => $v) { @@ -199,8 +198,7 @@ protected function finalizeValue($value) } if (\count($value) < $this->minNumberOfElements) { - $msg = sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements); - $ex = new InvalidConfigurationException($msg); + $ex = new InvalidConfigurationException(sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements)); $ex->setPath($this->getPath()); throw $ex; @@ -232,8 +230,7 @@ protected function normalizeValue($value) foreach ($value as $k => $v) { if (null !== $this->keyAttribute && \is_array($v)) { if (!isset($v[$this->keyAttribute]) && \is_int($k) && !$isAssoc) { - $msg = sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()); - $ex = new InvalidConfigurationException($msg); + $ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -262,8 +259,7 @@ protected function normalizeValue($value) } if (array_key_exists($k, $normalized)) { - $msg = sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath()); - $ex = new DuplicateKeyException($msg); + $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); $ex->setPath($this->getPath()); throw $ex; @@ -314,11 +310,7 @@ protected function mergeValues($leftSide, $rightSide) // no conflict if (!array_key_exists($k, $leftSide)) { if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf( - 'You are not allowed to define new elements for path "%s". '. - 'Please define all elements for this path in one config file.', - $this->getPath() - )); + $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); $ex->setPath($this->getPath()); throw $ex; diff --git a/src/Symfony/Component/Config/Definition/ScalarNode.php b/src/Symfony/Component/Config/Definition/ScalarNode.php index e63f3f227f702..53c1ed29c299d 100644 --- a/src/Symfony/Component/Config/Definition/ScalarNode.php +++ b/src/Symfony/Component/Config/Definition/ScalarNode.php @@ -33,11 +33,7 @@ class ScalarNode extends VariableNode protected function validateType($value) { if (!is_scalar($value) && null !== $value) { - $ex = new InvalidTypeException(sprintf( - 'Invalid type for path "%s". Expected scalar, but got %s.', - $this->getPath(), - \gettype($value) - )); + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected scalar, but got %s.', $this->getPath(), \gettype($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/src/Symfony/Component/Config/Definition/VariableNode.php b/src/Symfony/Component/Config/Definition/VariableNode.php index 0cd84c72bf303..1a3442d9613db 100644 --- a/src/Symfony/Component/Config/Definition/VariableNode.php +++ b/src/Symfony/Component/Config/Definition/VariableNode.php @@ -82,11 +82,7 @@ protected function validateType($value) protected function finalizeValue($value) { if (!$this->allowEmptyValue && $this->isValueEmpty($value)) { - $ex = new InvalidConfigurationException(sprintf( - 'The path "%s" cannot contain an empty value, but got %s.', - $this->getPath(), - json_encode($value) - )); + $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value))); if ($hint = $this->getInfo()) { $ex->addHint($hint); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 1f4e0cad1d1ec..b884d71343804 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -90,11 +90,7 @@ public function setForeground($color = null) } if (!isset(static::$availableForegroundColors[$color])) { - throw new InvalidArgumentException(sprintf( - 'Invalid foreground color specified: "%s". Expected one of (%s)', - $color, - implode(', ', array_keys(static::$availableForegroundColors)) - )); + throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors)))); } $this->foreground = static::$availableForegroundColors[$color]; @@ -116,11 +112,7 @@ public function setBackground($color = null) } if (!isset(static::$availableBackgroundColors[$color])) { - throw new InvalidArgumentException(sprintf( - 'Invalid background color specified: "%s". Expected one of (%s)', - $color, - implode(', ', array_keys(static::$availableBackgroundColors)) - )); + throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors)))); } $this->background = static::$availableBackgroundColors[$color]; @@ -136,11 +128,7 @@ public function setBackground($color = null) public function setOption($option) { if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf( - 'Invalid option specified: "%s". Expected one of (%s)', - $option, - implode(', ', array_keys(static::$availableOptions)) - )); + throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); } if (!\in_array(static::$availableOptions[$option], $this->options)) { @@ -158,11 +146,7 @@ public function setOption($option) public function unsetOption($option) { if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf( - 'Invalid option specified: "%s". Expected one of (%s)', - $option, - implode(', ', array_keys(static::$availableOptions)) - )); + throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); } $pos = array_search(static::$availableOptions[$option], $this->options); diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php index c2606b5ad4308..4d34d0ef2401b 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php @@ -150,10 +150,7 @@ public function translateContains(XPathExpr $xpath, FunctionNode $function) $arguments = $function->getArguments(); foreach ($arguments as $token) { if (!($token->isString() || $token->isIdentifier())) { - throw new ExpressionErrorException( - 'Expected a single string or identifier for :contains(), got ' - .implode(', ', $arguments) - ); + throw new ExpressionErrorException('Expected a single string or identifier for :contains(), got '.implode(', ', $arguments)); } } @@ -173,10 +170,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function) $arguments = $function->getArguments(); foreach ($arguments as $token) { if (!($token->isString() || $token->isIdentifier())) { - throw new ExpressionErrorException( - 'Expected a single string or identifier for :lang(), got ' - .implode(', ', $arguments) - ); + throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments)); } } diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php index 625ffa5cad670..cd8e0d5fd8677 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php @@ -158,10 +158,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function) $arguments = $function->getArguments(); foreach ($arguments as $token) { if (!($token->isString() || $token->isIdentifier())) { - throw new ExpressionErrorException( - 'Expected a single string or identifier for :lang(), got ' - .implode(', ', $arguments) - ); + throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments)); } } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php index f79a4b0f5b75f..ea1e089179a83 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php @@ -64,13 +64,7 @@ public function process(ContainerBuilder $container) throw new RuntimeException(sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id)); } - throw new RuntimeException(sprintf( - 'The definition for "%s" has no class. If you intend to inject ' - .'this service dynamically at runtime, please mark it as synthetic=true. ' - .'If this is an abstract definition solely used by child definitions, ' - .'please add abstract=true, otherwise specify a class to get rid of this error.', - $id - )); + throw new RuntimeException(sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id)); } // tag attribute values must be scalars diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php index 416103ec0e69d..2b380dd352a85 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php @@ -94,12 +94,7 @@ private function validateReferences(array $arguments) $targetDefinition = $this->getDefinition((string) $argument); if (null !== $targetDefinition && $targetDefinition->isAbstract()) { - throw new RuntimeException(sprintf( - 'The definition "%s" has a reference to an abstract definition "%s". ' - .'Abstract definitions cannot be the target of references.', - $this->currentId, - $argument - )); + throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $argument)); } $this->validateScope($argument, $targetDefinition); diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 82b578bec9dba..ecebe0125ec28 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -543,13 +543,7 @@ private function validateExtensions(\DOMDocument $dom, $file) // can it be handled by an extension? if (!$this->container->hasExtension($node->namespaceURI)) { $extensionNamespaces = array_filter(array_map(function ($ext) { return $ext->getNamespace(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf( - 'There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', - $node->tagName, - $file, - $node->namespaceURI, - $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none' - )); + throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', $node->tagName, $file, $node->namespaceURI, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none')); } } } diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 51bc768c0fed8..d25f654709b87 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -396,13 +396,7 @@ private function validate($content, $file) if (!$this->container->hasExtension($namespace)) { $extensionNamespaces = array_filter(array_map(function ($ext) { return $ext->getAlias(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf( - 'There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', - $namespace, - $file, - $namespace, - $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none' - )); + throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', $namespace, $file, $namespace, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none')); } } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 3488de078e6e4..20cbdfc123693 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -161,7 +161,7 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist() */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { - if (!in_array('https', stream_get_wrappers())) { + if (!\in_array('https', stream_get_wrappers())) { $this->markTestSkipped('"https" stream wrapper is not enabled.'); } $sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png'; diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php index 3a0168d170b5c..bfe4571e52da4 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php @@ -70,10 +70,7 @@ class ArrayKeyChoiceList extends ArrayChoiceList public static function toArrayKey($choice) { if (!is_scalar($choice) && null !== $choice) { - throw new InvalidArgumentException(sprintf( - 'The value of type "%s" cannot be converted to a valid array key.', - \gettype($choice) - )); + throw new InvalidArgumentException(sprintf('The value of type "%s" cannot be converted to a valid array key.', \gettype($choice))); } if (\is_bool($choice) || (string) (int) $choice === (string) $choice) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php index 53d4deddd379c..b09fba8532d48 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php @@ -76,9 +76,7 @@ public function reverseTransform($array) return; } - throw new TransformationFailedException( - sprintf('The keys "%s" should not be empty', implode('", "', $emptyKeys) - )); + throw new TransformationFailedException(sprintf('The keys "%s" should not be empty', implode('", "', $emptyKeys))); } return $result; diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php index aeb6abb42d142..2dcb702b8133d 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php @@ -135,9 +135,7 @@ public function reverseTransform($value) } if (\count($emptyFields) > 0) { - throw new TransformationFailedException( - sprintf('The fields "%s" should not be empty', implode('", "', $emptyFields) - )); + throw new TransformationFailedException(sprintf('The fields "%s" should not be empty', implode('", "', $emptyFields))); } if (isset($value['month']) && !ctype_digit((string) $value['month'])) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php index 7e72f9a11d87b..f905fb8665d21 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php @@ -81,12 +81,7 @@ public function reverseTransform($rfc3339) if (preg_match('/(\d{4})-(\d{2})-(\d{2})/', $rfc3339, $matches)) { if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf( - 'The date "%s-%s-%s" is not a valid date.', - $matches[1], - $matches[2], - $matches[3] - )); + throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); } } diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php index cb274603155d6..3eca981b4b15e 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php @@ -126,12 +126,7 @@ public function reverseTransform($value) $lastErrors = \DateTime::getLastErrors(); if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) { - throw new TransformationFailedException( - implode(', ', array_merge( - array_values($lastErrors['warnings']), - array_values($lastErrors['errors']) - )) - ); + throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors'])))); } try { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 2d166324abf78..531d6289841e9 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -225,9 +225,7 @@ public function reverseTransform($value) $remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0"); if ('' !== $remainder) { - throw new TransformationFailedException( - sprintf('The number contains unrecognized characters: "%s"', $remainder) - ); + throw new TransformationFailedException(sprintf('The number contains unrecognized characters: "%s"', $remainder)); } } diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php index c9adb0ad5a6fa..49032a6777c83 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php @@ -64,9 +64,7 @@ public function reverseTransform($array) foreach ($this->keys as $key) { if (isset($array[$key]) && '' !== $array[$key] && false !== $array[$key] && array() !== $array[$key]) { if ($array[$key] !== $result) { - throw new TransformationFailedException( - 'All values in the array should be the same' - ); + throw new TransformationFailedException('All values in the array should be the same'); } } else { $emptyKeys[] = $key; @@ -79,9 +77,7 @@ public function reverseTransform($array) return; } - throw new TransformationFailedException( - sprintf('The keys "%s" should not be empty', implode('", "', $emptyKeys) - )); + throw new TransformationFailedException(sprintf('The keys "%s" should not be empty', implode('", "', $emptyKeys))); } return $result; diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php index 5f9289280b961..559a70f69858e 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php @@ -66,10 +66,7 @@ public function preSubmit(FormEvent $event) } if (\count($submittedValues) > 0) { - throw new TransformationFailedException(sprintf( - 'The following choices were not found: "%s"', - implode('", "', array_keys($submittedValues)) - )); + throw new TransformationFailedException(sprintf('The following choices were not found: "%s"', implode('", "', array_keys($submittedValues)))); } } elseif ('' === $data || null === $data) { // Empty values are always accepted. diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index 63bea89cd60d0..6ae6cfe3a2daa 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -132,10 +132,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) // Throw exception if unknown values were submitted if (\count($unknownValues) > 0) { - throw new TransformationFailedException(sprintf( - 'The choices "%s" do not exist in the choice list.', - implode('", "', array_keys($unknownValues)) - )); + throw new TransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', implode('", "', array_keys($unknownValues)))); } $event->setData($data); diff --git a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php index 73683e426827b..9a0866f5229a7 100644 --- a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php @@ -43,13 +43,7 @@ public function getType($name) // BC: validate result of getName() for legacy names (non-FQCN) if ($name !== \get_class($type) && $type->getName() !== $name) { - throw new InvalidArgumentException( - sprintf('The type name specified for the service "%s" does not match the actual name. Expected "%s", given "%s"', - $this->typeServiceIds[$name], - $name, - $type->getName() - ) - ); + throw new InvalidArgumentException(sprintf('The type name specified for the service "%s" does not match the actual name. Expected "%s", given "%s"', $this->typeServiceIds[$name], $name, $type->getName())); } return $type; @@ -70,13 +64,7 @@ public function getTypeExtensions($name) // validate result of getExtendedType() to ensure it is consistent with the service definition if ($extension->getExtendedType() !== $name) { - throw new InvalidArgumentException( - sprintf('The extended type specified for the service "%s" does not match the actual extended type. Expected "%s", given "%s".', - $serviceId, - $name, - $extension->getExtendedType() - ) - ); + throw new InvalidArgumentException(sprintf('The extended type specified for the service "%s" does not match the actual extended type. Expected "%s", given "%s".', $serviceId, $name, $extension->getExtendedType())); } } } diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 819ce7273904b..923407383159b 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -359,13 +359,7 @@ public function setData($modelData) ? 'an instance of class '.\get_class($viewData) : 'a(n) '.\gettype($viewData); - throw new LogicException( - 'The form\'s view data is expected to be an instance of class '. - $dataClass.', but is '.$actualType.'. You can avoid this error '. - 'by setting the "data_class" option to null or by adding a view '. - 'transformer that transforms '.$actualType.' to an instance of '. - $dataClass.'.' - ); + throw new LogicException('The form\'s view data is expected to be an instance of class '.$dataClass.', but is '.$actualType.'. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms '.$actualType.' to an instance of '.$dataClass.'.'); } } @@ -915,11 +909,7 @@ public function add($child, $type = null, array $options = array()) $child = $this->config->getFormFactory()->createNamed($child, $type, null, $options); } } elseif ($child->getConfig()->getAutoInitialize()) { - throw new RuntimeException(sprintf( - 'Automatic initialization is only supported on root forms. You '. - 'should set the "auto_initialize" option to false on the field "%s".', - $child->getName() - )); + throw new RuntimeException(sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".', $child->getName())); } $this->children[$child->getName()] = $child; @@ -1093,11 +1083,7 @@ private function modelToNorm($value) $value = $transformer->transform($value); } } catch (TransformationFailedException $exception) { - throw new TransformationFailedException( - 'Unable to transform value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), - $exception->getCode(), - $exception - ); + throw new TransformationFailedException('Unable to transform value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), $exception->getCode(), $exception); } return $value; @@ -1121,11 +1107,7 @@ private function normToModel($value) $value = $transformers[$i]->reverseTransform($value); } } catch (TransformationFailedException $exception) { - throw new TransformationFailedException( - 'Unable to reverse value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), - $exception->getCode(), - $exception - ); + throw new TransformationFailedException('Unable to reverse value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), $exception->getCode(), $exception); } return $value; @@ -1156,11 +1138,7 @@ private function normToView($value) $value = $transformer->transform($value); } } catch (TransformationFailedException $exception) { - throw new TransformationFailedException( - 'Unable to transform value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), - $exception->getCode(), - $exception - ); + throw new TransformationFailedException('Unable to transform value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), $exception->getCode(), $exception); } return $value; @@ -1188,11 +1166,7 @@ private function viewToNorm($value) $value = $transformers[$i]->reverseTransform($value); } } catch (TransformationFailedException $exception) { - throw new TransformationFailedException( - 'Unable to reverse value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), - $exception->getCode(), - $exception - ); + throw new TransformationFailedException('Unable to reverse value for property path "'.$this->getPropertyPath().'": '.$exception->getMessage(), $exception->getCode(), $exception); } return $value; diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 34d5664e9f174..e2ab1310a6570 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -821,11 +821,7 @@ public function setMethod($method) $upperCaseMethod = strtoupper($method); if (!\in_array($upperCaseMethod, self::$allowedMethods)) { - throw new InvalidArgumentException(sprintf( - 'The form method is "%s", but should be one of "%s".', - $method, - implode('", "', self::$allowedMethods) - )); + throw new InvalidArgumentException(sprintf('The form method is "%s", but should be one of "%s".', $method, implode('", "', self::$allowedMethods))); } $this->method = $upperCaseMethod; @@ -892,10 +888,7 @@ public static function validateName($name) } if (!self::isValidName($name)) { - throw new InvalidArgumentException(sprintf( - 'The name "%s" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").', - $name - )); + throw new InvalidArgumentException(sprintf('The name "%s" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").', $name)); } } diff --git a/src/Symfony/Component/Form/FormErrorIterator.php b/src/Symfony/Component/Form/FormErrorIterator.php index 672029071befd..26bb23a129e86 100644 --- a/src/Symfony/Component/Form/FormErrorIterator.php +++ b/src/Symfony/Component/Form/FormErrorIterator.php @@ -50,12 +50,7 @@ public function __construct(FormInterface $form, array $errors) { foreach ($errors as $error) { if (!($error instanceof FormError || $error instanceof self)) { - throw new InvalidArgumentException(sprintf( - 'The errors must be instances of '. - '"\Symfony\Component\Form\FormError" or "%s". Got: "%s".', - __CLASS__, - \is_object($error) ? \get_class($error) : \gettype($error) - )); + throw new InvalidArgumentException(sprintf('The errors must be instances of "Symfony\Component\Form\FormError" or "%s". Got: "%s".', __CLASS__, \is_object($error) ? \get_class($error) : \gettype($error))); } } diff --git a/src/Symfony/Component/Form/ResolvedFormType.php b/src/Symfony/Component/Form/ResolvedFormType.php index 7837a95b9da95..b8a252ec3acab 100644 --- a/src/Symfony/Component/Form/ResolvedFormType.php +++ b/src/Symfony/Component/Form/ResolvedFormType.php @@ -86,11 +86,7 @@ public function __construct(FormTypeInterface $innerType, array $typeExtensions // As of Symfony 2.8, getName() returns the FQCN by default // Otherwise check that the name matches the old naming restrictions if ($hasCustomName && !preg_match('/^[a-z0-9_]*$/i', $name)) { - throw new InvalidArgumentException(sprintf( - 'The "%s" form type name ("%s") is not valid. Names must only contain letters, numbers, and "_".', - \get_class($innerType), - $name - )); + throw new InvalidArgumentException(sprintf('The "%s" form type name ("%s") is not valid. Names must only contain letters, numbers, and "_".', \get_class($innerType), $name)); } foreach ($typeExtensions as $extension) { diff --git a/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php b/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php index a6d8dc7411d99..01440575a1126 100644 --- a/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Test/FormPerformanceTestCase.php @@ -36,14 +36,7 @@ protected function runTest() $time = microtime(true) - $s; if (0 != $this->maxRunningTime && $time > $this->maxRunningTime) { - $this->fail( - sprintf( - 'expected running time: <= %s but was: %s', - - $this->maxRunningTime, - $time - ) - ); + $this->fail(sprintf('expected running time: <= %s but was: %s', $this->maxRunningTime, $time)); } } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php index 9575e4e9a7c76..ad54b6c4b91c0 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -43,9 +43,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface public function __construct(\Memcache $memcache, array $options = array()) { if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { - throw new \InvalidArgumentException(sprintf( - 'The following options are not supported "%s"', implode(', ', $diff) - )); + throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } $this->memcache = $memcache; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 2c45face4da09..1191a411d5bc2 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -50,9 +50,7 @@ public function __construct(\Memcached $memcached, array $options = array()) $this->memcached = $memcached; if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { - throw new \InvalidArgumentException(sprintf( - 'The following options are not supported "%s"', implode(', ', $diff) - )); + throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } $this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400; diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index a1d9472d9bad9..11d93d77092ca 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -86,10 +86,7 @@ public function getContainerExtension() $expectedAlias = Container::underscore($basename); if ($expectedAlias != $extension->getAlias()) { - throw new \LogicException(sprintf( - 'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', - $expectedAlias, $extension->getAlias() - )); + throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias())); } $this->extension = $extension; diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 041b77bff9ae7..4d5eb6a144eaa 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -265,11 +265,7 @@ public function locateResource($name, $dir = null, $first = true) foreach ($bundles as $bundle) { if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { if (null !== $resourceBundle) { - throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', - $file, - $resourceBundle, - $dir.'/'.$bundles[0]->getName().$overridePath - )); + throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', $file, $resourceBundle, $dir.'/'.$bundles[0]->getName().$overridePath)); } if ($first) { diff --git a/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php b/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php index ef54e402e9294..3383a0a76aa4f 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php @@ -37,10 +37,7 @@ public function __construct($genrb = 'genrb', $envVars = '') exec('which '.$genrb, $output, $status); if (0 !== $status) { - throw new RuntimeException(sprintf( - 'The command "%s" is not installed', - $genrb - )); + throw new RuntimeException(sprintf('The command "%s" is not installed', $genrb)); } $this->genrb = ($envVars ? $envVars.' ' : '').$genrb; @@ -58,12 +55,7 @@ public function compile($sourcePath, $targetDir) exec($this->genrb.' --quiet -e UTF-8 -d '.$targetDir.' '.$sourcePath, $output, $status); if (0 !== $status) { - throw new RuntimeException(sprintf( - 'genrb failed with status %d while compiling %s to %s.', - $status, - $sourcePath, - $targetDir - )); + throw new RuntimeException(sprintf('genrb failed with status %d while compiling %s to %s.', $status, $sourcePath, $targetDir)); } } } diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php index 3c351c3422f4f..b4bf25abb91c4 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php @@ -41,11 +41,7 @@ public function read($path, $locale) // The bundle is NULL if the path does not look like a resource bundle // (i.e. contain a bunch of *.res files) if (null === $bundle) { - throw new ResourceBundleNotFoundException(sprintf( - 'The resource bundle "%s/%s.res" could not be found.', - $path, - $locale - )); + throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s/%s.res" could not be found.', $path, $locale)); } // Other possible errors are U_USING_FALLBACK_WARNING and U_ZERO_ERROR, diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php index b5786d12a22ef..5c41c4043918e 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php @@ -36,27 +36,17 @@ public function read($path, $locale) } if (!file_exists($fileName)) { - throw new ResourceBundleNotFoundException(sprintf( - 'The resource bundle "%s" does not exist.', - $fileName - )); + throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s" does not exist.', $fileName)); } if (!is_file($fileName)) { - throw new RuntimeException(sprintf( - 'The resource bundle "%s" is not a file.', - $fileName - )); + throw new RuntimeException(sprintf('The resource bundle "%s" is not a file.', $fileName)); } $data = json_decode(file_get_contents($fileName), true); if (null === $data) { - throw new RuntimeException(sprintf( - 'The resource bundle "%s" contains invalid JSON: %s', - $fileName, - json_last_error_msg() - )); + throw new RuntimeException(sprintf('The resource bundle "%s" contains invalid JSON: %s', $fileName, json_last_error_msg())); } return $data; diff --git a/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php b/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php index 7c4b71c93ac1a..bbe2dfda6b973 100644 --- a/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php +++ b/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php @@ -36,19 +36,11 @@ public function read($path, $locale) } if (!file_exists($fileName)) { - throw new ResourceBundleNotFoundException(sprintf( - 'The resource bundle "%s/%s.php" does not exist.', - $path, - $locale - )); + throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s/%s.php" does not exist.', $path, $locale)); } if (!is_file($fileName)) { - throw new RuntimeException(sprintf( - 'The resource bundle "%s/%s.php" is not a file.', - $path, - $locale - )); + throw new RuntimeException(sprintf('The resource bundle "%s/%s.php" is not a file.', $path, $locale)); } return include $fileName; diff --git a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index 6cfe5884b3e05..17c52042cac1c 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -175,32 +175,19 @@ private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $me if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) { // Validate to prevent typos if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) { - throw new RuntimeException( - 'The statically set three-letter mapping '. - self::$preferredAlpha2ToAlpha3Mapping[$language].' '. - 'for the language code '.$language.' seems to be '. - 'invalid. Typo?' - ); + throw new RuntimeException('The statically set three-letter mapping '.self::$preferredAlpha2ToAlpha3Mapping[$language].' for the language code '.$language.' seems to be invalid. Typo?'); } $alpha3 = self::$preferredAlpha2ToAlpha3Mapping[$language]; $alpha2 = $aliases[$alpha3]['replacement']; if ($language !== $alpha2) { - throw new RuntimeException( - 'The statically set three-letter mapping '.$alpha3.' '. - 'for the language code '.$language.' seems to be '. - 'an alias for '.$alpha2.'. Wrong mapping?' - ); + throw new RuntimeException('The statically set three-letter mapping '.$alpha3.' for the language code '.$language.' seems to be an alias for '.$alpha2.'. Wrong mapping?'); } $alpha2ToAlpha3[$language] = $alpha3; } elseif (isset($alpha2ToAlpha3[$language])) { - throw new RuntimeException( - 'Multiple three-letter mappings exist for the language '. - 'code '.$language.'. Please add one of them to the '. - 'property $preferredAlpha2ToAlpha3Mapping.' - ); + throw new RuntimeException('Multiple three-letter mappings exist for the language code '.$language.'. Please add one of them to the property $preferredAlpha2ToAlpha3Mapping.'); } else { $alpha2ToAlpha3[$language] = $alias; } diff --git a/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php b/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php index 086b550478057..c133932c9e6ff 100644 --- a/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php +++ b/src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php @@ -36,10 +36,7 @@ public static function get($array, array $indices) } } - throw new OutOfBoundsException(sprintf( - 'The index %s does not exist.', - $index - )); + throw new OutOfBoundsException(sprintf('The index %s does not exist.', $index)); } return $array; diff --git a/src/Symfony/Component/Intl/Data/Util/RingBuffer.php b/src/Symfony/Component/Intl/Data/Util/RingBuffer.php index b63c31e91970f..1ab1a301497ae 100644 --- a/src/Symfony/Component/Intl/Data/Util/RingBuffer.php +++ b/src/Symfony/Component/Intl/Data/Util/RingBuffer.php @@ -53,10 +53,7 @@ public function offsetExists($key) public function offsetGet($key) { if (!isset($this->indices[$key])) { - throw new OutOfBoundsException(sprintf( - 'The index "%s" does not exist.', - $key - )); + throw new OutOfBoundsException(sprintf('The index "%s" does not exist.', $key)); } return $this->values[$this->indices[$key]]; diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php index 40004eb5c2313..2840f0ad47aa4 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php @@ -106,10 +106,7 @@ public static function getEtcTimeZoneId($formattedTimeZone) $signal = '-' == $matches['signal'] ? '+' : '-'; if (0 < $minutes) { - throw new NotImplementedException(sprintf( - 'It is not possible to use a GMT time zone with minutes offset different than zero (0). GMT time zone tried: %s.', - $formattedTimeZone - )); + throw new NotImplementedException(sprintf('It is not possible to use a GMT time zone with minutes offset different than zero (0). GMT time zone tried: %s.', $formattedTimeZone)); } return 'Etc/GMT'.(0 !== $hours ? $signal.$hours : ''); diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 551b84244e870..e63e3c434926a 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -360,10 +360,7 @@ public function format($value, $type = self::TYPE_DEFAULT) } if (self::CURRENCY == $this->style) { - throw new NotImplementedException(sprintf( - '%s() method does not support the formatting of currencies (instance with CURRENCY style). %s', - __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE - )); + throw new NotImplementedException(sprintf('%s() method does not support the formatting of currencies (instance with CURRENCY style). %s', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE)); } // Only the default type is supported. diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 9c1d458d89a65..20d0770ebcd11 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -388,11 +388,7 @@ public function setNormalizer($option, \Closure $normalizer) } if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } $this->normalizers[$option] = $normalizer; @@ -466,11 +462,7 @@ public function setAllowedValues($option, $allowedValues = null) } if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : array($allowedValues); @@ -522,11 +514,7 @@ public function addAllowedValues($option, $allowedValues = null) } if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } if (!\is_array($allowedValues)) { @@ -578,11 +566,7 @@ public function setAllowedTypes($option, $allowedTypes = null) } if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } $this->allowedTypes[$option] = (array) $allowedTypes; @@ -628,11 +612,7 @@ public function addAllowedTypes($option, $allowedTypes = null) } if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } if (!isset($this->allowedTypes[$option])) { @@ -737,11 +717,7 @@ public function resolve(array $options = array()) ksort($clone->defined); ksort($diff); - throw new UndefinedOptionsException(sprintf( - (\count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', - implode('", "', array_keys($diff)), - implode('", "', array_keys($clone->defined)) - )); + throw new UndefinedOptionsException(sprintf((\count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', implode('", "', array_keys($diff)), implode('", "', array_keys($clone->defined)))); } // Override options set by the user @@ -756,10 +732,7 @@ public function resolve(array $options = array()) if (\count($diff) > 0) { ksort($diff); - throw new MissingOptionsException(sprintf( - \count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', - implode('", "', array_keys($diff)) - )); + throw new MissingOptionsException(sprintf(\count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', implode('", "', array_keys($diff)))); } // Lock the container @@ -803,17 +776,10 @@ public function offsetGet($option) // Check whether the option is set at all if (!array_key_exists($option, $this->defaults)) { if (!isset($this->defined[$option])) { - throw new NoSuchOptionException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); + throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined)))); } - throw new NoSuchOptionException(sprintf( - 'The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', - $option - )); + throw new NoSuchOptionException(sprintf('The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', $option)); } $value = $this->defaults[$option]; @@ -823,10 +789,7 @@ public function offsetGet($option) // If the closure is already being called, we have a cyclic // dependency if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf( - 'The options "%s" have a cyclic dependency.', - implode('", "', array_keys($this->calling)) - )); + throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', implode('", "', array_keys($this->calling)))); } // The following section must be protected from cyclic @@ -872,14 +835,7 @@ public function offsetGet($option) } if (!$valid) { - throw new InvalidOptionsException(sprintf( - 'The option "%s" with value %s is expected to be of type '. - '"%s", but is of type "%s".', - $option, - $this->formatValue($value), - implode('" or "', $this->allowedTypes[$option]), - $this->formatTypeOf($value) - )); + throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but is of type "%s".', $option, $this->formatValue($value), implode('" or "', $this->allowedTypes[$option]), $this->formatTypeOf($value))); } } @@ -928,10 +884,7 @@ public function offsetGet($option) // If the closure is already being called, we have a cyclic // dependency if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf( - 'The options "%s" have a cyclic dependency.', - implode('", "', array_keys($this->calling)) - )); + throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', implode('", "', array_keys($this->calling)))); } $normalizer = $this->normalizers[$option]; diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index d639506ef3f9f..c14afc2dd9449 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -345,22 +345,13 @@ private function readPropertiesUntil($zval, PropertyPathInterface $propertyPath, if (!$ignoreInvalidIndices) { if (!\is_array($zval[self::VALUE])) { if (!$zval[self::VALUE] instanceof \Traversable) { - throw new NoSuchIndexException(sprintf( - 'Cannot read index "%s" while trying to traverse path "%s".', - $property, - (string) $propertyPath - )); + throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s".', $property, (string) $propertyPath)); } $zval[self::VALUE] = iterator_to_array($zval[self::VALUE]); } - throw new NoSuchIndexException(sprintf( - 'Cannot read index "%s" while trying to traverse path "%s". Available indices are "%s".', - $property, - (string) $propertyPath, - print_r(array_keys($zval[self::VALUE]), true) - )); + throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s". Available indices are "%s".', $property, (string) $propertyPath, print_r(array_keys($zval[self::VALUE]), true))); } if ($i + 1 < $propertyPath->getLength()) { diff --git a/src/Symfony/Component/PropertyAccess/PropertyPath.php b/src/Symfony/Component/PropertyAccess/PropertyPath.php index 890b8ffce61b4..2897a4adfab8b 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPath.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -77,12 +77,7 @@ public function __construct($propertyPath) return; } if (!\is_string($propertyPath)) { - throw new InvalidArgumentException(sprintf( - 'The property path constructor needs a string or an instance of '. - '"Symfony\Component\PropertyAccess\PropertyPath". '. - 'Got: "%s"', - \is_object($propertyPath) ? \get_class($propertyPath) : \gettype($propertyPath) - )); + throw new InvalidArgumentException(sprintf('The property path constructor needs a string or an instance of "Symfony\Component\PropertyAccess\PropertyPath". Got: "%s"', \is_object($propertyPath) ? \get_class($propertyPath) : \gettype($propertyPath))); } if ('' === $propertyPath) { @@ -113,12 +108,7 @@ public function __construct($propertyPath) } if ('' !== $remaining) { - throw new InvalidPropertyPathException(sprintf( - 'Could not parse property path "%s". Unexpected token "%s" at position %d', - $propertyPath, - $remaining[0], - $position - )); + throw new InvalidPropertyPathException(sprintf('Could not parse property path "%s". Unexpected token "%s" at position %d', $propertyPath, $remaining[0], $position)); } $this->length = \count($this->elements); diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index 2d98eed190484..47fc8cf7693f9 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -209,28 +209,16 @@ protected function validate($config, $name, $path) throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path)); } if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) { - throw new \InvalidArgumentException(sprintf( - 'The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', - $path, $name, implode('", "', $extraKeys), implode('", "', self::$availableKeys) - )); + throw new \InvalidArgumentException(sprintf('The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', $path, $name, implode('", "', $extraKeys), implode('", "', self::$availableKeys))); } if (isset($config['resource']) && isset($config['path'])) { - throw new \InvalidArgumentException(sprintf( - 'The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', - $path, $name - )); + throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', $path, $name)); } if (!isset($config['resource']) && isset($config['type'])) { - throw new \InvalidArgumentException(sprintf( - 'The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', - $name, $path - )); + throw new \InvalidArgumentException(sprintf('The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', $name, $path)); } if (!isset($config['resource']) && !isset($config['path'])) { - throw new \InvalidArgumentException(sprintf( - 'You must define a "path" for the route "%s" in file "%s".', - $name, $path - )); + throw new \InvalidArgumentException(sprintf('You must define a "path" for the route "%s" in file "%s".', $name, $path)); } } } diff --git a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 837d7e0fbec61..26f06ab5bedce 100644 --- a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -190,10 +190,7 @@ private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticat } if (!$response instanceof Response) { - throw new \LogicException(sprintf( - '%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', - \get_class($guardAuthenticator) - )); + throw new \LogicException(sprintf('%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', \get_class($guardAuthenticator))); } $this->rememberMeServices->loginSuccess($request, $response, $token); diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index 00e6bfb069825..194e2e1908666 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -84,11 +84,7 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ return $response; } - throw new \UnexpectedValueException(sprintf( - 'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.', - \get_class($guardAuthenticator), - \is_object($response) ? \get_class($response) : \gettype($response) - )); + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response))); } /** @@ -132,11 +128,7 @@ public function handleAuthenticationFailure(AuthenticationException $authenticat return $response; } - throw new \UnexpectedValueException(sprintf( - 'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.', - \get_class($guardAuthenticator), - \is_object($response) ? \get_class($response) : \gettype($response) - )); + throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response))); } /** diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index afb48b4e36c9d..d448885a31645 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -122,10 +122,7 @@ public function setCallbacks(array $callbacks) { foreach ($callbacks as $attribute => $callback) { if (!\is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'The given callback for attribute "%s" is not callable.', - $attribute - )); + throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute)); } } $this->callbacks = $callbacks; @@ -337,13 +334,7 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref } elseif ($constructorParameter->isDefaultValueAvailable()) { $params[] = $constructorParameter->getDefaultValue(); } else { - throw new RuntimeException( - sprintf( - 'Cannot create an instance of %s from serialized data because its constructor requires parameter "%s" to be present.', - $class, - $constructorParameter->name - ) - ); + throw new RuntimeException(sprintf('Cannot create an instance of %s from serialized data because its constructor requires parameter "%s" to be present.', $class, $constructorParameter->name)); } } diff --git a/src/Symfony/Component/Validator/Constraint.php b/src/Symfony/Component/Validator/Constraint.php index 70a11ef8c98c7..45d4bcf41a4b8 100644 --- a/src/Symfony/Component/Validator/Constraint.php +++ b/src/Symfony/Component/Validator/Constraint.php @@ -70,11 +70,7 @@ abstract class Constraint public static function getErrorName($errorCode) { if (!isset(static::$errorNames[$errorCode])) { - throw new InvalidArgumentException(sprintf( - 'The error code "%s" does not exist for constraint of type "%s".', - $errorCode, - \get_called_class() - )); + throw new InvalidArgumentException(sprintf('The error code "%s" does not exist for constraint of type "%s".', $errorCode, \get_called_class())); } return static::$errorNames[$errorCode]; @@ -137,9 +133,7 @@ public function __construct($options = null) $option = $this->getDefaultOption(); if (null === $option) { - throw new ConstraintDefinitionException( - sprintf('No default option is configured for constraint %s', \get_class($this)) - ); + throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint %s', \get_class($this))); } if (array_key_exists($option, $knownOptions)) { @@ -151,17 +145,11 @@ public function __construct($options = null) } if (\count($invalidOptions) > 0) { - throw new InvalidOptionsException( - sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)), - $invalidOptions - ); + throw new InvalidOptionsException(sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions); } if (\count($missingOptions) > 0) { - throw new MissingOptionsException( - sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)), - array_keys($missingOptions) - ); + throw new MissingOptionsException(sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions)); } } diff --git a/src/Symfony/Component/Validator/Constraints/AbstractComparison.php b/src/Symfony/Component/Validator/Constraints/AbstractComparison.php index c2a6e685f95be..15afebb0bc4ca 100644 --- a/src/Symfony/Component/Validator/Constraints/AbstractComparison.php +++ b/src/Symfony/Component/Validator/Constraints/AbstractComparison.php @@ -35,10 +35,7 @@ public function __construct($options = null) } if (\is_array($options) && !isset($options['value'])) { - throw new ConstraintDefinitionException(sprintf( - 'The %s constraint requires the "value" option to be set.', - \get_class($this) - )); + throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "value" option to be set.', \get_class($this))); } parent::__construct($options); diff --git a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php index 8401f8e6ebd96..d4b440f197ab3 100644 --- a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php @@ -33,10 +33,7 @@ public function validate($object, Constraint $constraint) } if (null !== $constraint->callback && null !== $constraint->methods) { - throw new ConstraintDefinitionException( - 'The Callback constraint supports either the option "callback" '. - 'or "methods", but not both at the same time.' - ); + throw new ConstraintDefinitionException('The Callback constraint supports either the option "callback" or "methods", but not both at the same time.'); } // has to be an array so that we can differentiate between callables diff --git a/src/Symfony/Component/Validator/Constraints/Composite.php b/src/Symfony/Component/Validator/Constraints/Composite.php index 2f2b8d29a0e64..d233f06335e1a 100644 --- a/src/Symfony/Component/Validator/Constraints/Composite.php +++ b/src/Symfony/Component/Validator/Constraints/Composite.php @@ -99,13 +99,7 @@ public function __construct($options = null) $excessGroups = array_diff($constraint->groups, $this->groups); if (\count($excessGroups) > 0) { - throw new ConstraintDefinitionException(sprintf( - 'The group(s) "%s" passed to the constraint %s '. - 'should also be passed to its containing constraint %s', - implode('", "', $excessGroups), - \get_class($constraint), - \get_class($this) - )); + throw new ConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), \get_class($this))); } } else { $constraint->groups = $this->groups; diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index fb3b706a8f32a..d2c4d4ab1f3f9 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -145,10 +145,7 @@ public function offsetGet($offset) @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (!isset($this->groups[$offset])) { - throw new OutOfBoundsException(sprintf( - 'The offset "%s" does not exist.', - $offset - )); + throw new OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); } return $this->groups[$offset]; diff --git a/src/Symfony/Component/Validator/Constraints/Traverse.php b/src/Symfony/Component/Validator/Constraints/Traverse.php index 0b74d98d463ec..4572c9b2193c4 100644 --- a/src/Symfony/Component/Validator/Constraints/Traverse.php +++ b/src/Symfony/Component/Validator/Constraints/Traverse.php @@ -26,10 +26,7 @@ class Traverse extends Constraint public function __construct($options = null) { if (\is_array($options) && array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf( - 'The option "groups" is not supported by the constraint %s', - __CLASS__ - )); + throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); } parent::__construct($options); diff --git a/src/Symfony/Component/Validator/Constraints/Valid.php b/src/Symfony/Component/Validator/Constraints/Valid.php index 23e4f38f40200..35a8edcc0e570 100644 --- a/src/Symfony/Component/Validator/Constraints/Valid.php +++ b/src/Symfony/Component/Validator/Constraints/Valid.php @@ -32,10 +32,7 @@ class Valid extends Constraint public function __construct($options = null) { if (\is_array($options) && array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf( - 'The option "groups" is not supported by the constraint %s', - __CLASS__ - )); + throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); } if (\is_array($options) && array_key_exists('deep', $options)) { diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 694a102859ccf..26dba4b725010 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -222,17 +222,11 @@ public function getDefaultGroup() public function addConstraint(Constraint $constraint) { if (!\in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets())) { - throw new ConstraintDefinitionException(sprintf( - 'The constraint "%s" cannot be put on classes.', - \get_class($constraint) - )); + throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint))); } if ($constraint instanceof Valid) { - throw new ConstraintDefinitionException(sprintf( - 'The constraint "%s" cannot be put on classes.', - \get_class($constraint) - )); + throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint))); } if ($constraint instanceof Traverse) { diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index fce49d2373fc9..2e4330fcf623b 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -127,11 +127,7 @@ public function __clone() public function addConstraint(Constraint $constraint) { if ($constraint instanceof Traverse) { - throw new ConstraintDefinitionException(sprintf( - 'The constraint "%s" can only be put on classes. Please use '. - '"Symfony\Component\Validator\Constraints\Valid" instead.', - \get_class($constraint) - )); + throw new ConstraintDefinitionException(sprintf('The constraint "%s" can only be put on classes. Please use "Symfony\Component\Validator\Constraints\Valid" instead.', \get_class($constraint))); } if ($constraint instanceof Valid) { diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index 8184f3f889801..565f2f4d40744 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -89,10 +89,7 @@ public function accept(ValidationVisitorInterface $visitor, $value, $group, $pro public function addConstraint(Constraint $constraint) { if (!\in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets())) { - throw new ConstraintDefinitionException(sprintf( - 'The constraint %s cannot be put on properties or getters', - \get_class($constraint) - )); + throw new ConstraintDefinitionException(sprintf('The constraint %s cannot be put on properties or getters', \get_class($constraint))); } parent::addConstraint($constraint); diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index 67d5cc32cc681..c151d92e3a4a4 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -34,13 +34,8 @@ class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryIn private $translationDomain; private $objectInitializers; - public function __construct( - MetadataFactoryInterface $metadataFactory, - ConstraintValidatorFactoryInterface $validatorFactory, - TranslatorInterface $translator, - $translationDomain = 'validators', - array $objectInitializers = array() - ) { + public function __construct(MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = 'validators', array $objectInitializers = array()) + { $this->metadataFactory = $metadataFactory; $this->validatorFactory = $validatorFactory; $this->translator = $translator; @@ -175,12 +170,7 @@ public function validateValue($value, $constraints, $groups = null) // // * Otherwise the validated group is propagated. - throw new ValidatorException( - sprintf( - 'The constraint %s cannot be validated. Use the method validate() instead.', - \get_class($constraint) - ) - ); + throw new ValidatorException(sprintf('The constraint %s cannot be validated. Use the method validate() instead.', \get_class($constraint))); } $context->validateValue($value, $constraint, '', $groups); diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 3e46cd2f000a9..033900d103828 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -162,11 +162,7 @@ public function validate($value, $constraints = null, $groups = null) return $this; } - throw new RuntimeException(sprintf( - 'Cannot validate values of type "%s" automatically. Please '. - 'provide a constraint.', - \gettype($value) - )); + throw new RuntimeException(sprintf('Cannot validate values of type "%s" automatically. Please provide a constraint.', \gettype($value))); } /** @@ -179,12 +175,7 @@ public function validateProperty($object, $propertyName, $groups = null) if (!$classMetadata instanceof ClassMetadataInterface) { // Cannot be UnsupportedMetadataException because of BC with // Symfony < 2.5 - throw new ValidatorException(sprintf( - 'The metadata factory should return instances of '. - '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. - 'got: "%s".', - \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata) - )); + throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); } $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); @@ -230,12 +221,7 @@ public function validatePropertyValue($objectOrClass, $propertyName, $value, $gr if (!$classMetadata instanceof ClassMetadataInterface) { // Cannot be UnsupportedMetadataException because of BC with // Symfony < 2.5 - throw new ValidatorException(sprintf( - 'The metadata factory should return instances of '. - '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. - 'got: "%s".', - \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata) - )); + throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); } $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); @@ -331,12 +317,7 @@ private function validateObject($object, $propertyPath, array $groups, $traversa $classMetadata = $this->metadataFactory->getMetadataFor($object); if (!$classMetadata instanceof ClassMetadataInterface) { - throw new UnsupportedMetadataException(sprintf( - 'The metadata factory should return instances of '. - '"Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. - 'got: "%s".', - \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata) - )); + throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', \is_object($classMetadata) ? \get_class($classMetadata) : \gettype($classMetadata))); } $this->validateClassNode( @@ -572,12 +553,7 @@ private function validateClassNode($object, $cacheKey, ClassMetadataInterface $m // returns two metadata objects, not just one foreach ($metadata->getPropertyMetadata($propertyName) as $propertyMetadata) { if (!$propertyMetadata instanceof PropertyMetadataInterface) { - throw new UnsupportedMetadataException(sprintf( - 'The property metadata instances should implement '. - '"Symfony\Component\Validator\Mapping\PropertyMetadataInterface", '. - 'got: "%s".', - \is_object($propertyMetadata) ? \get_class($propertyMetadata) : \gettype($propertyMetadata) - )); + throw new UnsupportedMetadataException(sprintf('The property metadata instances should implement "Symfony\Component\Validator\Mapping\PropertyMetadataInterface", got: "%s".', \is_object($propertyMetadata) ? \get_class($propertyMetadata) : \gettype($propertyMetadata))); } $propertyValue = $propertyMetadata->getPropertyValue($object); @@ -618,11 +594,7 @@ private function validateClassNode($object, $cacheKey, ClassMetadataInterface $m if (!$object instanceof \Traversable) { // Must throw a ConstraintDefinitionException for backwards // compatibility reasons with Symfony < 2.5 - throw new ConstraintDefinitionException(sprintf( - 'Traversal was enabled for "%s", but this class '. - 'does not implement "\Traversable".', - \get_class($object) - )); + throw new ConstraintDefinitionException(sprintf('Traversal was enabled for "%s", but this class does not implement "\Traversable".', \get_class($object))); } $this->validateEachObjectIn( From e2e4049721fa038ecf503ea71d74e06f2872c331 Mon Sep 17 00:00:00 2001 From: Vlad Gregurco Date: Sat, 8 Sep 2018 00:29:46 +0300 Subject: [PATCH 27/55] [Intl] Blacklist Eurozone and United Nations in Region Data Generator --- .../Component/Intl/Data/Generator/RegionDataGenerator.php | 4 ++++ src/Symfony/Component/Intl/Resources/data/regions/af.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/am.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ar.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/as.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/az.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/be.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/bg.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/bn.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/br.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/bs.json | 2 -- .../Component/Intl/Resources/data/regions/bs_Cyrl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ca.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ce.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/cs.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/cy.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/da.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/de.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/el.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/en.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/es.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/es_419.json | 1 - src/Symfony/Component/Intl/Resources/data/regions/es_MX.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/es_US.json | 1 - src/Symfony/Component/Intl/Resources/data/regions/et.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/eu.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/fa.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/fi.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/fo.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/fr.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ga.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/gd.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/gl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/gu.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/he.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/hi.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/hr.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/hu.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/hy.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/id.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/in.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/is.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/it.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/iw.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ja.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ka.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/kk.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/km.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/kn.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ko.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ky.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/lo.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/lt.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/lv.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/meta.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/mk.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ml.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/mn.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/mr.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ms.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/my.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/nb.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ne.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/nl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/nn.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/no.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/or.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/pa.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/pl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ps.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/pt.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json | 1 - src/Symfony/Component/Intl/Resources/data/regions/ro.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ru.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/se_FI.json | 4 +--- src/Symfony/Component/Intl/Resources/data/regions/sh.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/si.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sk.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sq.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sr.json | 2 -- .../Component/Intl/Resources/data/regions/sr_Latn.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sv.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/sw.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ta.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/te.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/th.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/tl.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/to.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/tr.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/uk.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/ur.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/uz.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/vi.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/zh.json | 2 -- .../Component/Intl/Resources/data/regions/zh_Hant.json | 2 -- src/Symfony/Component/Intl/Resources/data/regions/zu.json | 2 -- .../Tests/Data/Provider/AbstractRegionDataProviderTest.php | 2 -- 98 files changed, 5 insertions(+), 192 deletions(-) diff --git a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php index e1265b3a1b742..920e2e311b049 100644 --- a/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php @@ -34,6 +34,8 @@ class RegionDataGenerator extends AbstractDataGenerator const BOUVET_ISLAND_ID = 'BV'; const HEARD_MCDONALD_ISLANDS_ID = 'HM'; const CLIPPERTON_ISLAND_ID = 'CP'; + const EUROZONE_ID = 'EZ'; + const UNITED_NATIONS_ID = 'UN'; /** * Regions excluded from generation. @@ -43,6 +45,8 @@ class RegionDataGenerator extends AbstractDataGenerator // Look like countries, but are sub-continents self::OUTLYING_OCEANIA_REGION_ID => true, self::EUROPEAN_UNION_ID => true, + self::EUROZONE_ID => true, + self::UNITED_NATIONS_ID => true, // No longer exists self::NETHERLANDS_ANTILLES_ID => true, // Uninhabited islands diff --git a/src/Symfony/Component/Intl/Resources/data/regions/af.json b/src/Symfony/Component/Intl/Resources/data/regions/af.json index 2b280fd249db1..726c0350799c2 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/af.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/af.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanje", "ET": "Ethiopië", - "EZ": "Eurosone", "FI": "Finland", "FJ": "Fidji", "FK": "Falklandeilande", @@ -237,7 +236,6 @@ "UA": "Oekraïne", "UG": "Uganda", "UM": "Klein afgeleë eilande van die VSA", - "UN": "Verenigde Nasies", "US": "Verenigde State van Amerika", "UY": "Uruguay", "UZ": "Oesbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/am.json b/src/Symfony/Component/Intl/Resources/data/regions/am.json index 0936881e34dd1..929f7797e823c 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/am.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/am.json @@ -72,7 +72,6 @@ "ER": "ኤርትራ", "ES": "ስፔን", "ET": "ኢትዮጵያ", - "EZ": "የአውሮፓ ዞን", "FI": "ፊንላንድ", "FJ": "ፊጂ", "FK": "የፎክላንድ ደሴቶች", @@ -237,7 +236,6 @@ "UA": "ዩክሬን", "UG": "ዩጋንዳ", "UM": "የዩ ኤስ ጠረፍ ላይ ያሉ ደሴቶች", - "UN": "የተባበሩት መንግስታት", "US": "ዩናይትድ ስቴትስ", "UY": "ኡራጓይ", "UZ": "ኡዝቤኪስታን", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ar.json b/src/Symfony/Component/Intl/Resources/data/regions/ar.json index 93ce837ca1ecd..989681613e67c 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ar.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ar.json @@ -72,7 +72,6 @@ "ER": "إريتريا", "ES": "إسبانيا", "ET": "إثيوبيا", - "EZ": "منطقة اليورو", "FI": "فنلندا", "FJ": "فيجي", "FK": "جزر فوكلاند", @@ -237,7 +236,6 @@ "UA": "أوكرانيا", "UG": "أوغندا", "UM": "جزر الولايات المتحدة النائية", - "UN": "الأمم المتحدة", "US": "الولايات المتحدة", "UY": "أورغواي", "UZ": "أوزبكستان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/as.json b/src/Symfony/Component/Intl/Resources/data/regions/as.json index 50baeecf10cc0..2a61a13138b71 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/as.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/as.json @@ -72,7 +72,6 @@ "ER": "এৰিত্ৰিয়া", "ES": "স্পেইন", "ET": "ইথিঅ’পিয়া", - "EZ": "ইউৰোজ’ন", "FI": "ফিনলেণ্ড", "FJ": "ফিজি", "FK": "ফকলেণ্ড দ্বীপপুঞ্জ", @@ -237,7 +236,6 @@ "UA": "ইউক্ৰেইন", "UG": "উগাণ্ডা", "UM": "ইউ. এছ. আউটলায়িং দ্বীপপুঞ্জ", - "UN": "ৰাষ্ট্ৰসংঘ", "US": "মাৰ্কিন যুক্তৰাষ্ট্ৰ", "UY": "উৰুগুৱে", "UZ": "উজবেকিস্তান", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/az.json b/src/Symfony/Component/Intl/Resources/data/regions/az.json index 2bc9b27e4b692..217a2f388388d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/az.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/az.json @@ -72,7 +72,6 @@ "ER": "Eritreya", "ES": "İspaniya", "ET": "Efiopiya", - "EZ": "Avrozona", "FI": "Finlandiya", "FJ": "Fici", "FK": "Folklend adaları", @@ -237,7 +236,6 @@ "UA": "Ukrayna", "UG": "Uqanda", "UM": "ABŞ-a bağlı kiçik adacıqlar", - "UN": "Birləşmiş Millətlər Təşkilatı", "US": "Amerika Birləşmiş Ştatları", "UY": "Uruqvay", "UZ": "Özbəkistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/be.json b/src/Symfony/Component/Intl/Resources/data/regions/be.json index 916a0653e726f..f117642b14a48 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/be.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/be.json @@ -72,7 +72,6 @@ "ER": "Эрытрэя", "ES": "Іспанія", "ET": "Эфіопія", - "EZ": "Еўразона", "FI": "Фінляндыя", "FJ": "Фіджы", "FK": "Фалклендскія астравы", @@ -237,7 +236,6 @@ "UA": "Украіна", "UG": "Уганда", "UM": "Малыя Аддаленыя астравы ЗША", - "UN": "ААН", "US": "Злучаныя Штаты Амерыкі", "UY": "Уругвай", "UZ": "Узбекістан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/bg.json b/src/Symfony/Component/Intl/Resources/data/regions/bg.json index 0a4de0c69eb56..8d46867ad975c 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/bg.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/bg.json @@ -72,7 +72,6 @@ "ER": "Еритрея", "ES": "Испания", "ET": "Етиопия", - "EZ": "Еврозона", "FI": "Финландия", "FJ": "Фиджи", "FK": "Фолклендски острови", @@ -237,7 +236,6 @@ "UA": "Украйна", "UG": "Уганда", "UM": "Отдалечени острови на САЩ", - "UN": "Организация на обединените нации", "US": "Съединени щати", "UY": "Уругвай", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/bn.json b/src/Symfony/Component/Intl/Resources/data/regions/bn.json index 35626e5519c09..8a0ec061f1883 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/bn.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/bn.json @@ -72,7 +72,6 @@ "ER": "ইরিত্রিয়া", "ES": "স্পেন", "ET": "ইথিওপিয়া", - "EZ": "ইউরোজোন", "FI": "ফিনল্যান্ড", "FJ": "ফিজি", "FK": "ফকল্যান্ড দ্বীপপুঞ্জ", @@ -237,7 +236,6 @@ "UA": "ইউক্রেন", "UG": "উগান্ডা", "UM": "যুক্তরাষ্ট্রের পার্শ্ববর্তী দ্বীপপুঞ্জ", - "UN": "জাতিসংঘ", "US": "মার্কিন যুক্তরাষ্ট্র", "UY": "উরুগুয়ে", "UZ": "উজবেকিস্তান", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/br.json b/src/Symfony/Component/Intl/Resources/data/regions/br.json index 5f1bdd18120d2..ad7fd7262d433 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/br.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/br.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spagn", "ET": "Etiopia", - "EZ": "takad an euro", "FI": "Finland", "FJ": "Fidji", "FK": "Inizi Falkland", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Ouganda", "UM": "Inizi diabell ar Stadoù-Unanet", - "UN": "Broadoù unanet", "US": "Stadoù-Unanet", "UY": "Uruguay", "UZ": "Ouzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/bs.json b/src/Symfony/Component/Intl/Resources/data/regions/bs.json index a923f5fd90c29..387c866323465 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/bs.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/bs.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Španija", "ET": "Etiopija", - "EZ": "Eurozona", "FI": "Finska", "FJ": "Fidži", "FK": "Folklandska ostrva", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Američka Vanjska Ostrva", - "UN": "Ujedinjene Nacije", "US": "Sjedinjene Američke Države", "UY": "Urugvaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json b/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json index 76c673b03b2ae..a31e2b35bf507 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json @@ -72,7 +72,6 @@ "ER": "Еритреја", "ES": "Шпанија", "ET": "Етиопија", - "EZ": "Еурозона", "FI": "Финска", "FJ": "Фиџи", "FK": "Фокландска острва", @@ -236,7 +235,6 @@ "UA": "Украјина", "UG": "Уганда", "UM": "Мања удаљена острва САД", - "UN": "Уједињене нације", "US": "Сједињене Америчке Државе", "UY": "Уругвај", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ca.json b/src/Symfony/Component/Intl/Resources/data/regions/ca.json index 50a0177b4d7d2..2336686f511ca 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ca.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ca.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Espanya", "ET": "Etiòpia", - "EZ": "zona euro", "FI": "Finlàndia", "FJ": "Fiji", "FK": "Illes Malvines", @@ -237,7 +236,6 @@ "UA": "Ucraïna", "UG": "Uganda", "UM": "Illes Perifèriques Menors dels EUA", - "UN": "Nacions Unides", "US": "Estats Units", "UY": "Uruguai", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ce.json b/src/Symfony/Component/Intl/Resources/data/regions/ce.json index 934580a09914e..e86ed1000e2a1 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ce.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ce.json @@ -72,7 +72,6 @@ "ER": "Эритрей", "ES": "Испани", "ET": "Эфиопи", - "EZ": "еврозона", "FI": "Финлянди", "FJ": "Фиджи", "FK": "Фолклендан гӀайренаш", @@ -237,7 +236,6 @@ "UA": "Украина", "UG": "Уганда", "UM": "АЦШн арахьара кегийн гӀайренаш", - "UN": "Вовшахкхетта Къаьмнийн Организаци", "US": "Цхьанатоьхна Штаташ", "UY": "Уругвай", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/cs.json b/src/Symfony/Component/Intl/Resources/data/regions/cs.json index 68eea5b4ac7b9..375a62819d333 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/cs.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/cs.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Španělsko", "ET": "Etiopie", - "EZ": "eurozóna", "FI": "Finsko", "FJ": "Fidži", "FK": "Falklandské ostrovy", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Menší odlehlé ostrovy USA", - "UN": "Organizace spojených národů", "US": "Spojené státy", "UY": "Uruguay", "UZ": "Uzbekistán", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/cy.json b/src/Symfony/Component/Intl/Resources/data/regions/cy.json index caa829ed16014..2fd5967749108 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/cy.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/cy.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Sbaen", "ET": "Ethiopia", - "EZ": "Ardal yr Ewro", "FI": "Y Ffindir", "FJ": "Fiji", "FK": "Ynysoedd y Falkland\/Malvinas", @@ -237,7 +236,6 @@ "UA": "Wcráin", "UG": "Uganda", "UM": "Ynysoedd Pellennig UDA", - "UN": "y Cenhedloedd Unedig", "US": "Yr Unol Daleithiau", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/da.json b/src/Symfony/Component/Intl/Resources/data/regions/da.json index ef8b2658a839a..ddda65b193cf8 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/da.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/da.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanien", "ET": "Etiopien", - "EZ": "eurozonen", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandsøerne", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "Amerikanske oversøiske øer", - "UN": "De Forenede Nationer", "US": "USA", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/de.json b/src/Symfony/Component/Intl/Resources/data/regions/de.json index b521ae4bc511e..38e353f6a35a4 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/de.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/de.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanien", "ET": "Äthiopien", - "EZ": "Eurozone", "FI": "Finnland", "FJ": "Fidschi", "FK": "Falklandinseln", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "Amerikanische Überseeinseln", - "UN": "Vereinte Nationen", "US": "Vereinigte Staaten", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/el.json b/src/Symfony/Component/Intl/Resources/data/regions/el.json index 447264e8c6ebc..8387c53c9106b 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/el.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/el.json @@ -72,7 +72,6 @@ "ER": "Ερυθραία", "ES": "Ισπανία", "ET": "Αιθιοπία", - "EZ": "Ευρωζώνη", "FI": "Φινλανδία", "FJ": "Φίτζι", "FK": "Νήσοι Φόκλαντ", @@ -237,7 +236,6 @@ "UA": "Ουκρανία", "UG": "Ουγκάντα", "UM": "Απομακρυσμένες Νησίδες ΗΠΑ", - "UN": "Ηνωμένα Έθνη", "US": "Ηνωμένες Πολιτείες", "UY": "Ουρουγουάη", "UZ": "Ουζμπεκιστάν", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/en.json b/src/Symfony/Component/Intl/Resources/data/regions/en.json index 74663075241bc..7b053c475c022 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/en.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/en.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spain", "ET": "Ethiopia", - "EZ": "Eurozone", "FI": "Finland", "FJ": "Fiji", "FK": "Falkland Islands", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "U.S. Outlying Islands", - "UN": "United Nations", "US": "United States", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/es.json b/src/Symfony/Component/Intl/Resources/data/regions/es.json index 3369ed0e0b945..451b4a7de640d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/es.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/es.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "España", "ET": "Etiopía", - "EZ": "zona euro", "FI": "Finlandia", "FJ": "Fiyi", "FK": "Islas Malvinas", @@ -237,7 +236,6 @@ "UA": "Ucrania", "UG": "Uganda", "UM": "Islas menores alejadas de EE. UU.", - "UN": "Naciones Unidas", "US": "Estados Unidos", "UY": "Uruguay", "UZ": "Uzbekistán", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/es_419.json b/src/Symfony/Component/Intl/Resources/data/regions/es_419.json index 3b0afed924741..9b25f033b2010 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/es_419.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/es_419.json @@ -4,7 +4,6 @@ "AC": "Isla Ascensión", "BA": "Bosnia-Herzegovina", "CI": "Costa de Marfil", - "EZ": "Eurozona", "GG": "Guernesey", "IC": "Islas Canarias", "TA": "Tristán da Cunha", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json b/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json index 6b0c66ccfc6e6..63cc2187ad45d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/es_MX.json @@ -3,12 +3,10 @@ "Names": { "BA": "Bosnia y Herzegovina", "CI": "Côte d’Ivoire", - "EZ": "zona euro", "GG": "Guernsey", "TA": "Tristán de Acuña", "TL": "Timor-Leste", "UM": "Islas menores alejadas de EE. UU.", - "UN": "UN", "VI": "Islas Vírgenes de EE. UU." } } diff --git a/src/Symfony/Component/Intl/Resources/data/regions/es_US.json b/src/Symfony/Component/Intl/Resources/data/regions/es_US.json index b1325a4b7da2e..3c694616bc6ba 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/es_US.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/es_US.json @@ -3,7 +3,6 @@ "Names": { "AC": "Isla de la Ascensión", "CI": "Côte d’Ivoire", - "EZ": "zona euro", "GG": "Guernsey", "TL": "Timor-Leste", "UM": "Islas menores alejadas de EE. UU.", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/et.json b/src/Symfony/Component/Intl/Resources/data/regions/et.json index e22adf5ffddb6..61008dc9e10ce 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/et.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/et.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Hispaania", "ET": "Etioopia", - "EZ": "euroala", "FI": "Soome", "FJ": "Fidži", "FK": "Falklandi saared", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Ühendriikide hajasaared", - "UN": "Ühendatud Rahvaste Organisatsioon", "US": "Ameerika Ühendriigid", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/eu.json b/src/Symfony/Component/Intl/Resources/data/regions/eu.json index 9df3ed11c06c5..795a63a14a709 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/eu.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/eu.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Espainia", "ET": "Etiopia", - "EZ": "Eurogunea", "FI": "Finlandia", "FJ": "Fiji", "FK": "Malvinak", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Ameriketako Estatu Batuetako Kanpoaldeko Uharte Txikiak", - "UN": "Nazio Batuak", "US": "Ameriketako Estatu Batuak", "UY": "Uruguai", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/fa.json b/src/Symfony/Component/Intl/Resources/data/regions/fa.json index fb2ac4af4cc69..d62eb92a0e597 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/fa.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/fa.json @@ -72,7 +72,6 @@ "ER": "اریتره", "ES": "اسپانیا", "ET": "اتیوپی", - "EZ": "منطقه یورو", "FI": "فنلاند", "FJ": "فیجی", "FK": "جزایر فالکلند", @@ -237,7 +236,6 @@ "UA": "اوکراین", "UG": "اوگاندا", "UM": "جزایر دورافتادهٔ ایالات متحده", - "UN": "سازمان ملل متحد", "US": "ایالات متحده", "UY": "اروگوئه", "UZ": "ازبکستان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/fi.json b/src/Symfony/Component/Intl/Resources/data/regions/fi.json index 4ba9dcd1e77a3..a46d8175c79cc 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/fi.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/fi.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Espanja", "ET": "Etiopia", - "EZ": "euroalue", "FI": "Suomi", "FJ": "Fidži", "FK": "Falklandinsaaret", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Yhdysvaltain erillissaaret", - "UN": "Yhdistyneet kansakunnat", "US": "Yhdysvallat", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/fo.json b/src/Symfony/Component/Intl/Resources/data/regions/fo.json index 8459fc4314f81..649d9bc1bc787 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/fo.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/fo.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spania", "ET": "Etiopia", - "EZ": "Evrasona", "FI": "Finnland", "FJ": "Fiji", "FK": "Falklandsoyggjar", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Sambandsríki Amerikas fjarskotnu oyggjar", - "UN": "Sameindu Tjóðir", "US": "Sambandsríki Amerika", "UY": "Uruguai", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/fr.json b/src/Symfony/Component/Intl/Resources/data/regions/fr.json index 17184b5d4f503..466fd46366f91 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/fr.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/fr.json @@ -72,7 +72,6 @@ "ER": "Érythrée", "ES": "Espagne", "ET": "Éthiopie", - "EZ": "zone euro", "FI": "Finlande", "FJ": "Fidji", "FK": "Îles Malouines", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Ouganda", "UM": "Îles mineures éloignées des États-Unis", - "UN": "Nations Unies", "US": "États-Unis", "UY": "Uruguay", "UZ": "Ouzbékistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ga.json b/src/Symfony/Component/Intl/Resources/data/regions/ga.json index ba938a53c13d6..6ca450d3aa64b 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ga.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ga.json @@ -72,7 +72,6 @@ "ER": "an Eiritré", "ES": "an Spáinn", "ET": "an Aetóip", - "EZ": "Limistéar an euro", "FI": "an Fhionlainn", "FJ": "Fidsí", "FK": "Oileáin Fháclainne", @@ -237,7 +236,6 @@ "UA": "an Úcráin", "UG": "Uganda", "UM": "Oileáin Imeallacha S.A.M.", - "UN": "na Náisiúin Aontaiteh", "US": "Stáit Aontaithe Mheiriceá", "UY": "Uragua", "UZ": "an Úisbéiceastáin", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/gd.json b/src/Symfony/Component/Intl/Resources/data/regions/gd.json index 6844ad29d3c84..88ebf40449e36 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/gd.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/gd.json @@ -72,7 +72,6 @@ "ER": "Eartra", "ES": "An Spàinnt", "ET": "An Itiop", - "EZ": "Raon an Eòro", "FI": "An Fhionnlann", "FJ": "Fìdi", "FK": "Na h-Eileanan Fàclannach", @@ -237,7 +236,6 @@ "UA": "An Ucràin", "UG": "Uganda", "UM": "Meanbh-Eileanan Iomallach nan SA", - "UN": "Na Dùthchannan Aonaichte", "US": "Na Stàitean Aonaichte", "UY": "Uruguaidh", "UZ": "Usbagastàn", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/gl.json b/src/Symfony/Component/Intl/Resources/data/regions/gl.json index e6f23e88f5bed..1cdd8900e1036 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/gl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/gl.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "España", "ET": "Etiopía", - "EZ": "Eurozona", "FI": "Finlandia", "FJ": "Fidxi", "FK": "Illas Malvinas", @@ -237,7 +236,6 @@ "UA": "Ucraína", "UG": "Uganda", "UM": "Illas Ultramarinas dos EUA", - "UN": "Nacións Unidas", "US": "Estados Unidos de América", "UY": "Uruguai", "UZ": "Uzbequistán", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/gu.json b/src/Symfony/Component/Intl/Resources/data/regions/gu.json index d3e310380bcd4..83e9ba7a6268f 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/gu.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/gu.json @@ -72,7 +72,6 @@ "ER": "એરિટ્રિયા", "ES": "સ્પેન", "ET": "ઇથિઓપિયા", - "EZ": "યુરોઝોન", "FI": "ફિનલેન્ડ", "FJ": "ફીજી", "FK": "ફૉકલેન્ડ આઇલેન્ડ્સ", @@ -237,7 +236,6 @@ "UA": "યુક્રેન", "UG": "યુગાંડા", "UM": "યુ.એસ. આઉટલાઇનિંગ આઇલેન્ડ્સ", - "UN": "સંયુક્ત રાષ્ટ્ર", "US": "યુનાઇટેડ સ્ટેટ્સ", "UY": "ઉરુગ્વે", "UZ": "ઉઝ્બેકિસ્તાન", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/he.json b/src/Symfony/Component/Intl/Resources/data/regions/he.json index ce12c7030efa7..1bbfb96d1f06e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/he.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/he.json @@ -72,7 +72,6 @@ "ER": "אריתריאה", "ES": "ספרד", "ET": "אתיופיה", - "EZ": "גוש האירו", "FI": "פינלנד", "FJ": "פיג׳י", "FK": "איי פוקלנד", @@ -237,7 +236,6 @@ "UA": "אוקראינה", "UG": "אוגנדה", "UM": "האיים המרוחקים הקטנים של ארה״ב", - "UN": "האומות המאוחדות", "US": "ארצות הברית", "UY": "אורוגוואי", "UZ": "אוזבקיסטן", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/hi.json b/src/Symfony/Component/Intl/Resources/data/regions/hi.json index 3cb506ce25115..9ea72b6b228dd 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/hi.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/hi.json @@ -72,7 +72,6 @@ "ER": "इरिट्रिया", "ES": "स्पेन", "ET": "इथियोपिया", - "EZ": "यूरोज़ोन", "FI": "फ़िनलैंड", "FJ": "फ़िजी", "FK": "फ़ॉकलैंड द्वीपसमूह", @@ -237,7 +236,6 @@ "UA": "यूक्रेन", "UG": "युगांडा", "UM": "यू॰एस॰ आउटलाइंग द्वीपसमूह", - "UN": "संयुक्त राष्ट्र", "US": "संयुक्त राज्य", "UY": "उरूग्वे", "UZ": "उज़्बेकिस्तान", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/hr.json b/src/Symfony/Component/Intl/Resources/data/regions/hr.json index b086e081de377..03f59c24e93ce 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/hr.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/hr.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Španjolska", "ET": "Etiopija", - "EZ": "eurozona", "FI": "Finska", "FJ": "Fidži", "FK": "Falklandski otoci", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Mali udaljeni otoci SAD-a", - "UN": "Ujedinjeni narodi", "US": "Sjedinjene Američke Države", "UY": "Urugvaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/hu.json b/src/Symfony/Component/Intl/Resources/data/regions/hu.json index badd300ee33e6..5011e0398285d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/hu.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/hu.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanyolország", "ET": "Etiópia", - "EZ": "Eurózóna", "FI": "Finnország", "FJ": "Fidzsi", "FK": "Falkland-szigetek", @@ -237,7 +236,6 @@ "UA": "Ukrajna", "UG": "Uganda", "UM": "Az USA lakatlan külbirtokai", - "UN": "Egyesült Nemzetek Szervezete", "US": "Egyesült Államok", "UY": "Uruguay", "UZ": "Üzbegisztán", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/hy.json b/src/Symfony/Component/Intl/Resources/data/regions/hy.json index 08be7f38349f0..6f4ba308e0890 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/hy.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/hy.json @@ -72,7 +72,6 @@ "ER": "Էրիթրեա", "ES": "Իսպանիա", "ET": "Եթովպիա", - "EZ": "Եվրագոտի", "FI": "Ֆինլանդիա", "FJ": "Ֆիջի", "FK": "Ֆոլքլենդյան կղզիներ", @@ -237,7 +236,6 @@ "UA": "Ուկրաինա", "UG": "Ուգանդա", "UM": "Արտաքին կղզիներ (ԱՄՆ)", - "UN": "Միավորված ազգերի կազմակերպություն", "US": "Միացյալ Նահանգներ", "UY": "Ուրուգվայ", "UZ": "Ուզբեկստան", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/id.json b/src/Symfony/Component/Intl/Resources/data/regions/id.json index 552825ccdffd1..007d02cccbfd5 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/id.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/id.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanyol", "ET": "Etiopia", - "EZ": "Zona Euro", "FI": "Finlandia", "FJ": "Fiji", "FK": "Kepulauan Malvinas", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Kepulauan Terluar A.S.", - "UN": "Perserikatan Bangsa-Bangsa", "US": "Amerika Serikat", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/in.json b/src/Symfony/Component/Intl/Resources/data/regions/in.json index 552825ccdffd1..007d02cccbfd5 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/in.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/in.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanyol", "ET": "Etiopia", - "EZ": "Zona Euro", "FI": "Finlandia", "FJ": "Fiji", "FK": "Kepulauan Malvinas", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Kepulauan Terluar A.S.", - "UN": "Perserikatan Bangsa-Bangsa", "US": "Amerika Serikat", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/is.json b/src/Symfony/Component/Intl/Resources/data/regions/is.json index db171546d2bff..294f9fb20b580 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/is.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/is.json @@ -72,7 +72,6 @@ "ER": "Erítrea", "ES": "Spánn", "ET": "Eþíópía", - "EZ": "Evrusvæðið", "FI": "Finnland", "FJ": "Fídjíeyjar", "FK": "Falklandseyjar", @@ -237,7 +236,6 @@ "UA": "Úkraína", "UG": "Úganda", "UM": "Smáeyjar Bandaríkjanna", - "UN": "Sameinuðu þjóðirnar", "US": "Bandaríkin", "UY": "Úrúgvæ", "UZ": "Úsbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/it.json b/src/Symfony/Component/Intl/Resources/data/regions/it.json index 865a31a6accbd..5cef8d7ec790b 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/it.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/it.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spagna", "ET": "Etiopia", - "EZ": "Eurozona", "FI": "Finlandia", "FJ": "Figi", "FK": "Isole Falkland", @@ -237,7 +236,6 @@ "UA": "Ucraina", "UG": "Uganda", "UM": "Altre isole americane del Pacifico", - "UN": "Nazioni Unite", "US": "Stati Uniti", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/iw.json b/src/Symfony/Component/Intl/Resources/data/regions/iw.json index ce12c7030efa7..1bbfb96d1f06e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/iw.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/iw.json @@ -72,7 +72,6 @@ "ER": "אריתריאה", "ES": "ספרד", "ET": "אתיופיה", - "EZ": "גוש האירו", "FI": "פינלנד", "FJ": "פיג׳י", "FK": "איי פוקלנד", @@ -237,7 +236,6 @@ "UA": "אוקראינה", "UG": "אוגנדה", "UM": "האיים המרוחקים הקטנים של ארה״ב", - "UN": "האומות המאוחדות", "US": "ארצות הברית", "UY": "אורוגוואי", "UZ": "אוזבקיסטן", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ja.json b/src/Symfony/Component/Intl/Resources/data/regions/ja.json index 511a6bde6573f..f62db01842d52 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ja.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ja.json @@ -72,7 +72,6 @@ "ER": "エリトリア", "ES": "スペイン", "ET": "エチオピア", - "EZ": "ユーロ圏", "FI": "フィンランド", "FJ": "フィジー", "FK": "フォークランド諸島", @@ -237,7 +236,6 @@ "UA": "ウクライナ", "UG": "ウガンダ", "UM": "合衆国領有小離島", - "UN": "国際連合", "US": "アメリカ合衆国", "UY": "ウルグアイ", "UZ": "ウズベキスタン", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ka.json b/src/Symfony/Component/Intl/Resources/data/regions/ka.json index 861ca2ea951ac..4d145bab65e37 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ka.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ka.json @@ -72,7 +72,6 @@ "ER": "ერიტრეა", "ES": "ესპანეთი", "ET": "ეთიოპია", - "EZ": "ევროზონა", "FI": "ფინეთი", "FJ": "ფიჯი", "FK": "ფოლკლენდის კუნძულები", @@ -237,7 +236,6 @@ "UA": "უკრაინა", "UG": "უგანდა", "UM": "აშშ-ის შორეული კუნძულები", - "UN": "გაერო", "US": "ამერიკის შეერთებული შტატები", "UY": "ურუგვაი", "UZ": "უზბეკეთი", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/kk.json b/src/Symfony/Component/Intl/Resources/data/regions/kk.json index 0c6e912947b2e..2cd5007dd1061 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/kk.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/kk.json @@ -72,7 +72,6 @@ "ER": "Эритрея", "ES": "Испания", "ET": "Эфиопия", - "EZ": "Еуроаймақ", "FI": "Финляндия", "FJ": "Фиджи", "FK": "Фолкленд аралдары", @@ -237,7 +236,6 @@ "UA": "Украина", "UG": "Уганда", "UM": "АҚШ-тың сыртқы кіші аралдары", - "UN": "Біріккен Ұлттар Ұйымы", "US": "Америка Құрама Штаттары", "UY": "Уругвай", "UZ": "Өзбекстан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/km.json b/src/Symfony/Component/Intl/Resources/data/regions/km.json index 50d149e55e0dc..21fe35191db61 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/km.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/km.json @@ -72,7 +72,6 @@ "ER": "អេរីត្រេ", "ES": "អេស្ប៉ាញ", "ET": "អេត្យូពី", - "EZ": "តំបន់ចាយលុយអឺរ៉ូ", "FI": "ហ្វាំងឡង់", "FJ": "ហ្វីជី", "FK": "កោះ​ហ្វក់ឡែន", @@ -237,7 +236,6 @@ "UA": "អ៊ុយក្រែន", "UG": "អ៊ូហ្គង់ដា", "UM": "កោះ​អៅឡាយីង​អាមេរិក", - "UN": "អង្គការសហប្រជាជាតិ", "US": "សហរដ្ឋអាមេរិក", "UY": "អ៊ុយរូហ្គាយ", "UZ": "អ៊ូសបេគីស្ថាន", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/kn.json b/src/Symfony/Component/Intl/Resources/data/regions/kn.json index 0265e4f39be72..9e452245b0637 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/kn.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/kn.json @@ -72,7 +72,6 @@ "ER": "ಎರಿಟ್ರಿಯಾ", "ES": "ಸ್ಪೇನ್", "ET": "ಇಥಿಯೋಪಿಯಾ", - "EZ": "ಯೂರೋಝೋನ್‌", "FI": "ಫಿನ್‌ಲ್ಯಾಂಡ್", "FJ": "ಫಿಜಿ", "FK": "ಫಾಕ್‌ಲ್ಯಾಂಡ್ ದ್ವೀಪಗಳು", @@ -237,7 +236,6 @@ "UA": "ಉಕ್ರೈನ್", "UG": "ಉಗಾಂಡಾ", "UM": "ಯುಎಸ್‌ ಔಟ್‌ಲೇಯಿಂಗ್ ದ್ವೀಪಗಳು", - "UN": "ಸಂಯುಕ್ತ ಸಂಸ್ಥಾನಗಳು", "US": "ಅಮೇರಿಕಾ ಸಂಯುಕ್ತ ಸಂಸ್ಥಾನ", "UY": "ಉರುಗ್ವೆ", "UZ": "ಉಜ್ಬೇಕಿಸ್ಥಾನ್", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ko.json b/src/Symfony/Component/Intl/Resources/data/regions/ko.json index e33d48d1b9deb..b955a71a5d35f 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ko.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ko.json @@ -72,7 +72,6 @@ "ER": "에리트리아", "ES": "스페인", "ET": "에티오피아", - "EZ": "유로존", "FI": "핀란드", "FJ": "피지", "FK": "포클랜드 제도", @@ -237,7 +236,6 @@ "UA": "우크라이나", "UG": "우간다", "UM": "미국령 해외 제도", - "UN": "유엔", "US": "미국", "UY": "우루과이", "UZ": "우즈베키스탄", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ky.json b/src/Symfony/Component/Intl/Resources/data/regions/ky.json index e3acf4db41793..9b6d27ce8369d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ky.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ky.json @@ -72,7 +72,6 @@ "ER": "Эритрея", "ES": "Испания", "ET": "Эфиопия", - "EZ": "Еврозона", "FI": "Финляндия", "FJ": "Фиджи", "FK": "Фолкленд аралдары", @@ -237,7 +236,6 @@ "UA": "Украина", "UG": "Уганда", "UM": "АКШнын сырткы аралдары", - "UN": "БУ", "US": "Америка Кошмо Штаттары", "UY": "Уругвай", "UZ": "Өзбекстан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/lo.json b/src/Symfony/Component/Intl/Resources/data/regions/lo.json index 8de0bb9006954..fb116d91a0068 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/lo.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/lo.json @@ -72,7 +72,6 @@ "ER": "ເອຣິເທຣຍ", "ES": "ສະເປນ", "ET": "ອີທິໂອເປຍ", - "EZ": "ເຂດຢູໂຣບ", "FI": "ຟິນແລນ", "FJ": "ຟິຈິ", "FK": "ຫມູ່ເກາະຟອກແລນ", @@ -237,7 +236,6 @@ "UA": "ຢູເຄຣນ", "UG": "ອູການດາ", "UM": "ໝູ່ເກາະຮອບນອກຂອງສະຫະລັດຯ", - "UN": "ສະຫະປະຊາຊາດ", "US": "ສະຫະລັດ", "UY": "ອູຣຸກວຍ", "UZ": "ອຸສເບກິສະຖານ", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/lt.json b/src/Symfony/Component/Intl/Resources/data/regions/lt.json index d3d868d21ec1c..f7a79dbb770fd 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/lt.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/lt.json @@ -72,7 +72,6 @@ "ER": "Eritrėja", "ES": "Ispanija", "ET": "Etiopija", - "EZ": "euro zona", "FI": "Suomija", "FJ": "Fidžis", "FK": "Folklando Salos", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Jungtinių Valstijų Mažosios Tolimosios Salos", - "UN": "Jungtinės Tautos", "US": "Jungtinės Valstijos", "UY": "Urugvajus", "UZ": "Uzbekistanas", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/lv.json b/src/Symfony/Component/Intl/Resources/data/regions/lv.json index a5d6739a27730..87ad10494cecd 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/lv.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/lv.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Spānija", "ET": "Etiopija", - "EZ": "Eirozona", "FI": "Somija", "FJ": "Fidži", "FK": "Folklenda salas", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "ASV Mazās Aizjūras salas", - "UN": "Apvienoto Nāciju Organizācija", "US": "Amerikas Savienotās Valstis", "UY": "Urugvaja", "UZ": "Uzbekistāna", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/meta.json b/src/Symfony/Component/Intl/Resources/data/regions/meta.json index 9dbe566037405..54569d238e0aa 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/meta.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/meta.json @@ -72,7 +72,6 @@ "ER", "ES", "ET", - "EZ", "FI", "FJ", "FK", @@ -237,7 +236,6 @@ "UA", "UG", "UM", - "UN", "US", "UY", "UZ", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/mk.json b/src/Symfony/Component/Intl/Resources/data/regions/mk.json index d03ade1157a73..bc11772b20bda 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/mk.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/mk.json @@ -72,7 +72,6 @@ "ER": "Еритреја", "ES": "Шпанија", "ET": "Етиопија", - "EZ": "Еврозона", "FI": "Финска", "FJ": "Фиџи", "FK": "Фолкландски Острови", @@ -237,7 +236,6 @@ "UA": "Украина", "UG": "Уганда", "UM": "Американски територии во Пацификот", - "UN": "Обединети нации", "US": "Соединети Американски Држави", "UY": "Уругвај", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ml.json b/src/Symfony/Component/Intl/Resources/data/regions/ml.json index 54e7f6568d3a4..6f367931cc9e4 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ml.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ml.json @@ -72,7 +72,6 @@ "ER": "എറിത്രിയ", "ES": "സ്‌പെയിൻ", "ET": "എത്യോപ്യ", - "EZ": "യൂറോസോൺ", "FI": "ഫിൻലാൻഡ്", "FJ": "ഫിജി", "FK": "ഫാക്ക്‌ലാന്റ് ദ്വീപുകൾ", @@ -237,7 +236,6 @@ "UA": "ഉക്രെയ്‌ൻ", "UG": "ഉഗാണ്ട", "UM": "യു.എസ്. ദ്വീപസമൂഹങ്ങൾ", - "UN": "ഐക്യരാഷ്ട്രസഭ", "US": "അമേരിക്കൻ ഐക്യനാടുകൾ", "UY": "ഉറുഗ്വേ", "UZ": "ഉസ്‌ബെക്കിസ്ഥാൻ", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/mn.json b/src/Symfony/Component/Intl/Resources/data/regions/mn.json index f32d2000b4a11..a40f22bb718c5 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/mn.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/mn.json @@ -72,7 +72,6 @@ "ER": "Эритрей", "ES": "Испани", "ET": "Этиоп", - "EZ": "Евро бүс", "FI": "Финланд", "FJ": "Фижи", "FK": "Фолклендийн арлууд", @@ -237,7 +236,6 @@ "UA": "Украин", "UG": "Уганда", "UM": "Америкийн Нэгдсэн Улсын бага арлууд", - "UN": "Нэгдсэн Үндэстний Байгууллага", "US": "Америкийн Нэгдсэн Улс", "UY": "Уругвай", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/mr.json b/src/Symfony/Component/Intl/Resources/data/regions/mr.json index f80e64ff770d3..91786de809b82 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/mr.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/mr.json @@ -72,7 +72,6 @@ "ER": "एरिट्रिया", "ES": "स्पेन", "ET": "इथिओपिया", - "EZ": "युरोझोन", "FI": "फिनलंड", "FJ": "फिजी", "FK": "फॉकलंड बेटे", @@ -237,7 +236,6 @@ "UA": "युक्रेन", "UG": "युगांडा", "UM": "यू.एस. आउटलाइंग बेटे", - "UN": "संयुक्त राष्ट्र", "US": "युनायटेड स्टेट्स", "UY": "उरुग्वे", "UZ": "उझबेकिस्तान", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ms.json b/src/Symfony/Component/Intl/Resources/data/regions/ms.json index a5b9fae212e0f..6c407fbc872d1 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ms.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ms.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Sepanyol", "ET": "Ethiopia", - "EZ": "Zon Euro", "FI": "Finland", "FJ": "Fiji", "FK": "Kepulauan Falkland", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "Kepulauan Terpencil A.S.", - "UN": "Bangsa-bangsa Bersatu", "US": "Amerika Syarikat", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/my.json b/src/Symfony/Component/Intl/Resources/data/regions/my.json index 73946f0ac61fa..5a40c847b516a 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/my.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/my.json @@ -72,7 +72,6 @@ "ER": "အီရီထရီးယား", "ES": "စပိန်", "ET": "အီသီယိုးပီးယား", - "EZ": "ဥရောပဒေသ", "FI": "ဖင်လန်", "FJ": "ဖီဂျီ", "FK": "ဖော့ကလန် ကျွန်းစု", @@ -237,7 +236,6 @@ "UA": "ယူကရိန်း", "UG": "ယူဂန်းဒါး", "UM": "ယူနိုက်တက်စတိတ် ကျွန်းနိုင်ငံများ", - "UN": "ကုလသမဂ္ဂ", "US": "အမေရိကန် ပြည်ထောင်စု", "UY": "ဥရုဂွေး", "UZ": "ဥဇဘက်ကစ္စတန်", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/nb.json b/src/Symfony/Component/Intl/Resources/data/regions/nb.json index ad15e817644d3..dcf10608a7458 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/nb.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/nb.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spania", "ET": "Etiopia", - "EZ": "eurosonen", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandsøyene", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "USAs ytre øyer", - "UN": "FN", "US": "USA", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ne.json b/src/Symfony/Component/Intl/Resources/data/regions/ne.json index a72f1fdccf6ea..34600f488c87e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ne.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ne.json @@ -72,7 +72,6 @@ "ER": "एरित्रिया", "ES": "स्पेन", "ET": "इथियोपिया", - "EZ": "युरोजोन", "FI": "फिन्ल्याण्ड", "FJ": "फिजी", "FK": "फकल्याण्ड टापुहरु", @@ -237,7 +236,6 @@ "UA": "युक्रेन", "UG": "युगाण्डा", "UM": "संयुक्त राज्यका बाह्य टापुहरु", - "UN": "संयुक्त राष्ट्र संघ", "US": "संयुक्त राज्य", "UY": "उरूग्वे", "UZ": "उज्बेकिस्तान", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/nl.json b/src/Symfony/Component/Intl/Resources/data/regions/nl.json index a57efb1b355b2..48abedc9313bb 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/nl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/nl.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanje", "ET": "Ethiopië", - "EZ": "eurozone", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandeilanden", @@ -237,7 +236,6 @@ "UA": "Oekraïne", "UG": "Oeganda", "UM": "Kleine afgelegen eilanden van de Verenigde Staten", - "UN": "Verenigde Naties", "US": "Verenigde Staten", "UY": "Uruguay", "UZ": "Oezbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/nn.json b/src/Symfony/Component/Intl/Resources/data/regions/nn.json index 60e95611cf146..e80e7639fa26b 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/nn.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/nn.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spania", "ET": "Etiopia", - "EZ": "eurosona", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandsøyane", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "USAs ytre småøyar", - "UN": "SN", "US": "USA", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/no.json b/src/Symfony/Component/Intl/Resources/data/regions/no.json index ad15e817644d3..dcf10608a7458 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/no.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/no.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spania", "ET": "Etiopia", - "EZ": "eurosonen", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandsøyene", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "USAs ytre øyer", - "UN": "FN", "US": "USA", "UY": "Uruguay", "UZ": "Usbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/or.json b/src/Symfony/Component/Intl/Resources/data/regions/or.json index c7d9d4c46118a..e2680dc0d3c79 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/or.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/or.json @@ -72,7 +72,6 @@ "ER": "ଇରିଟ୍ରିୟା", "ES": "ସ୍ପେନ୍", "ET": "ଇଥିଓପିଆ", - "EZ": "ୟୁରୋକ୍ଷେତ୍ର", "FI": "ଫିନଲ୍ୟାଣ୍ଡ", "FJ": "ଫିଜି", "FK": "ଫକ୍‌ଲ୍ୟାଣ୍ଡ ଦ୍ଵୀପପୁଞ୍ଜ", @@ -237,7 +236,6 @@ "UA": "ୟୁକ୍ରେନ୍‌", "UG": "ଉଗାଣ୍ଡା", "UM": "ଯୁକ୍ତରାଷ୍ଟ୍ର ଆଉଟ୍‌ଲାଇଙ୍ଗ ଦ୍ଵୀପପୁଞ୍ଜ", - "UN": "ଜାତିସଂଘ", "US": "ଯୁକ୍ତ ରାଷ୍ଟ୍ର", "UY": "ଉରୁଗୁଏ", "UZ": "ଉଜବେକିସ୍ତାନ", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/pa.json b/src/Symfony/Component/Intl/Resources/data/regions/pa.json index 206bf55846097..f8091bd3bdecf 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/pa.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/pa.json @@ -72,7 +72,6 @@ "ER": "ਇਰੀਟ੍ਰਿਆ", "ES": "ਸਪੇਨ", "ET": "ਇਥੋਪੀਆ", - "EZ": "EZ", "FI": "ਫਿਨਲੈਂਡ", "FJ": "ਫ਼ਿਜੀ", "FK": "ਫ਼ਾਕਲੈਂਡ ਟਾਪੂ", @@ -237,7 +236,6 @@ "UA": "ਯੂਕਰੇਨ", "UG": "ਯੂਗਾਂਡਾ", "UM": "ਯੂ.ਐੱਸ. ਦੂਰ-ਦੁਰਾਡੇ ਟਾਪੂ", - "UN": "ਸੰਯੁਕਤ ਰਾਸ਼ਟਰ", "US": "ਸੰਯੁਕਤ ਰਾਜ", "UY": "ਉਰੂਗਵੇ", "UZ": "ਉਜ਼ਬੇਕਿਸਤਾਨ", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/pl.json b/src/Symfony/Component/Intl/Resources/data/regions/pl.json index 9abb131f316fd..671b9d6d74d88 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/pl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/pl.json @@ -72,7 +72,6 @@ "ER": "Erytrea", "ES": "Hiszpania", "ET": "Etiopia", - "EZ": "strefa euro", "FI": "Finlandia", "FJ": "Fidżi", "FK": "Falklandy", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Dalekie Wyspy Mniejsze Stanów Zjednoczonych", - "UN": "Organizacja Narodów Zjednoczonych", "US": "Stany Zjednoczone", "UY": "Urugwaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ps.json b/src/Symfony/Component/Intl/Resources/data/regions/ps.json index 03675445edcd4..45d6a2d8e5ebb 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ps.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ps.json @@ -72,7 +72,6 @@ "ER": "اریتره", "ES": "هسپانیه", "ET": "حبشه", - "EZ": "اروپاسيمه", "FI": "فنلینډ", "FJ": "في جي", "FK": "فوکلنډ ټاپو", @@ -237,7 +236,6 @@ "UA": "اوکراین", "UG": "یوګانډا", "UM": "د متحده ایالاتو ټاپو ټاپوګانې", - "UN": "ملگري ملتونه", "US": "متحده ایالات", "UY": "یوروګوی", "UZ": "اوزبکستان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/pt.json b/src/Symfony/Component/Intl/Resources/data/regions/pt.json index 6bf9bf4269523..a004367e161f9 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/pt.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/pt.json @@ -72,7 +72,6 @@ "ER": "Eritreia", "ES": "Espanha", "ET": "Etiópia", - "EZ": "zona do euro", "FI": "Finlândia", "FJ": "Fiji", "FK": "Ilhas Malvinas", @@ -237,7 +236,6 @@ "UA": "Ucrânia", "UG": "Uganda", "UM": "Ilhas Menores Distantes dos EUA", - "UN": "Nações Unidas", "US": "Estados Unidos", "UY": "Uruguai", "UZ": "Uzbequistão", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json b/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json index 38c9ce880b379..5b84703bffea6 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json @@ -19,7 +19,6 @@ "DM": "Domínica", "EE": "Estónia", "EH": "Sara Ocidental", - "EZ": "Zona Euro", "FK": "Ilhas Falkland", "FO": "Ilhas Faroé", "GL": "Gronelândia", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ro.json b/src/Symfony/Component/Intl/Resources/data/regions/ro.json index 76157267588b0..11c04d88d2c7f 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ro.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ro.json @@ -72,7 +72,6 @@ "ER": "Eritreea", "ES": "Spania", "ET": "Etiopia", - "EZ": "Zona euro", "FI": "Finlanda", "FJ": "Fiji", "FK": "Insulele Falkland", @@ -237,7 +236,6 @@ "UA": "Ucraina", "UG": "Uganda", "UM": "Insulele Îndepărtate ale S.U.A.", - "UN": "Națiunile Unite", "US": "Statele Unite ale Americii", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ru.json b/src/Symfony/Component/Intl/Resources/data/regions/ru.json index 3b172ca715175..569797192e320 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ru.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ru.json @@ -72,7 +72,6 @@ "ER": "Эритрея", "ES": "Испания", "ET": "Эфиопия", - "EZ": "еврозона", "FI": "Финляндия", "FJ": "Фиджи", "FK": "Фолклендские о-ва", @@ -237,7 +236,6 @@ "UA": "Украина", "UG": "Уганда", "UM": "Внешние малые о-ва (США)", - "UN": "Организация Объединенных Наций", "US": "Соединенные Штаты", "UY": "Уругвай", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json b/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json index 5aba89f37403b..41c5b42ffc25d 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/se_FI.json @@ -2,10 +2,8 @@ "Version": "2.1.38.73", "Names": { "BA": "Bosnia ja Hercegovina", - "EZ": "Euroavádat", "KH": "Kamboža", "SD": "Sudan", - "TD": "Chad", - "UN": "Ovttastuvvan Našuvnnat" + "TD": "Chad" } } diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sh.json b/src/Symfony/Component/Intl/Resources/data/regions/sh.json index e8b664995118a..b634f3bef4f3e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sh.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sh.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Španija", "ET": "Etiopija", - "EZ": "Evrozona", "FI": "Finska", "FJ": "Fidži", "FK": "Foklandska Ostrva", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Udaljena ostrva SAD", - "UN": "Ujedinjene nacije", "US": "Sjedinjene Države", "UY": "Urugvaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/si.json b/src/Symfony/Component/Intl/Resources/data/regions/si.json index 9975aeec7d45f..c3b969881e4bb 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/si.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/si.json @@ -72,7 +72,6 @@ "ER": "එරිත්‍රියාව", "ES": "ස්පාඤ්ඤය", "ET": "ඉතියෝපියාව", - "EZ": "යුරෝ කලාපය", "FI": "ෆින්ලන්තය", "FJ": "ෆීජී", "FK": "ෆෝක්ලන්ත දූපත්", @@ -237,7 +236,6 @@ "UA": "යුක්රේනය", "UG": "උගන්ඩාව", "UM": "එක්සත් ජනපද ඈත දූපත්", - "UN": "එක්සත් ජාතීන්", "US": "එක්සත් ජනපදය", "UY": "උරුගුවේ", "UZ": "උස්බෙකිස්ථානය", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sk.json b/src/Symfony/Component/Intl/Resources/data/regions/sk.json index 0bba0649a8f31..7d8d918b4495c 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sk.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sk.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Španielsko", "ET": "Etiópia", - "EZ": "eurozóna", "FI": "Fínsko", "FJ": "Fidži", "FK": "Falklandy", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Menšie odľahlé ostrovy USA", - "UN": "Organizácia Spojených národov", "US": "Spojené štáty", "UY": "Uruguaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sl.json b/src/Symfony/Component/Intl/Resources/data/regions/sl.json index c84a219667d13..15bea67b9d04a 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sl.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Španija", "ET": "Etiopija", - "EZ": "evroobmočje", "FI": "Finska", "FJ": "Fidži", "FK": "Falklandski otoki", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Stranski zunanji otoki Združenih držav", - "UN": "Združeni narodi", "US": "Združene države Amerike", "UY": "Urugvaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sq.json b/src/Symfony/Component/Intl/Resources/data/regions/sq.json index af82944add734..67a4d6bcf7c0f 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sq.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sq.json @@ -72,7 +72,6 @@ "ER": "Eritre", "ES": "Spanjë", "ET": "Etiopi", - "EZ": "Eurozonë", "FI": "Finlandë", "FJ": "Fixhi", "FK": "Ishujt Falkland", @@ -237,7 +236,6 @@ "UA": "Ukrainë", "UG": "Ugandë", "UM": "Ishujt Periferikë të SHBA-së", - "UN": "Kombet e Bashkuara", "US": "Shtetet e Bashkuara të Amerikës", "UY": "Uruguai", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sr.json b/src/Symfony/Component/Intl/Resources/data/regions/sr.json index 125467cbb16d4..e11116d2d8196 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sr.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sr.json @@ -72,7 +72,6 @@ "ER": "Еритреја", "ES": "Шпанија", "ET": "Етиопија", - "EZ": "Еврозона", "FI": "Финска", "FJ": "Фиџи", "FK": "Фокландска Острва", @@ -237,7 +236,6 @@ "UA": "Украјина", "UG": "Уганда", "UM": "Удаљена острва САД", - "UN": "Уједињене нације", "US": "Сједињене Државе", "UY": "Уругвај", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json b/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json index e8b664995118a..b634f3bef4f3e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json @@ -72,7 +72,6 @@ "ER": "Eritreja", "ES": "Španija", "ET": "Etiopija", - "EZ": "Evrozona", "FI": "Finska", "FJ": "Fidži", "FK": "Foklandska Ostrva", @@ -237,7 +236,6 @@ "UA": "Ukrajina", "UG": "Uganda", "UM": "Udaljena ostrva SAD", - "UN": "Ujedinjene nacije", "US": "Sjedinjene Države", "UY": "Urugvaj", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sv.json b/src/Symfony/Component/Intl/Resources/data/regions/sv.json index 5801373a61caa..934324ff96fda 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sv.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sv.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spanien", "ET": "Etiopien", - "EZ": "eurozonen", "FI": "Finland", "FJ": "Fiji", "FK": "Falklandsöarna", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "USA:s yttre öar", - "UN": "Förenta Nationerna", "US": "USA", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/sw.json b/src/Symfony/Component/Intl/Resources/data/regions/sw.json index 2cb97478b9b35..a91a143bbc696 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/sw.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/sw.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Uhispania", "ET": "Ethiopia", - "EZ": "EZ", "FI": "Ufini", "FJ": "Fiji", "FK": "Visiwa vya Falkland", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "Visiwa Vidogo vya Nje vya Marekani", - "UN": "Umoja wa Mataifa", "US": "Marekani", "UY": "Uruguay", "UZ": "Uzibekistani", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ta.json b/src/Symfony/Component/Intl/Resources/data/regions/ta.json index 0cc6b2e94f282..b8238eeae1acc 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ta.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ta.json @@ -72,7 +72,6 @@ "ER": "எரிட்ரியா", "ES": "ஸ்பெயின்", "ET": "எத்தியோப்பியா", - "EZ": "யூரோஜோன்", "FI": "பின்லாந்து", "FJ": "ஃபிஜி", "FK": "ஃபாக்லாந்து தீவுகள்", @@ -237,7 +236,6 @@ "UA": "உக்ரைன்", "UG": "உகாண்டா", "UM": "யூ.எஸ். வெளிப்புறத் தீவுகள்", - "UN": "ஐக்கிய நாடுகள்", "US": "அமெரிக்கா", "UY": "உருகுவே", "UZ": "உஸ்பெகிஸ்தான்", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/te.json b/src/Symfony/Component/Intl/Resources/data/regions/te.json index e845e339bfb40..0045be5f4e123 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/te.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/te.json @@ -72,7 +72,6 @@ "ER": "ఎరిట్రియా", "ES": "స్పెయిన్", "ET": "ఇథియోపియా", - "EZ": "యూరోజోన్", "FI": "ఫిన్లాండ్", "FJ": "ఫిజీ", "FK": "ఫాక్‌ల్యాండ్ దీవులు", @@ -237,7 +236,6 @@ "UA": "ఉక్రెయిన్", "UG": "ఉగాండా", "UM": "సంయుక్త రాజ్య అమెరికా బయట ఉన్న దీవులు", - "UN": "యునైటెడ్ నేషన్స్", "US": "యునైటెడ్ స్టేట్స్", "UY": "ఉరుగ్వే", "UZ": "ఉజ్బెకిస్తాన్", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/th.json b/src/Symfony/Component/Intl/Resources/data/regions/th.json index 3317bbc7543e0..defa020527ad5 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/th.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/th.json @@ -72,7 +72,6 @@ "ER": "เอริเทรีย", "ES": "สเปน", "ET": "เอธิโอเปีย", - "EZ": "ยูโรโซน", "FI": "ฟินแลนด์", "FJ": "ฟิจิ", "FK": "หมู่เกาะฟอล์กแลนด์", @@ -237,7 +236,6 @@ "UA": "ยูเครน", "UG": "ยูกันดา", "UM": "หมู่เกาะรอบนอกของสหรัฐอเมริกา", - "UN": "สหประชาชาติ", "US": "สหรัฐอเมริกา", "UY": "อุรุกวัย", "UZ": "อุซเบกิสถาน", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/tl.json b/src/Symfony/Component/Intl/Resources/data/regions/tl.json index 19554b3f88089..546894d8f35d2 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/tl.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/tl.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Spain", "ET": "Ethiopia", - "EZ": "Eurozone", "FI": "Finland", "FJ": "Fiji", "FK": "Falkland Islands", @@ -237,7 +236,6 @@ "UA": "Ukraine", "UG": "Uganda", "UM": "U.S. Outlying Islands", - "UN": "United Nations", "US": "Estados Unidos", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/to.json b/src/Symfony/Component/Intl/Resources/data/regions/to.json index 5b63c0201836c..28812f59eed6e 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/to.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/to.json @@ -72,7 +72,6 @@ "ER": "ʻElitulia", "ES": "Sipeini", "ET": "ʻĪtiōpia", - "EZ": "ʻEulope fekauʻaki-paʻanga", "FI": "Finilani", "FJ": "Fisi", "FK": "ʻOtumotu Fokulani", @@ -237,7 +236,6 @@ "UA": "ʻŪkalaʻine", "UG": "ʻIukanitā", "UM": "ʻOtumotu siʻi ʻo ʻAmelika", - "UN": "ʻŪ fonua fakatahataha", "US": "Puleʻanga fakatahataha ʻAmelika", "UY": "ʻUlukuai", "UZ": "ʻUsipekitani", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/tr.json b/src/Symfony/Component/Intl/Resources/data/regions/tr.json index 6e12bc5f1f1be..6996536cbd2eb 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/tr.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/tr.json @@ -72,7 +72,6 @@ "ER": "Eritre", "ES": "İspanya", "ET": "Etiyopya", - "EZ": "Euro Bölgesi", "FI": "Finlandiya", "FJ": "Fiji", "FK": "Falkland Adaları", @@ -237,7 +236,6 @@ "UA": "Ukrayna", "UG": "Uganda", "UM": "ABD Küçük Harici Adaları", - "UN": "Birleşmiş Milletler", "US": "Amerika Birleşik Devletleri", "UY": "Uruguay", "UZ": "Özbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/uk.json b/src/Symfony/Component/Intl/Resources/data/regions/uk.json index 5ddda82648360..08d88962151d0 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/uk.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/uk.json @@ -72,7 +72,6 @@ "ER": "Еритрея", "ES": "Іспанія", "ET": "Ефіопія", - "EZ": "Єврозона", "FI": "Фінляндія", "FJ": "Фіджі", "FK": "Фолклендські острови", @@ -237,7 +236,6 @@ "UA": "Україна", "UG": "Уганда", "UM": "Віддалені острови США", - "UN": "Організація Об’єднаних Націй", "US": "Сполучені Штати", "UY": "Уруґвай", "UZ": "Узбекистан", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ur.json b/src/Symfony/Component/Intl/Resources/data/regions/ur.json index f315ffdedf7bf..ec4a8aff46592 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ur.json @@ -72,7 +72,6 @@ "ER": "اریٹیریا", "ES": "ہسپانیہ", "ET": "ایتھوپیا", - "EZ": "یوروزون", "FI": "فن لینڈ", "FJ": "فجی", "FK": "فاکلینڈ جزائر", @@ -237,7 +236,6 @@ "UA": "یوکرین", "UG": "یوگنڈا", "UM": "امریکہ سے باہر کے چھوٹے جزائز", - "UN": "اقوام متحدہ", "US": "ریاستہائے متحدہ", "UY": "یوروگوئے", "UZ": "ازبکستان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/uz.json b/src/Symfony/Component/Intl/Resources/data/regions/uz.json index ab2ddfc66edff..ff17448c5707b 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/uz.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/uz.json @@ -72,7 +72,6 @@ "ER": "Eritreya", "ES": "Ispaniya", "ET": "Efiopiya", - "EZ": "yevrozona", "FI": "Finlandiya", "FJ": "Fiji", "FK": "Folklend orollari", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "AQSH yondosh orollari", - "UN": "Birlashgan Millatlar Tashkiloti", "US": "Amerika Qo‘shma Shtatlari", "UY": "Urugvay", "UZ": "Oʻzbekiston", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/vi.json b/src/Symfony/Component/Intl/Resources/data/regions/vi.json index 4d286235a8b53..71df7f435e522 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/vi.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/vi.json @@ -72,7 +72,6 @@ "ER": "Eritrea", "ES": "Tây Ban Nha", "ET": "Ethiopia", - "EZ": "Khu vực đồng Euro", "FI": "Phần Lan", "FJ": "Fiji", "FK": "Quần đảo Falkland", @@ -237,7 +236,6 @@ "UA": "Ukraina", "UG": "Uganda", "UM": "Các tiểu đảo xa của Hoa Kỳ", - "UN": "Liên hiệp quốc", "US": "Hoa Kỳ", "UY": "Uruguay", "UZ": "Uzbekistan", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/zh.json b/src/Symfony/Component/Intl/Resources/data/regions/zh.json index 4fc172b7647ad..6a1e11eefd4da 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/zh.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/zh.json @@ -72,7 +72,6 @@ "ER": "厄立特里亚", "ES": "西班牙", "ET": "埃塞俄比亚", - "EZ": "欧元区", "FI": "芬兰", "FJ": "斐济", "FK": "福克兰群岛", @@ -237,7 +236,6 @@ "UA": "乌克兰", "UG": "乌干达", "UM": "美国本土外小岛屿", - "UN": "联合国", "US": "美国", "UY": "乌拉圭", "UZ": "乌兹别克斯坦", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json b/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json index 1b7ef475ad1e1..ab60d9829570c 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json @@ -72,7 +72,6 @@ "ER": "厄利垂亞", "ES": "西班牙", "ET": "衣索比亞", - "EZ": "歐元區", "FI": "芬蘭", "FJ": "斐濟", "FK": "福克蘭群島", @@ -237,7 +236,6 @@ "UA": "烏克蘭", "UG": "烏干達", "UM": "美國本土外小島嶼", - "UN": "聯合國", "US": "美國", "UY": "烏拉圭", "UZ": "烏茲別克", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/zu.json b/src/Symfony/Component/Intl/Resources/data/regions/zu.json index e92b1858c0684..77f36017cfd58 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/zu.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/zu.json @@ -72,7 +72,6 @@ "ER": "i-Eritrea", "ES": "i-Spain", "ET": "i-Ethiopia", - "EZ": "EZ", "FI": "i-Finland", "FJ": "i-Fiji", "FK": "i-Falkland Islands", @@ -237,7 +236,6 @@ "UA": "i-Ukraine", "UG": "i-Uganda", "UM": "i-U.S. Minor Outlying Islands", - "UN": "I-United Nations", "US": "i-United States", "UY": "i-Uruguay", "UZ": "i-Uzbekistan", diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php index 1b790d41c9a73..f282d64e01930 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php @@ -94,7 +94,6 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest 'ER', 'ES', 'ET', - 'EZ', 'FI', 'FJ', 'FK', @@ -259,7 +258,6 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest 'UA', 'UG', 'UM', - 'UN', 'US', 'UY', 'UZ', From 61529f3cd77864d8d8294f130c54caeefd3fca63 Mon Sep 17 00:00:00 2001 From: Marco Lipparini Date: Wed, 5 Sep 2018 16:49:52 +0200 Subject: [PATCH 28/55] [Console] fixed PHPDoc for setArgument/setOption in InputInterface --- src/Symfony/Component/Console/Input/InputInterface.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 805ee5173652d..c8a357b746f0d 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -90,8 +90,8 @@ public function getArgument($name); /** * Sets an argument value by name. * - * @param string $name The argument name - * @param string $value The argument value + * @param string $name The argument name + * @param string|string[] $value The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -127,8 +127,8 @@ public function getOption($name); /** * Sets an option value by name. * - * @param string $name The option name - * @param string|bool $value The option value + * @param string $name The option name + * @param string|string[]|bool $value The option value * * @throws InvalidArgumentException When option given doesn't exist */ From 0f861568aaf186bf395f411ae009bbc3bc3b7436 Mon Sep 17 00:00:00 2001 From: downace Date: Sat, 8 Sep 2018 01:12:13 +0900 Subject: [PATCH 29/55] [Console] fixed corrupt error output for unknown multibyte short option --- src/Symfony/Component/Console/Input/ArgvInput.php | 3 ++- src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index 741c734c723f2..2735fce693f7a 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -121,7 +121,8 @@ private function parseShortOptionSet($name) $len = \strlen($name); for ($i = 0; $i < $len; ++$i) { if (!$this->definition->hasShortcut($name[$i])) { - throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + $encoding = mb_detect_encoding($name, null, true); + throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding))); } $option = $this->definition->getOptionForShortcut($name[$i]); diff --git a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php index 9290d980f6a9c..c81385e3e3f70 100644 --- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -228,6 +228,11 @@ public function provideInvalidInput() new InputDefinition(array(new InputArgument('number'))), 'The "-1" option does not exist.', ), + array( + array('cli.php', '-fЩ'), + new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + 'The "-Щ" option does not exist.', + ), ); } From b1aff9993c1d320f34d38bf246036c77bd610b62 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 8 Sep 2018 20:42:42 +0200 Subject: [PATCH 30/55] [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions --- src/Symfony/Component/Console/Command/Command.php | 6 +++++- src/Symfony/Component/Console/Input/InputInterface.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 1f4b845fcab65..70b4546fde41c 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -163,10 +163,14 @@ protected function interact(InputInterface $input, OutputInterface $output) } /** - * Initializes the command just after the input has been validated. + * Initializes the command after the input has been bound and before the input + * is validated. * * 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. + * + * @see InputInterface::bind() + * @see InputInterface::validate() */ protected function initialize(InputInterface $input, OutputInterface $output) { diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 805ee5173652d..1bce4d0635250 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -59,6 +59,8 @@ public function getParameterOption($values, $default = false); /** * Binds the current Input instance with the given arguments and options. + * + * @throws RuntimeException */ public function bind(InputDefinition $definition); From 0c16cd9faeb7d08c7992c4399338260c6c3695b4 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 11 Sep 2018 18:38:47 +0200 Subject: [PATCH 31/55] [Console] Fix input values allowed types --- src/Symfony/Component/Console/Input/InputArgument.php | 4 ++-- src/Symfony/Component/Console/Input/InputInterface.php | 4 ++-- src/Symfony/Component/Console/Input/InputOption.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php index d4c5e35627ab3..2330cdc2ea565 100644 --- a/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/Symfony/Component/Console/Input/InputArgument.php @@ -86,7 +86,7 @@ public function isArray() /** * Sets the default value. * - * @param mixed $default The default value + * @param string|string[] $default The default value * * @throws LogicException When incorrect default value is given */ @@ -110,7 +110,7 @@ public function setDefault($default = null) /** * Returns the default value. * - * @return mixed The default value + * @return string|string[] The default value */ public function getDefault() { diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 088d1cfb3161d..354d198e046cf 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -83,7 +83,7 @@ public function getArguments(); * * @param string $name The argument name * - * @return mixed The argument value + * @return string|string[] The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -120,7 +120,7 @@ public function getOptions(); * * @param string $name The option name * - * @return mixed The option value + * @return string|string[]|bool The option value * * @throws InvalidArgumentException When option given doesn't exist */ diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 9567876c8ace9..429c9f037d981 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -149,7 +149,7 @@ public function isArray() /** * Sets the default value. * - * @param mixed $default The default value + * @param string|string[]|bool $default The default value * * @throws LogicException When incorrect default value is given */ @@ -173,7 +173,7 @@ public function setDefault($default = null) /** * Returns the default value. * - * @return mixed The default value + * @return string|string[]|bool The default value */ public function getDefault() { From 5318e2eb15c07b68c49dfa8cce35918ff64790e1 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 14 Sep 2018 09:02:52 +0200 Subject: [PATCH 32/55] forward the invalid_message option in date types --- .../Component/Form/Extension/Core/Type/DateType.php | 12 ++++++++++++ .../Component/Form/Extension/Core/Type/TimeType.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index b5dc3213d3baa..ad4499899a3ba 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -77,6 +77,18 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'error_bubbling' => true, ); + if (isset($options['invalid_message'])) { + $dayOptions['invalid_message'] = $options['invalid_message']; + $monthOptions['invalid_message'] = $options['invalid_message']; + $yearOptions['invalid_message'] = $options['invalid_message']; + } + + if (isset($options['invalid_message_parameters'])) { + $dayOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + $monthOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + $yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + } + $formatter = new \IntlDateFormatter( \Locale::getDefault(), $dateFormat, diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index 37357be199f11..4a27cd440b665 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -72,6 +72,18 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'error_bubbling' => true, ); + if (isset($options['invalid_message'])) { + $hourOptions['invalid_message'] = $options['invalid_message']; + $minuteOptions['invalid_message'] = $options['invalid_message']; + $secondOptions['invalid_message'] = $options['invalid_message']; + } + + if (isset($options['invalid_message_parameters'])) { + $hourOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + $minuteOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + $secondOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; + } + if ('choice' === $options['widget']) { $hours = $minutes = array(); From ee4ce43e91a87d04a7283f71d7a4cf4ca6732470 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 14 Sep 2018 13:24:16 +0200 Subject: [PATCH 33/55] fail reverse transforming invalid RFC 3339 dates --- .../DateTimeToRfc3339Transformer.php | 10 ++++++---- .../DateTimeToRfc3339TransformerTest.php | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php index f905fb8665d21..8d1a92af8b4bc 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php @@ -69,6 +69,10 @@ public function reverseTransform($rfc3339) return; } + if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}(?::\d{2})?(?:\.\d)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))$/', $rfc3339, $matches)) { + throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $rfc3339)); + } + try { $dateTime = new \DateTime($rfc3339); } catch (\Exception $e) { @@ -79,10 +83,8 @@ public function reverseTransform($rfc3339) $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); } - if (preg_match('/(\d{4})-(\d{2})-(\d{2})/', $rfc3339, $matches)) { - if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); - } + if (!checkdate($matches[2], $matches[3], $matches[1])) { + throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); } return $dateTime; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php index c02d3dd6950b9..5f4043523e73f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -134,12 +134,25 @@ public function testReverseTransformWithNonExistingDate() } /** + * @dataProvider invalidDateStringProvider * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException */ - public function testReverseTransformExpectsValidDateString() + public function testReverseTransformExpectsValidDateString($date) { $transformer = new DateTimeToRfc3339Transformer('UTC', 'UTC'); - $transformer->reverseTransform('2010-2010-2010'); + $transformer->reverseTransform($date); + } + + public function invalidDateStringProvider() + { + return array( + 'invalid month' => array('2010-2010-01'), + 'invalid day' => array('2010-10-2010'), + 'no date' => array('x'), + 'cookie format' => array('Saturday, 01-May-2010 04:05:00 Z'), + 'RFC 822 format' => array('Sat, 01 May 10 04:05:00 +0000'), + 'RSS format' => array('Sat, 01 May 2010 04:05:00 +0000'), + ); } } From 7d78e3672b9c7b2160b5a502bb9d12bfd770f9ac Mon Sep 17 00:00:00 2001 From: "Issei.M" Date: Sat, 15 Sep 2018 14:34:41 +0900 Subject: [PATCH 34/55] [Validator] Add Japanese translations --- .../Validator/Resources/translations/validators.ja.xlf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index a9d6b0812bf9d..0c61d15715b50 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -318,6 +318,14 @@ Error エラー + + This is not a valid UUID. + 有効なUUIDではありません。 + + + This value should be a multiple of {{ compared_value }}. + {{ compared_value }}の倍数でなければなりません。 + From 4f06f1524d41497b5c07a302c2457410ece9a523 Mon Sep 17 00:00:00 2001 From: Fred Cox Date: Sat, 15 Sep 2018 14:25:16 +0300 Subject: [PATCH 35/55] Add stricter checking for valid date time string --- .../DateTimeToHtml5DateTimeLocalTransformer.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php index 10b2e9aa7feed..041e51648332b 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php @@ -76,6 +76,10 @@ public function reverseTransform($dateTimeLocal) return; } + if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})[T ]\d{2}:\d{2}(?::\d{2})?$/', $dateTimeLocal, $matches)) { + throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $dateTimeLocal)); + } + try { $dateTime = new \DateTime($dateTimeLocal, new \DateTimeZone($this->outputTimezone)); } catch (\Exception $e) { @@ -86,10 +90,8 @@ public function reverseTransform($dateTimeLocal) $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); } - if (preg_match('/(\d{4})-(\d{2})-(\d{2})/', $dateTimeLocal, $m)) { - if (!checkdate($m[2], $m[3], $m[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $m[1], $m[2], $m[3])); - } + if (!checkdate($matches[2], $matches[3], $matches[1])) { + throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); } return $dateTime; From e21a1a4df1203086c090e7884f2f7232f12ad025 Mon Sep 17 00:00:00 2001 From: Fred Cox Date: Sat, 15 Sep 2018 14:32:16 +0300 Subject: [PATCH 36/55] Added relevent links for parsing to the phpdoc --- ...ateTimeToHtml5LocalDateTimeTransformer.php} | 13 +++++++++---- .../Form/Extension/Core/Type/DateTimeType.php | 4 ++-- ...imeToHtml5LocalDateTimeTransformerTest.php} | 18 +++++++++--------- 3 files changed, 20 insertions(+), 15 deletions(-) rename src/Symfony/Component/Form/Extension/Core/DataTransformer/{DateTimeToHtml5DateTimeLocalTransformer.php => DateTimeToHtml5LocalDateTimeTransformer.php} (83%) rename src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/{DateTimeToHtml5DateTimeLocaleTransformerTest.php => DateTimeToHtml5LocalDateTimeTransformerTest.php} (88%) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php similarity index 83% rename from src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php rename to src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php index 041e51648332b..ed90331266443 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocalTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php @@ -16,17 +16,18 @@ /** * @author Franz Wilding * @author Bernhard Schussek + * @author Fred Cox */ -class DateTimeToHtml5DateTimeLocalTransformer extends BaseDateTimeTransformer +class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer { const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; /** - * Transforms a normalized date into a localized date without trailing timezone. + * Transforms a \DateTime into a local date and time string. * * According to the HTML standard, the input string of a datetime-local * input is a RFC3339 date followed by 'T', followed by a RFC3339 time. - * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local + * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-local-date-and-time-string * * @param \DateTime|\DateTimeInterface $dateTime A DateTime object * @@ -57,7 +58,11 @@ public function transform($dateTime) } /** - * Transforms a formatted datetime-local string into a normalized date. + * Transforms a local date and time string into a \DateTime. + * + * When transforming back to DateTime the regex is slightly laxer, taking into + * account rules for parsing a local date and time string + * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#parse-a-local-date-and-time-string * * @param string $dateTimeLocal Formatted string * diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 28df7eb7eda7b..4913957117a9e 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -15,7 +15,7 @@ use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5DateTimeLocalTransformer; +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5LocalDateTimeTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; @@ -75,7 +75,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) if ('single_text' === $options['widget']) { if (self::HTML5_FORMAT === $pattern) { - $builder->addViewTransformer(new DateTimeToHtml5DateTimeLocalTransformer( + $builder->addViewTransformer(new DateTimeToHtml5LocalDateTimeTransformer( $options['model_timezone'], $options['view_timezone'] )); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php similarity index 88% rename from src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php rename to src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php index f2645ac0c5e3a..5dac998ad16a5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5DateTimeLocaleTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer; use PHPUnit\Framework\TestCase; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5DateTimeLocalTransformer; +use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5LocalDateTimeTransformer; -class DateTimeToHtml5DateTimeLocaleTransformerTest extends TestCase +class DateTimeToHtml5LocalDateTimeTransformerTest extends TestCase { public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) { @@ -59,7 +59,7 @@ public function reverseTransformProvider() */ public function testTransform($fromTz, $toTz, $from, $to) { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer($fromTz, $toTz); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer($fromTz, $toTz); $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTime($from) : null)); } @@ -70,7 +70,7 @@ public function testTransform($fromTz, $toTz, $from, $to) */ public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to) { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer($fromTz, $toTz); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer($fromTz, $toTz); $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTimeImmutable($from) : null)); } @@ -80,7 +80,7 @@ public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to) */ public function testTransformRequiresValidDateTime() { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer(); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer(); $transformer->transform('2010-01-01'); } @@ -89,7 +89,7 @@ public function testTransformRequiresValidDateTime() */ public function testReverseTransform($toTz, $fromTz, $to, $from) { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer($toTz, $fromTz); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer($toTz, $fromTz); if (null !== $to) { $this->assertEquals(new \DateTime($to), $transformer->reverseTransform($from)); @@ -103,7 +103,7 @@ public function testReverseTransform($toTz, $fromTz, $to, $from) */ public function testReverseTransformRequiresString() { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer(); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer(); $transformer->reverseTransform(12345); } @@ -112,7 +112,7 @@ public function testReverseTransformRequiresString() */ public function testReverseTransformWithNonExistingDate() { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer('UTC', 'UTC'); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer('UTC', 'UTC'); $transformer->reverseTransform('2010-04-31T04:05'); } @@ -122,7 +122,7 @@ public function testReverseTransformWithNonExistingDate() */ public function testReverseTransformExpectsValidDateString() { - $transformer = new DateTimeToHtml5DateTimeLocalTransformer('UTC', 'UTC'); + $transformer = new DateTimeToHtml5LocalDateTimeTransformer('UTC', 'UTC'); $transformer->reverseTransform('2010-2010-2010'); } From 9ef7f7038d87f25211edc2f5366e699c38c0c435 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 16 Sep 2018 21:41:33 +0200 Subject: [PATCH 37/55] [HttpFoundation] don't override StreamedResponse::setNotModified() --- .../Component/HttpFoundation/StreamedResponse.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 8552d7130580f..ed1c5ff3ece19 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -123,6 +123,8 @@ public function setContent($content) if (null !== $content) { throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); } + + $this->streamed = true; } /** @@ -134,16 +136,4 @@ public function getContent() { return false; } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function setNotModified() - { - $this->setCallback(function () {}); - - return parent::setNotModified(); - } } From af54189dfc2590b92358a1ece3528a3eeb7b3770 Mon Sep 17 00:00:00 2001 From: Andras Debreczeni Date: Tue, 18 Sep 2018 09:27:02 +0200 Subject: [PATCH 38/55] [Ldap] Use shut up operator on connection errors at ldap_start_tls --- src/Symfony/Component/Ldap/LdapClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Ldap/LdapClient.php b/src/Symfony/Component/Ldap/LdapClient.php index de341e06d2707..92a7be997068b 100644 --- a/src/Symfony/Component/Ldap/LdapClient.php +++ b/src/Symfony/Component/Ldap/LdapClient.php @@ -136,7 +136,7 @@ private function connect() ldap_set_option($this->connection, LDAP_OPT_REFERRALS, $this->optReferrals); if ($this->useStartTls) { - ldap_start_tls($this->connection); + @ldap_start_tls($this->connection); } } } From 7cb340a2dbf7015bcad466830ebfa51a39392085 Mon Sep 17 00:00:00 2001 From: Mponos George Date: Fri, 14 Sep 2018 00:01:37 +0300 Subject: [PATCH 39/55] KernelInterface can return null container --- src/Symfony/Component/HttpKernel/KernelInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php index 18b128c296ca8..670e0269dba18 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -139,7 +139,7 @@ public function getRootDir(); /** * Gets the current container. * - * @return ContainerInterface A ContainerInterface instance + * @return ContainerInterface|null A ContainerInterface instance or null when the Kernel is shutdown */ public function getContainer(); From 3247cdeea95df4c4514726196347bc2637e8d583 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 14 Sep 2018 15:32:30 +0200 Subject: [PATCH 40/55] forward false label option to nested types This change does not fix any built-in Symfony form themes, but takes into account the changes made in #28469 to allow third-party form themes work properly. --- .../Component/Form/Extension/Core/Type/DateTimeType.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index e6598a3f10cd0..ae2a75e145995 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -134,6 +134,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'invalid_message_parameters', ))); + if (false === $options['label']) { + $dateOptions['label'] = false; + $timeOptions['label'] = false; + } + if (null !== $options['date_widget']) { $dateOptions['widget'] = $options['date_widget']; } From 0d826ae85dc46b6e652a7b8801b98c704b4c1109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 18 Sep 2018 23:04:50 +0200 Subject: [PATCH 41/55] Provide debug_backtrace with proper args This would fail if we were using strict mode with php 7, because true is only a valid argument for php < 5.3.6. This was changed from PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT : true in #18272, but I do not understand why it was simplified, nor why DEBUG_BACKTRACE_IGNORE_ARGS was there at that time. --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 5f59dbe5e6e39..f95d1389ff83b 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -72,7 +72,7 @@ public static function register($mode = 0) } $mode = $getMode(); - $trace = debug_backtrace(true); + $trace = debug_backtrace(); $group = 'other'; $i = \count($trace); From fd30f4a21d6f44dda89a13f01f222d29aa270aed Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Mon, 10 Sep 2018 21:53:03 +0200 Subject: [PATCH 42/55] Allow reuse of Session between requests --- .../HttpFoundation/Session/Session.php | 4 +++- .../Tests/Session/SessionTest.php | 21 +++++++++++++++++++ .../Storage/MockArraySessionStorageTest.php | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Session.php b/src/Symfony/Component/HttpFoundation/Session/Session.php index 725b97ea4ec16..8293cf287156e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Session.php +++ b/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -178,7 +178,9 @@ public function getId() */ public function setId($id) { - $this->storage->setId($id); + if ($this->storage->getId() !== $id) { + $this->storage->setId($id); + } } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php index 8e3d55ecbd5dc..acd5513896579 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -70,6 +70,27 @@ public function testSetId() $this->assertEquals('0123456789abcdef', $this->session->getId()); } + public function testSetIdAfterStart() + { + $this->session->start(); + $id = $this->session->getId(); + + $e = null; + try { + $this->session->setId($id); + } catch (\Exception $e) { + } + + $this->assertNull($e); + + try { + $this->session->setId('different'); + } catch (\Exception $e) { + } + + $this->assertInstanceOf('\LogicException', $e); + } + public function testSetName() { $this->assertEquals('MOCKSESSID', $this->session->getName()); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php index 0c182e0b0bf57..893e120ce166e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -48,7 +48,7 @@ protected function setUp() $this->data = array( $this->attributes->getStorageKey() => array('foo' => 'bar'), $this->flashes->getStorageKey() => array('notice' => 'hello'), - ); + ); $this->storage = new MockArraySessionStorage(); $this->storage->registerBag($this->flashes); From 76c2de0317c22cd987088a4ed43304fc5702773d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 21 Sep 2018 14:44:50 +0200 Subject: [PATCH 43/55] Fix CS --- .../UndefinedMethodFatalErrorHandlerTest.php | 8 +- .../Component/DomCrawler/Tests/FormTest.php | 12 +- .../Finder/Tests/Iterator/MockSplFileInfo.php | 12 +- .../Tests/Encoder/XmlEncoderTest.php | 10 +- .../TranslationDataCollectorTest.php | 126 +++++++++--------- .../Tests/DataCollectorTranslatorTest.php | 70 +++++----- 6 files changed, 119 insertions(+), 119 deletions(-) diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php index 739e5b2b15b7d..a2647f57f201a 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -64,10 +64,10 @@ public function provideUndefinedMethodData() ), array( array( - 'type' => 1, - 'message' => 'Call to undefined method class@anonymous::test()', - 'file' => '/home/possum/work/symfony/test.php', - 'line' => 11, + 'type' => 1, + 'message' => 'Call to undefined method class@anonymous::test()', + 'file' => '/home/possum/work/symfony/test.php', + 'line' => 11, ), 'Attempted to call an undefined method named "test" of class "class@anonymous".', ), diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 6303323223f9a..02d2ebe593b08 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -936,12 +936,12 @@ public function testgetPhpValuesWithEmptyTextarea() { $dom = new \DOMDocument(); $dom->loadHTML(' - -
- - - - '); + +
+ + + ' + ); $nodes = $dom->getElementsByTagName('form'); $form = new Form($nodes->item(0), 'http://example.com'); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php index 36e6528d019b9..a5ac93a46c82f 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php @@ -29,12 +29,12 @@ public function __construct($param) parent::__construct($param); } elseif (\is_array($param)) { $defaults = array( - 'name' => 'file.txt', - 'contents' => null, - 'mode' => null, - 'type' => null, - 'relativePath' => null, - 'relativePathname' => null, + 'name' => 'file.txt', + 'contents' => null, + 'mode' => null, + 'type' => null, + 'relativePath' => null, + 'relativePathname' => null, ); $defaults = array_merge($defaults, $param); parent::__construct($defaults['name']); diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index 2ed89868e7405..4372c501c1cf8 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -167,8 +167,8 @@ public function testContext() public function testEncodeScalarRootAttributes() { $array = array( - '#' => 'Paul', - '@gender' => 'm', + '#' => 'Paul', + '@gender' => 'm', ); $expected = ''."\n". @@ -180,8 +180,8 @@ public function testEncodeScalarRootAttributes() public function testEncodeRootAttributes() { $array = array( - 'firstname' => 'Paul', - '@gender' => 'm', + 'firstname' => 'Paul', + '@gender' => 'm', ); $expected = ''."\n". @@ -193,7 +193,7 @@ public function testEncodeRootAttributes() public function testEncodeCdataWrapping() { $array = array( - 'firstname' => 'Paul ', + 'firstname' => 'Paul ', ); $expected = ''."\n". diff --git a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php index 6303125b83f37..4c513c24f9bd7 100644 --- a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php +++ b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -42,85 +42,85 @@ public function testCollect() { $collectedMessages = array( array( - 'id' => 'foo', - 'translation' => 'foo (en)', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_DEFINED, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, ), array( - 'id' => 'bar', - 'translation' => 'bar (fr)', - 'locale' => 'fr', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, ), array( - 'id' => 'choice', - 'translation' => 'choice', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 3), - 'transChoiceNumber' => 3, + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, ), array( - 'id' => 'choice', - 'translation' => 'choice', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 3), - 'transChoiceNumber' => 3, + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, ), array( - 'id' => 'choice', - 'translation' => 'choice', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), - 'transChoiceNumber' => 4, + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), + 'transChoiceNumber' => 4, ), ); $expectedMessages = array( array( - 'id' => 'foo', - 'translation' => 'foo (en)', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_DEFINED, - 'count' => 1, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, ), array( - 'id' => 'bar', - 'translation' => 'bar (fr)', - 'locale' => 'fr', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'count' => 1, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, ), array( - 'id' => 'choice', - 'translation' => 'choice', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'count' => 3, - 'parameters' => array( - array('%count%' => 3), - array('%count%' => 3), - array('%count%' => 4, '%foo%' => 'bar'), - ), - 'transChoiceNumber' => 3, + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'count' => 3, + 'parameters' => array( + array('%count%' => 3), + array('%count%' => 3), + array('%count%' => 4, '%foo%' => 'bar'), + ), + 'transChoiceNumber' => 3, ), ); diff --git a/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php b/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php index cc196223ccfa8..1cdd33b395f0d 100644 --- a/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php @@ -31,49 +31,49 @@ public function testCollectMessages() $expectedMessages = array(); $expectedMessages[] = array( - 'id' => 'foo', - 'translation' => 'foo (en)', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_DEFINED, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, ); $expectedMessages[] = array( - 'id' => 'bar', - 'translation' => 'bar (fr)', - 'locale' => 'fr', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, ); $expectedMessages[] = array( - 'id' => 'choice', - 'translation' => 'choice', - 'locale' => 'en', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_MISSING, - 'parameters' => array(), - 'transChoiceNumber' => 0, + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array(), + 'transChoiceNumber' => 0, ); $expectedMessages[] = array( - 'id' => 'bar_ru', - 'translation' => 'bar (ru)', - 'locale' => 'ru', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array(), - 'transChoiceNumber' => null, + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, ); $expectedMessages[] = array( - 'id' => 'bar_ru', - 'translation' => 'bar (ru)', - 'locale' => 'ru', - 'domain' => 'messages', - 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, - 'parameters' => array('foo' => 'bar'), - 'transChoiceNumber' => null, + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array('foo' => 'bar'), + 'transChoiceNumber' => null, ); $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); From 4225f36b8646e2b503b2e9c00c17c0bdb08f413f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 21 Sep 2018 15:59:15 +0200 Subject: [PATCH 44/55] parse numbers terminated with decimal separator --- src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php | 2 +- .../Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index e63e3c434926a..ea1eb1b7a337c 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -516,7 +516,7 @@ public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0) $groupSep = $this->getAttribute(self::GROUPING_USED) ? ',' : ''; // Any string before the numeric value causes error in the parsing - if (preg_match("/^-?(?:\.\d++|([\d{$groupSep}]++)(?:\.\d++)?)/", $value, $matches)) { + if (preg_match("/^-?(?:\.\d++|([\d{$groupSep}]++)(?:\.\d*+)?)/", $value, $matches)) { $value = $matches[0]; $position = \strlen($value); if ($error = $groupSep && isset($matches[1]) && !preg_match('/^\d{1,3}+(?:(?:,\d{3})++|\d*+)$/', $matches[1])) { diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php index 0e10f7d374a0c..ece5ad5625791 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -654,6 +654,7 @@ public function parseProvider() array('-123,4567', false, '->parse() does not parse when invalid grouping used.', 9), array('-123,,456', false, '->parse() does not parse when invalid grouping used.', 4), array('-123,,456', -123.0, '->parse() parses when grouping is disabled.', 4, false), + array('239.', 239.0, '->parse() parses when string ends with decimal separator.', 4, false), ); } From a67ff2a2d6ad9deb33a23ee8327632417adeac56 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 21 Sep 2018 21:54:01 +0200 Subject: [PATCH 45/55] [Console] Fixed boxed table style with colspan --- .../Component/Console/Helper/Table.php | 4 +-- .../Console/Tests/Helper/TableTest.php | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index f3fc3b0b0a73e..b5c0e91a3ccb0 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -570,7 +570,7 @@ private function calculateColumnsWidth($rows) $lengths[] = $this->getCellWidth($row, $column); } - $this->columnWidths[$column] = max($lengths) + \strlen($this->style->getCellRowContentFormat()) - 2; + $this->columnWidths[$column] = max($lengths) + Helper::strlen($this->style->getCellRowContentFormat()) - 2; } } @@ -581,7 +581,7 @@ private function calculateColumnsWidth($rows) */ private function getColumnSeparatorWidth() { - return \strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + return Helper::strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); } /** diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 58c620953e051..1dadc27258c0b 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -745,6 +745,42 @@ public function testGetStyleDefinition() Table::getStyleDefinition('absent'); } + public function testBoxedStyleWithColspan() + { + $boxed = new TableStyle(); + $boxed + ->setHorizontalBorderChar('─') + ->setVerticalBorderChar('│') + ->setCrossingChar('┼') + ; + + $table = new Table($output = $this->getOutputStream()); + $table->setStyle($boxed); + $table + ->setHeaders(array('ISBN', 'Title', 'Author')) + ->setRows(array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + new TableSeparator(), + array(new TableCell('This value spans 3 columns.', array('colspan' => 3))), + )) + ; + $table->render(); + + $expected = + <<
assertSame($expected, $this->getOutputContent($output)); + } + protected function getOutputStream($decorated = false) { return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, $decorated); From b90a3f12a1407f20ee625443350bb929da6de8ce Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Fri, 21 Sep 2018 19:07:33 +0200 Subject: [PATCH 46/55] [Console] Send the right exit code to console.terminate listeners --- src/Symfony/Component/Console/Application.php | 35 +++++++++---- .../Console/Tests/ApplicationTest.php | 50 +++++++++++++++++++ 2 files changed, 75 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index d1a21049eea9b..240a9ab7a8a92 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -129,15 +129,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null $this->renderException($e, $output); } - $exitCode = $e->getCode(); - if (is_numeric($exitCode)) { - $exitCode = (int) $exitCode; - if (0 === $exitCode) { - $exitCode = 1; - } - } else { - $exitCode = 1; - } + $exitCode = $this->getExitCodeForThrowable($e); } if ($this->autoExit) { @@ -873,7 +865,8 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI if ($x !== $event->getException()) { $e = $event->getException(); } - $exitCode = $e->getCode(); + + $exitCode = $this->getExitCodeForThrowable($e); } $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); @@ -1148,4 +1141,26 @@ private function init() $this->add($command); } } + + /** + * Type hint omitted to be PHP5 compatible. + * + * @param \Exception|\Throwable $throwable + * + * @return int + */ + private function getExitCodeForThrowable($throwable) + { + $exitCode = $throwable->getCode(); + if (is_numeric($exitCode)) { + $exitCode = (int) $exitCode; + if (0 === $exitCode) { + $exitCode = 1; + } + } else { + $exitCode = 1; + } + + return $exitCode; + } } diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 1664302dcf985..8eb01d9f59f86 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -774,6 +774,31 @@ public function testRunReturnsIntegerExitCode() $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); } + public function testRunDispatchesIntegerExitCode() + { + $passedRightValue = false; + + // We can assume here that some other test asserts that the event is dispatched at all + $dispatcher = new EventDispatcher(); + $self = $this; + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) { + $passedRightValue = (4 === $event->getExitCode()); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { + throw new \Exception('', 4); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'test')); + + $this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event'); + } + public function testRunReturnsExitCodeOneForExceptionCodeZero() { $exception = new \Exception('', 0); @@ -789,6 +814,31 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero() $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); } + public function testRunDispatchesExitCodeOneForExceptionCodeZero() + { + $passedRightValue = false; + + // We can assume here that some other test asserts that the event is dispatched at all + $dispatcher = new EventDispatcher(); + $self = $this; + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) { + $passedRightValue = (1 === $event->getExitCode()); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + + $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { + throw new \Exception(); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'test')); + + $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event'); + } + /** * @expectedException \LogicException * @expectedExceptionMessage An option with shortcut "e" already exists. From 41eb1914f6cd9feff78b180e1102b24d8b716ee5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 23 Sep 2018 16:32:19 +0200 Subject: [PATCH 47/55] [HttpFoundation][Security] forward locale and format to subrequests --- .../Component/HttpFoundation/Request.php | 2 +- .../Fragment/InlineFragmentRenderer.php | 7 +++++++ .../Fragment/InlineFragmentRendererTest.php | 20 +++++++++++++++++++ .../Component/Security/Http/HttpUtils.php | 7 +++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index a29037279a698..85b5a53f4fb10 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1367,7 +1367,7 @@ public function setFormat($format, $mimeTypes) * * _format request parameter * * $default * - * @param string $default The default format + * @param string|null $default The default format * * @return string The request format */ diff --git a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php index 712248578d0a7..13fc3356242e7 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -122,6 +122,13 @@ protected function createSubRequest($uri, Request $request) $subRequest->setSession($session); } + if ($request->get('_format')) { + $subRequest->attributes->set('_format', $request->get('_format')); + } + if ($request->getDefaultLocale() !== $request->getLocale()) { + $subRequest->setLocale($request->getLocale()); + } + return $subRequest; } diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php index 197a720439253..6cd2bf03ca16d 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php @@ -175,6 +175,26 @@ public function testExceptionInSubRequestsDoesNotMangleOutputBuffers() $this->assertEquals('Foo', ob_get_clean()); } + public function testLocaleAndFormatAreIsKeptInSubrequest() + { + $expectedSubRequest = Request::create('/'); + $expectedSubRequest->attributes->set('_format', 'foo'); + $expectedSubRequest->setLocale('fr'); + if (Request::getTrustedHeaderName(Request::HEADER_CLIENT_IP)) { + $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + } + $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); + + $request = Request::create('/'); + $request->attributes->set('_format', 'foo'); + $request->setLocale('fr'); + $strategy->render('/', $request); + } + public function testESIHeaderIsKeptInSubrequest() { $expectedSubRequest = Request::create('/'); diff --git a/src/Symfony/Component/Security/Http/HttpUtils.php b/src/Symfony/Component/Security/Http/HttpUtils.php index 60498231a614b..b0377bb44f9b0 100644 --- a/src/Symfony/Component/Security/Http/HttpUtils.php +++ b/src/Symfony/Component/Security/Http/HttpUtils.php @@ -91,6 +91,13 @@ public function createRequest(Request $request, $path) $newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME)); } + if ($request->get('_format')) { + $newRequest->attributes->set('_format', $request->get('_format')); + } + if ($request->getDefaultLocale() !== $request->getLocale()) { + $newRequest->setLocale($request->getLocale()); + } + return $newRequest; } From 3033aaf6fb035b35646d5c279d818d1333470c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 23 Sep 2018 18:44:27 +0200 Subject: [PATCH 48/55] [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc --- src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php index 5708ef716df7b..9692a138c3bdf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php @@ -23,7 +23,7 @@ abstract class WebTestCase extends KernelTestCase /** * Creates a Client. * - * @param array $options An array of options to pass to the createKernel class + * @param array $options An array of options to pass to the createKernel method * @param array $server An array of server parameters * * @return Client A Client instance From ad500e74ecfff4c30524ee46e4bf172b28477687 Mon Sep 17 00:00:00 2001 From: Laurent Bassin Date: Mon, 24 Sep 2018 10:04:37 +0200 Subject: [PATCH 49/55] [Filesystem] Skip tests on readable file when run with root user --- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 8 ++++++++ .../Component/Filesystem/Tests/LockHandlerTest.php | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 20cbdfc123693..d24d9675028f0 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -50,6 +50,10 @@ public function testCopyUnreadableFileFails() $this->markTestSkipped('This test cannot run on Windows.'); } + if (!getenv('USER') || 'root' === getenv('USER')) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file'; $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; @@ -124,6 +128,10 @@ public function testCopyWithOverrideWithReadOnlyTargetFails() $this->markTestSkipped('This test cannot run on Windows.'); } + if (!getenv('USER') || 'root' === getenv('USER')) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file'; $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; diff --git a/src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php b/src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php index 6390b1f1e6e0a..635570cefd9b8 100644 --- a/src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php +++ b/src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php @@ -49,6 +49,10 @@ public function testErrorHandlingInLockIfLockPathBecomesUnwritable() $this->markTestSkipped('This test cannot run on Windows.'); } + if (!getenv('USER') || 'root' === getenv('USER')) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + $lockPath = sys_get_temp_dir().'/'.uniqid('', true); $e = null; $wrongMessage = null; From 310870a497f8fbf2563f3fb200bcc8e57dcc4e26 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 24 Sep 2018 10:42:32 +0200 Subject: [PATCH 50/55] [WebProfilerBundle] added a note in the README --- src/Symfony/Bundle/WebProfilerBundle/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/README.md b/src/Symfony/Bundle/WebProfilerBundle/README.md index 03780d5e5904e..48e6075636519 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/README.md +++ b/src/Symfony/Bundle/WebProfilerBundle/README.md @@ -1,6 +1,12 @@ WebProfilerBundle ================= +The Web profiler bundle is a **development tool** that gives detailed +information about the execution of any request. + +**Never** enable it on production servers as it will lead to major security +vulnerabilities in your project. + Resources --------- From 179a081ee38bd134cf3eea89fa71ca2e785f1e52 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 25 Sep 2018 09:16:06 +0200 Subject: [PATCH 51/55] improve docblocks around group sequences --- .../Validator/Constraints/FormValidator.php | 8 +++--- .../GroupSequenceProviderInterface.php | 4 ++- .../Validator/Mapping/ClassMetadata.php | 2 +- .../ContextualValidatorInterface.php | 27 ++++++++----------- .../RecursiveContextualValidator.php | 12 ++++----- .../Validator/ValidatorInterface.php | 27 ++++++++----------- 6 files changed, 36 insertions(+), 44 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php index 21551f36bbde3..fc6f2abe51679 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php @@ -211,7 +211,7 @@ private static function allowDataWalking(FormInterface $form) /** * Returns the validation groups of the given form. * - * @return array The validation groups + * @return string|GroupSequence|(string|GroupSequence)[] The validation groups */ private static function getValidationGroups(FormInterface $form) { @@ -246,10 +246,10 @@ private static function getValidationGroups(FormInterface $form) /** * Post-processes the validation groups option for a given form. * - * @param array|callable $groups The validation groups - * @param FormInterface $form The validated form + * @param string|GroupSequence|(string|GroupSequence)[]|callable $groups The validation groups + * @param FormInterface $form The validated form * - * @return array The validation groups + * @return (string|GroupSequence)[] The validation groups */ private static function resolveValidationGroups($groups, FormInterface $form) { diff --git a/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php b/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php index 62e8a5ed0d4f7..5894397da4deb 100644 --- a/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php +++ b/src/Symfony/Component/Validator/GroupSequenceProviderInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +use Symfony\Component\Validator\Constraints\GroupSequence; + /** * Defines the interface for a group sequence provider. */ @@ -20,7 +22,7 @@ interface GroupSequenceProviderInterface * Returns which validation groups should be used for a certain state * of the object. * - * @return array An array of validation groups + * @return string[]|GroupSequence An array of validation groups */ public function getGroupSequence(); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 26dba4b725010..c3a6544ed47eb 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -485,7 +485,7 @@ public function getConstrainedProperties() /** * Sets the default group sequence for this class. * - * @param array $groupSequence An array of group names + * @param string[]|GroupSequence $groupSequence An array of group names * * @return $this * diff --git a/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php b/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php index 1cc96c834e6f6..c8b545b54b4a6 100644 --- a/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php +++ b/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintViolationListInterface; /** @@ -39,12 +40,9 @@ public function atPath($path); * If no constraint is passed, the constraint * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. * - * @param mixed $value The value to validate - * @param Constraint|Constraint[] $constraints The constraint(s) to validate - * against - * @param array|null $groups The validation groups to - * validate. If none is given, - * "Default" is assumed + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return $this */ @@ -54,10 +52,9 @@ public function validate($value, $constraints = null, $groups = null); * Validates a property of an object against the constraints specified * for this property. * - * @param object $object The object - * @param string $propertyName The name of the validated property - * @param array|null $groups The validation groups to validate. If - * none is given, "Default" is assumed + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return $this */ @@ -67,12 +64,10 @@ public function validateProperty($object, $propertyName, $groups = null); * Validates a value against the constraints specified for an object's * property. * - * @param object|string $objectOrClass The object or its class name - * @param string $propertyName The name of the property - * @param mixed $value The value to validate against the - * property's constraints - * @param array|null $groups The validation groups to validate. If - * none is given, "Default" is assumed + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the property's constraints + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return $this */ diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 033900d103828..14456d8c9114c 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -275,9 +275,9 @@ public function getViolations() /** * Normalizes the given group or list of groups to an array. * - * @param mixed $groups The groups to normalize + * @param string|GroupSequence|(string|GroupSequence)[] $groups The groups to normalize * - * @return array A group array + * @return (string|GroupSequence)[] A group array */ protected function normalizeGroups($groups) { @@ -298,7 +298,7 @@ protected function normalizeGroups($groups) * * @param object $object The object to cascade * @param string $propertyPath The current property path - * @param string[] $groups The validated groups + * @param (string|GroupSequence)[] $groups The validated groups * @param int $traversalStrategy The strategy for traversing the * cascaded object * @param ExecutionContextInterface $context The current execution context @@ -361,7 +361,7 @@ private function validateObject($object, $propertyPath, array $groups, $traversa * * @param iterable $collection The collection * @param string $propertyPath The current property path - * @param string[] $groups The validated groups + * @param (string|GroupSequence)[] $groups The validated groups * @param bool $stopRecursion Whether to disable * recursive iteration. For * backwards compatibility @@ -441,7 +441,7 @@ private function validateEachObjectIn($collection, $propertyPath, array $groups, * the object * @param string $propertyPath The property path leading * to the object - * @param string[] $groups The groups in which the + * @param (string|GroupSequence)[] $groups The groups in which the * object should be validated * @param string[]|null $cascadedGroups The groups in which * cascaded objects should @@ -630,7 +630,7 @@ private function validateClassNode($object, $cacheKey, ClassMetadataInterface $m * value * @param string $propertyPath The property path leading * to the value - * @param string[] $groups The groups in which the + * @param (string|GroupSequence)[] $groups The groups in which the * value should be validated * @param string[]|null $cascadedGroups The groups in which * cascaded objects should diff --git a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php index 5bac2e88987f6..78157465ab5ce 100644 --- a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; @@ -29,12 +30,9 @@ interface ValidatorInterface extends MetadataFactoryInterface * If no constraint is passed, the constraint * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. * - * @param mixed $value The value to validate - * @param Constraint|Constraint[] $constraints The constraint(s) to validate - * against - * @param array|null $groups The validation groups to - * validate. If none is given, - * "Default" is assumed + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation @@ -46,10 +44,9 @@ public function validate($value, $constraints = null, $groups = null); * Validates a property of an object against the constraints specified * for this property. * - * @param object $object The object - * @param string $propertyName The name of the validated property - * @param array|null $groups The validation groups to validate. If - * none is given, "Default" is assumed + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation @@ -61,12 +58,10 @@ public function validateProperty($object, $propertyName, $groups = null); * Validates a value against the constraints specified for an object's * property. * - * @param object|string $objectOrClass The object or its class name - * @param string $propertyName The name of the property - * @param mixed $value The value to validate against the - * property's constraints - * @param array|null $groups The validation groups to validate. If - * none is given, "Default" is assumed + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the property's constraints + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed * * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation From 42c5a91ddfd1a4d9c8e0d613166a6df30849dea1 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:33:07 +0200 Subject: [PATCH 52/55] removed useless phpdoc --- src/Symfony/Component/Console/Application.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 240a9ab7a8a92..fe62e8d86060b 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -1143,8 +1143,6 @@ private function init() } /** - * Type hint omitted to be PHP5 compatible. - * * @param \Exception|\Throwable $throwable * * @return int From 25f53d7133d93fb5252752a811e0c2b90ef7cd07 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:51:35 +0200 Subject: [PATCH 53/55] updated CHANGELOG for 2.8.46 --- CHANGELOG-2.8.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 7921dc3bcfa9b..1e7eae64e3ea0 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,27 @@ in 2.8 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.8.0...v2.8.1 +* 2.8.46 (2018-09-30) + + * bug #28376 [TwigBundle] Fixed caching of templates in src/Resources//views on cache warmup (yceruto) + * bug #28565 [HttpFoundation][Security] forward locale and format to subrequests (nicolas-grekas) + * bug #28545 [Console] Send the right exit code to console.terminate listeners (mpdude) + * bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh) + * bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh) + * bug #28548 [Console] Fixed boxed table style with colspan (ro0NL) + * bug #28433 [HttpFoundation] Allow reuse of Session between requests if ID did not change (tgalopin) + * bug #28508 [Form] forward false label option to nested types (xabbuh) + * bug #28464 [Form] forward the invalid_message option in date types (xabbuh) + * bug #28499 [Ldap] Use shut up operator on connection errors at ldap_start_tls (Andras Debreczeni) + * bug #28372 [Form] Fix DateTimeType html5 input format (franzwilding, mcfedr) + * bug #28396 [Intl] Blacklist Eurozone and United Nations in Region Data Generator (gregurco) + * bug #28393 [Console] fixed corrupt error output for unknown multibyte short option (downace) + * bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr) + * bug #28377 fix fopen flags (SpacePossum) + * bug #27970 [FileValidator] Format file size in validation message according to binaryFormat option (jfredon) + * bug #28029 [TwigBundle] remove cache warmers when Twig cache is disabled (xabbuh) + * bug #28344 [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients (nicolas-grekas) + * 2.8.45 (2018-08-27) * bug #28278 [HttpFoundation] Fix unprepared BinaryFileResponse sends empty file (wackymole) From d506102802c9b104ec5ba613898f8732b26a14de Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:51:44 +0200 Subject: [PATCH 54/55] updated VERSION for 2.8.46 --- 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 4d5eb6a144eaa..b6db6ee97cd89 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.46-DEV'; + const VERSION = '2.8.46'; const VERSION_ID = 20846; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; const RELEASE_VERSION = 46; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From e457b294e0fcc09ed97eb8123bef8e40d7716012 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:52:49 +0200 Subject: [PATCH 55/55] update CONTRIBUTORS for 2.8.46 --- CONTRIBUTORS.md | 79 +++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 629d8b80c98a3..66d9da5983a99 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,8 +12,8 @@ Symfony is the result of the work of many people who made the code better - Christophe Coevoet (stof) - Jordi Boggiano (seldaek) - Victor Berchet (victor) - - Kévin Dunglas (dunglas) - Robin Chalas (chalas_r) + - Kévin Dunglas (dunglas) - Johannes S (johannes) - Jakub Zalas (jakubzalas) - Maxime Steinhausser (ogizanagi) @@ -23,54 +23,54 @@ Symfony is the result of the work of many people who made the code better - Grégoire Pineau (lyrixx) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) - - Romain Neutron (romain) - Roland Franssen (ro0) + - Romain Neutron (romain) - Pascal Borreli (pborreli) - Wouter De Jong (wouterj) - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) + - Samuel ROZE (sroze) - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - - Samuel ROZE (sroze) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) - Igor Wiedler (igorw) - Jules Pietri (heah) - Eriksen Costa (eriksencosta) - - Guilhem Niot (energetick) - Yonel Ceruto (yonelceruto) + - Guilhem Niot (energetick) - Sarah Khalil (saro0h) - Jonathan Wage (jwage) - Hamza Amrouche (simperfit) - Diego Saint Esteben (dosten) - Iltar van der Berg (kjarli) + - Tobias Nyholm (tobias) - Alexandre Salomé (alexandresalome) - William Durand (couac) - ornicar - Francis Besset (francisbesset) + - Dany Maillard (maidmaid) - stealth35 ‏ (stealth35) - Alexander Mols (asm89) - Bulat Shakirzyanov (avalanche123) - - Dany Maillard (maidmaid) - - Peter Rehm (rpet) - Matthias Pigulla (mpdude) + - Peter Rehm (rpet) - Saša Stamenković (umpirsky) - - Kevin Bond (kbond) - - Tobias Nyholm (tobias) - Pierre du Plessis (pierredup) + - Kevin Bond (kbond) - Henrik Bjørnskov (henrikbjorn) - Miha Vrhovnik + - Jérémy DERUSSÉ (jderusse) - Diego Saint Esteben (dii3g0) - Alexander M. Turek (derrabus) - - Jérémy DERUSSÉ (jderusse) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - Florin Patan (florinpatan) - Gábor Egyed (1ed) - Mathieu Piot (mpiot) - - Michel Weimerskirch (mweimerskirch) - Titouan Galopin (tgalopin) + - Michel Weimerskirch (mweimerskirch) - Andrej Hudec (pulzarraider) - Eric Clemmons (ericclemmons) - Jáchym Toušek (enumag) @@ -78,11 +78,11 @@ Symfony is the result of the work of many people who made the code better - David Maicher (dmaicher) - Konstantin Myakshin (koc) - Christian Raue + - Issei Murasawa (issei_m) - Arnout Boks (aboks) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Issei Murasawa (issei_m) - Douglas Greenshields (shieldo) - Vladimir Reznichenko (kalessil) - Lee McDermott @@ -92,6 +92,7 @@ Symfony is the result of the work of many people who made the code better - Daniel Holmes (dholmes) - Dariusz Ruminski - Toni Uebernickel (havvg) + - Grégoire Paris (greg0ire) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) - Jérôme Tamarelle (gromnan) @@ -99,14 +100,13 @@ Symfony is the result of the work of many people who made the code better - Fran Moreno (franmomu) - Antoine Hérault (herzult) - Paráda József (paradajozsef) - - Grégoire Paris (greg0ire) - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER - Michal Piotrowski (eventhorizon) + - gadelat (gadelat) - Tim Nagel (merk) - Brice BERNARD (brikou) - Valentin Udaltsov (vudaltsov) - - gadelat (gadelat) - Baptiste Clavié (talus) - marc.weistroff - lenar @@ -121,8 +121,8 @@ Symfony is the result of the work of many people who made the code better - Joshua Thijssen - David Buchmann (dbu) - excelwebzone - - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) + - Fabien Pennequin (fabienpennequin) - Eric GELOEN (gelo) - Sebastiaan Stok (sstok) - Lars Strojny (lstrojny) @@ -132,6 +132,7 @@ Symfony is the result of the work of many people who made the code better - Théo FIDRY (theofidry) - Robert Schönthal (digitalkaoz) - Florian Lonqueu-Brochard (florianlb) + - Chris Wilkinson (thewilkybarkid) - Stefano Sala (stefano.sala) - Jérôme Vasseur (jvasseur) - Evgeniy (ewgraf) @@ -142,7 +143,6 @@ Symfony is the result of the work of many people who made the code better - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) - - Chris Wilkinson (thewilkybarkid) - Arnaud Kleinpeter (nanocom) - Jannik Zschiesche (apfelbox) - Guilherme Blanco (guilhermeblanco) @@ -168,10 +168,12 @@ Symfony is the result of the work of many people who made the code better - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) - Dawid Nowak + - Gabriel Ostrolucký - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba - GDIBass + - SpacePossum - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) - James Halsall (jaitsu) - Matthieu Napoli (mnapoli) @@ -185,17 +187,17 @@ Symfony is the result of the work of many people who made the code better - Dorian Villet (gnutix) - Sergey Linnik (linniksa) - Richard Miller (mr_r_miller) - - Gabriel Ostrolucký - Mario A. Alvarez Garcia (nomack84) - Dennis Benkert (denderello) - DQNEO - - SpacePossum - Benjamin Dulau (dbenjamin) + - Florent Mata (fmata) - Mathieu Lemoine (lemoinem) - Thomas Calvet (fancyweb) - Christian Schmidt - Andreas Hucks (meandmymonkey) - Noel Guilbert (noel) + - Yanick Witschi (toflar) - Marek Štípek (maryo) - Stepan Anchugov (kix) - bronze1man @@ -222,7 +224,6 @@ Symfony is the result of the work of many people who made the code better - Michele Orselli (orso) - Tom Van Looy (tvlooy) - Sven Paulus (subsven) - - Yanick Witschi (toflar) - Rui Marinho (ruimarinho) - Alessandro Chitolina - Eugene Wissner @@ -233,6 +234,7 @@ Symfony is the result of the work of many people who made the code better - Nikolay Labinskiy (e-moe) - Marcel Beerta (mazen) - Albert Casademont (acasademont) + - Pavel Batanov (scaytrase) - Loïc Faugeron - Hidde Wieringa (hiddewie) - Marco Pivetta (ocramius) @@ -253,7 +255,6 @@ Symfony is the result of the work of many people who made the code better - Ruben Gonzalez (rubenrua) - Adam Prager (padam87) - Benoît Burnichon (bburnichon) - - Florent Mata (fmata) - Roman Marintšenko (inori) - Xavier Montaña Carreras (xmontana) - Mickaël Andrieu (mickaelandrieu) @@ -284,12 +285,12 @@ Symfony is the result of the work of many people who made the code better - Diego Agulló (aeoris) - Andreas Schempp (aschempp) - jdhoek - - Pavel Batanov (scaytrase) - Massimiliano Arione (garak) - Bob den Otter (bopp) - Nikita Konstantinov - Wodor Wodorski - Thomas Lallement (raziel057) + - mcfedr (mcfedr) - Giorgio Premi - Christian Schmidt - Beau Simensen (simensen) @@ -313,6 +314,7 @@ Symfony is the result of the work of many people who made the code better - Gary PEGEOT (gary-p) - Manuel Kiessling (manuelkiessling) - Atsuhiro KUBO (iteman) + - rudy onfroy (ronfroy) - Andrew Moore (finewolf) - Bertrand Zuchuat (garfield-fr) - Gabor Toth (tgabi333) @@ -435,6 +437,7 @@ Symfony is the result of the work of many people who made the code better - Jan Schumann - Niklas Fiekas - Markus Bachmann (baachi) + - Jan Schädlich - lancergr - Zan Baldwin - Mihai Stancu @@ -453,6 +456,7 @@ Symfony is the result of the work of many people who made the code better - Boris Vujicic (boris.vujicic) - Chris Sedlmayr (catchamonkey) - Mateusz Sip (mateusz_sip) + - Remon van de Kamp - Seb Koelen - Christoph Mewes (xrstf) - Vitaliy Tverdokhlib (vitaliytv) @@ -471,6 +475,7 @@ Symfony is the result of the work of many people who made the code better - Zander Baldwin - Adam Harvey - Anton Bakai + - Rhodri Pugh (rodnaph) - Alex Bakhturin - insekticid - Alexander Obuhovich (aik099) @@ -501,12 +506,14 @@ Symfony is the result of the work of many people who made the code better - Roy Van Ginneken (rvanginneken) - ondrowan - Barry vd. Heuvel (barryvdh) + - Sébastien Alfaiate (seb33300) - Evan S Kaufman (evanskaufman) - mcben - Jérôme Vieilledent (lolautruche) - Maks Slesarenko - Filip Procházka (fprochazka) - mmoreram + - Smaine Milianni (ismail1432) - Markus Lanthaler (lanthaler) - Remi Collet - Vicent Soria Durá (vicentgodella) @@ -522,6 +529,7 @@ Symfony is the result of the work of many people who made the code better - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) + - George Mponos (gmponos) - Scott Arciszewski - Xavier HAUSHERR - Norbert Orzechowicz (norzechowicz) @@ -594,6 +602,7 @@ Symfony is the result of the work of many people who made the code better - Nahuel Cuesta (ncuesta) - Chris Boden (cboden) - Christophe Villeger (seragan) + - Julien Fredon - Bob van de Vijver (bobvandevijver) - Stefan Gehrig (sgehrig) - Hany el-Kerdany @@ -607,6 +616,7 @@ Symfony is the result of the work of many people who made the code better - Javier López (loalf) - Reinier Kip - Geoffrey Brier (geoffrey-brier) + - Vlad Gregurco (vgregurco) - Vladimir Tsykun - Dustin Dobervich (dustin10) - dantleech @@ -618,7 +628,6 @@ Symfony is the result of the work of many people who made the code better - Kamil Kokot (pamil) - Max Grigorian (maxakawizard) - DerManoMann - - mcfedr (mcfedr) - Rostyslav Kinash - Maciej Malarz (malarzm) - Pascal Luna (skalpa) @@ -697,7 +706,6 @@ Symfony is the result of the work of many people who made the code better - Indra Gunawan (guind) - Peter Ward - Davide Borsatto (davide.borsatto) - - Rhodri Pugh (rodnaph) - Julien DIDIER (juliendidier) - Dominik Ritter (dritter) - Sebastian Grodzicki (sgrodzicki) @@ -733,13 +741,11 @@ Symfony is the result of the work of many people who made the code better - Nykopol (nykopol) - Jordan Deitch - Casper Valdemar Poulsen - - Remon van de Kamp - Josiah (josiah) - Joschi Kuphal - John Bohn (jbohn) - Marc Morera (mmoreram) - Saif Eddin Gmati (azjezz) - - Smaine Milianni (ismail1432) - Andrew Hilobok (hilobok) - Noah Heck (myesain) - Christian Soronellas (theunic) @@ -752,7 +758,6 @@ Symfony is the result of the work of many people who made the code better - Benoit Lévêque (benoit_leveque) - Jeroen Fiege (fieg) - Krzysiek Łabuś - - George Mponos (gmponos) - Xavier Lacot (xavier) - possum - Denis Zunke (donalberto) @@ -914,14 +919,16 @@ Symfony is the result of the work of many people who made the code better - Pieter - Michael Tibben - Billie Thompson + - Ganesh Chandrasekaran - Sander Marechal + - Franz Wilding (killerpoke) - ProgMiner - Oleg Golovakhin (doc_tr) - Icode4Food (icode4food) - Radosław Benkel + - kevin.nadin - jean pasqualini (darkilliant) - Ross Motley (rossmotley) - - Julien Fredon - ttomor - Mei Gwilym (meigwilym) - Michael H. Arieli (excelwebzone) @@ -932,6 +939,8 @@ Symfony is the result of the work of many people who made the code better - Sander Coolen (scoolen) - Nicolas Le Goff (nlegoff) - Ben Oman + - Guilhem N (guilhemn) + - Chris de Kok - Andreas Kleemann - Manuele Menozzi - Anton Babenko (antonbabenko) @@ -1047,8 +1056,10 @@ Symfony is the result of the work of many people who made the code better - Alexander Cheprasov - Rodrigo Díez Villamuera (rodrigodiez) - e-ivanov + - Roberto Espinoza (respinoza) - Einenlum - Jochen Bayer (jocl) + - Patrick Carlo-Hickman - Alex Bowers - Jeremy Bush - wizhippo @@ -1228,6 +1239,7 @@ Symfony is the result of the work of many people who made the code better - caponica - Matt Daum (daum) - Alberto Pirovano (geezmo) + - Nicolas LEFEVRE (nicoweb) - Pete Mitchell (peterjmit) - Tom Corrigan (tomcorrigan) - Luis Galeas @@ -1273,6 +1285,7 @@ Symfony is the result of the work of many people who made the code better - Jon Gotlin (jongotlin) - Michael Dowling (mtdowling) - Karlos Presumido (oneko) + - Sylvain Fabre (sylfabre) - Thomas Counsell - BilgeXA - r1pp3rj4ck @@ -1318,6 +1331,7 @@ Symfony is the result of the work of many people who made the code better - Andrew (drew) - kor3k kor3k (kor3k) - Stelian Mocanita (stelian) + - Justin (wackymole) - Flavian (2much) - Gautier Deuette - mike @@ -1361,6 +1375,7 @@ Symfony is the result of the work of many people who made the code better - Jody Mickey (jwmickey) - Przemysław Piechota (kibao) - Leonid Terentyev (li0n) + - Martynas Sudintas (martiis) - ryunosuke - zenmate - victoria @@ -1385,7 +1400,6 @@ Symfony is the result of the work of many people who made the code better - Vasily Khayrulin (sirian) - Stefan Koopmanschap (skoop) - Stefan Hüsges (tronsha) - - Vlad Gregurco (vgregurco) - Jake Bishop (yakobeyak) - Dan Blows - Matt Wells @@ -1440,13 +1454,16 @@ Symfony is the result of the work of many people who made the code better - loru88 - Romain Dorgueil - Christopher Parotat + - me_shaon - 蝦米 - Grayson Koonce (breerly) - Karim Cassam Chenaï (ka) + - Maksym Slesarenko (maksym_slesarenko) - Michal Kurzeja (mkurzeja) - Nicolas Bastien (nicolas_bastien) - Denis (yethee) - Andrew Zhilin (zhil) + - Sjors Ottjes - Andy Stanberry - Felix Marezki - Normunds @@ -1458,6 +1475,7 @@ Symfony is the result of the work of many people who made the code better - Pavel.Batanov - avi123 - alsar + - downace - Aarón Nieves Fernández - Mike Meier - Kirill Saksin @@ -1484,7 +1502,6 @@ Symfony is the result of the work of many people who made the code better - Milos Colakovic (project2481) - Rénald Casagraude (rcasagraude) - Robin Duval (robin-duval) - - rudy onfroy (ronfroy) - Grinbergs Reinis (shima5) - Artem Lopata (bumz) - Nicole Cordes @@ -1517,6 +1534,7 @@ Symfony is the result of the work of many people who made the code better - Sam Ward - Walther Lalk - Adam + - Sören Bernstein - devel - taiiiraaa - Trevor Suarez @@ -1597,6 +1615,7 @@ Symfony is the result of the work of many people who made the code better - Marin Nicolae - Alessandro Loffredo - Ian Phillips + - Marco Lipparini - Haritz - Matthieu Prat - Ion Bazan @@ -1741,6 +1760,7 @@ Symfony is the result of the work of many people who made the code better - Antonio Angelino - Matt Fields - Niklas Keller + - Andras Debreczeni - Vladimir Sazhin - Tomas Kmieliauskas - Billie Thompson @@ -1772,6 +1792,7 @@ Symfony is the result of the work of many people who made the code better - n-aleha - Anatol Belski - Şəhriyar İmanov + - Alexis BOYER - Kaipi Yann - Sam Williams - Guillaume Aveline @@ -1897,6 +1918,7 @@ Symfony is the result of the work of many people who made the code better - Arash Tabriziyan (ghost098) - ibasaw (ibasaw) - Vladislav Krupenkin (ideea) + - Ilija Tovilo (ilijatovilo) - Peter Orosz (ill_logical) - Imangazaliev Muhammad (imangazaliev) - j0k (j0k) @@ -1944,7 +1966,6 @@ Symfony is the result of the work of many people who made the code better - Bart Ruysseveldt (ruyss) - Sascha Dens (saschadens) - scourgen hung (scourgen) - - Sébastien Alfaiate (seb33300) - Sebastian Busch (sebu) - Sepehr Lajevardi (sepehr) - André Filipe Gonçalves Neves (seven)