8000 Merge branch '3.3' into 3.4 · symfony/symfony@fedcc91 · GitHub
[go: up one dir, main page]

Skip to content

Commit fedcc91

Browse files
Merge branch '3.3' into 3.4
* 3.3: (23 commits) Tests and fix for issue in array model data in EntityType field with multiple=true [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible removed useless PHPDoc [Form] Fix FormInterface::submit() annotation [PHPUnitBridge] don't remove when set to empty string PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4 HttpCache does not consider ESI resources in HEAD requests Fix translation for "This field was not expected" [Routing] Enhance Route(Collection) docblocks Added improvement for accuracy in MoneyToLocalizedStringTransformer. Removed unused private property Use correct verb form in the pull request template Use PHP_MAXPATHLEN in Filesystem. Added null as explicit return type (?TokenInterface) [FrameworkBundle] Fix Routing\DelegatingLoader Render all line breaks according to the exception message [Form] Fix phpdoc [DI] remove confusing code [Form] Fixed GroupSequence with "constraints" option [Validator] Clarify UUID validator behavior ...
2 parents 8486a50 + a707bbf commit fedcc91

File tree

337 files changed

+594
-876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+594
-876
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
| ------------- | ---
33
| Branch? | 3.4 or master / 2.7, 2.8 or 3.3 <!-- see comment below -->
44
| Bug fix? | yes/no
5-
| New feature? | yes/no <!-- don't forget updating src/**/CHANGELOG.md files -->
5+
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
66
| BC breaks? | yes/no
7-
| Deprecations? | yes/no <!-- don't forget updating UPGRADE-*.md files -->
7+
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md files -->
88
| Tests pass? | yes/no
99
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
1010
| License | MIT

src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class ProxyCacheWarmer implements CacheWarmerInterface
2727
private $registry;
2828

2929
/**
30-
* Constructor.
31-
*
3230
* @param ManagerRegistry $registry A ManagerRegistry instance
3331
*/
3432
public function __construct(ManagerRegistry $registry)

src/Symfony/Bridge/Doctrine/DataFixtures/ContainerAwareLoader.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class ContainerAwareLoader extends Loader
3131
private $container;
3232

3333
/**
34-
* Constructor.
35-
*
3634
* @param ContainerInterface $container A ContainerInterface instance
3735
*/
3836
public function __construct(ContainerInterface $container)

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
3232
private $tagPrefix;
3333

3434
/**
35-
* Constructor.
36-
*
3735
* @param string $connections Parameter ID for connections
3836
* @param string $managerTemplate sprintf() template for generating the event
3937
* manager's service ID for a connection name

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
9797
private $aliasMap;
9898

9999
/**
100-
* Constructor.
101-
*
102100
* The $managerParameters is an ordered list of container parameters that could provide the
103101
* name of the manager to register these namespaces and alias on. The first non-empty name
104102
* is used, the others skipped.

src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ class DbalSessionHandler implements \SessionHandlerInterface
5454
private $timeCol = 'sess_time';
5555

5656
/**
57-
* Constructor.
58-
*
5957
* @param Connection $con A connection
6058
* @param string $tableName Table name
6159
*/

src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
use Doctrine\DBAL\Logging\SQLLogger;
1717

1818
/**
19-
* DbalLogger.
20-
*
2119
* @author Fabien Potencier <fabien@symfony.com>
2220
*/
2321
class DbalLogger implements SQLLogger
@@ -29,8 +27,6 @@ class DbalLogger implements SQLLogger
2927
protected $stopwatch;
3028

3129
/**
32-
* Constructor.
33-
*
3430
* @param LoggerInterface $logger A LoggerInterface instance
3531
* @param Stopwatch $stopwatch A Stopwatch instance
3632
*/

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,4 +1455,38 @@ public function testSubmitNullExpandedMultiple()
14551455
$this->assertEquals($collection, $form->getNormData());
14561456
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
14571457
}
1458+
1459+
public function testSetDataEmptyArraySubmitNullMultiple()
1460+
{
1461+
$emptyArray = array();
1462+
$form = $this->factory->create(static::TESTED_TYPE, null, array(
1463+
'em' => 'default',
1464+
'class' => self::SINGLE_IDENT_CLASS,
1465+
'multiple' => true,
1466+
));
1467+
$form->setData($emptyArray);
1468+
$form->submit(null);
1469+
$this->assertInternalType('array', $form->getData());
1470+
$this->assertEquals(array(), $form->getData());
1471+
$this->assertEquals(array(), $form->getNormData());
1472+
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
1473+
}
1474+
1475+
public function testSetDataNonEmptyArraySubmitNullMultiple()
1476+
{
1477+
$entity1 = new SingleIntIdEntity(1, 'Foo');
1478+
$this->persist(array($entity1));
1479+
$form = $this->factory->create(static::TESTED_TYPE, null, array(
1480+
'em' => 'default',
1481+
'class' => self::SINGLE_IDENT_CLASS,
1482+
'multiple' => true,
1483+
));
1484+
$existing = array(0 => $entity1);
1485+
$form->setData($existing);
1486+
$form->submit(null);
1487+
$this->assertInternalType('array', $form->getData());
1488+
$this->assertEquals(array(), $form->getData());
1489+
$this->assertEquals(array(), $form->getNormData());
1490+
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
1491+
}
14581492
}

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require-dev": {
2424
"symfony/stopwatch": "~2.8|~3.0|~4.0",
2525
"symfony/dependency-injection": "~3.4|~4.0",
26-
"symfony/form": "^3.2.5|~4.0",
26+
"symfony/form": "^3.3.10|~4.0",
2727
"symfony/http-kernel": "~2.8|~3.0|~4.0",
2828
"symfony/property-access": "~2.8|~3.0|~4.0",
2929
"symfony/property-info": "~2.8|3.0|~4.0",

src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class ConsoleFormatter implements FormatterInterface
4747
private $dumper;
4848

4949
/**
50-
* Constructor.
51-
*
5250
* Available options:
5351
* * format: The format of the outputted log string. The following placeholders are supported: %datetime%, %start_tag%, %level_name%, %end_tag%, %channel%, %message%, %context%, %extra%;
5452
* * date_format: The format of the outputted date string;

src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class ConsoleHandler extends AbstractProcessingHandler implements EventSubscribe
5757
);
5858

5959
/**
60-
* Constructor.
61-
*
6260
* @param OutputInterface|null $output The console output to use (the handler remains disabled when passing null
6361
* until the output is set, e.g. by using console events)
6462
* @param bool $bubble Whether the messages that are handled can bubble up the stack

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
6060
$zip->extractTo(getcwd());
6161
$zip->close();
6262
chdir("phpunit-$PHPUNIT_VERSION");
63-
passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml'));
63+
$SYMFONY_PHPUNIT_REMOVE = getenv('SYMFONY_PHPUNIT_REMOVE');
64+
passthru("$COMPOSER remove --no-update ".('' === $SYMFONY_PHPUNIT_REMOVE ?: 'phpspec/prophecy symfony/yaml'));
6465
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
6566
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
6667
}

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ class ProxyDumper implements DumperInterface
4242
private $classGenerator;
4343

4444
/**
45-
* Constructor.
46-
*
4745
* @param string $salt
4846
*/
4947
public function __construct($salt = '')

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class CodeExtension extends AbstractExtension
2727
private $charset;
2828

2929
/**
30-
* Constructor.
31-
*
3230
* @param string|FileLinkFormatter $fileLinkFormat The format for links to source files
3331
* @param string $rootDir The project root directory
3432
* @param string $charset The charset

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
use Twig\NodeVisitor\AbstractNodeVisitor;
2727

2828
/**
29-
* TranslationDefaultDomainNodeVisitor.
30-
*
3129
* @author Fabien Potencier <fabien@symfony.com>
3230
*/
3331
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
@@ -37,9 +35,6 @@ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
3735
*/
3836
private $scope;
3937

40-
/**
41-
* Constructor.
42-
*/
4338
public function __construct()
4439
{
4540
$this->scope = new Scope();

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterf
2929
protected $router;
3030

3131
/**
32-
* Constructor.
33-
*
3432
* @param ContainerInterface $container
3533
*/
3634
public function __construct($container)

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class TemplateFinder implements TemplateFinderInterface
3030
private $templates;
3131

3232
/**
33-
* Constructor.
34-
*
3533
* @param KernelInterface $kernel A KernelInterface instance
3634
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
3735
* @param string $rootDir The directory where global templates can be stored

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class TemplatePathsCacheWarmer extends CacheWarmer
2626
protected $locator;
2727

2828
/**
29-
* Constructor.
30-
*
3129
* @param TemplateFinderInterface $finder A template finder
3230
* @param TemplateLocator $locator The template locator
3331
*/

src/Symfony/Bundle/FrameworkBundle/Console/Application.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
use Symfony\Component\HttpKernel\Bundle\Bundle;
2626

2727
/**
28-
* Application.
29-
*
3028
* @author Fabien Potencier <fabien@symfony.com>
3129
*/
3230
class Application extends BaseApplication
@@ -36,8 +34,6 @@ class Application extends BaseApplication
3634
private $registrationErrors = array();
3735

3836
/**
39-
* Constructor.
40-
*
4137
* @param KernelInterface $kernel A KernelInterface instance
4238
*/
4339
public function __construct(KernelInterface $kernel)

src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
*/
2525
class DescriptorHelper extends BaseDescriptorHelper
2626
{
27-
/**
28-
* Constructor.
29-
*/
3027
public function __construct()
3128
{
3229
$this

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class ControllerNameParser
2525
protected $kernel;
2626

2727
/**
28-
* Constructor.
29-
*
3028
* @param KernelInterface $kernel A KernelInterface instance
3129
*/
3230
public function __construct(KernelInterface $kernel)

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,13 @@
1717
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;
1818

1919
/**
20-
* ControllerResolver.
21-
*
2220
* @author Fabien Potencier <fabien@symfony.com>
2321
*/
2422
class ControllerResolver extends ContainerControllerResolver
2523
{
2624
protected $parser;
2725

2826
/**
29-
* Constructor.
30-
*
3127
* @param ContainerInterface $container A ContainerInterface instance
3228
* @param ControllerNameParser $parser A ControllerNameParser instance
3329
* @param LoggerInterface $logger A LoggerInterface instance

src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ abstract class HttpCache extends BaseHttpCache
2929
protected $kernel;
3030

3131
/**
32-
* Constructor.
33-
*
3432
* @param HttpKernelInterface $kernel An HttpKernelInterface instance
3533
* @param string $cacheDir The cache directory (default used if null)
3634
*/

src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class DelegatingLoader extends BaseDelegatingLoader
3030
private $loading = false;
3131

3232
/**
33-
* Constructor.
34-
*
3533
* @param ControllerNameParser $parser A ControllerNameParser instance
3634
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
3735
*/
@@ -75,7 +73,7 @@ public function load($resource, $type = null)
7573
}
7674

7775
foreach ($collection->all() as $route) {
78-
if (!$controller = $route->getDefault('_controller')) {
76+
if (!is_string($controller = $route->getDefault('_controller')) || !$controller) {
7977
continue;
8078
}
8179

src/Symfony/Bundle/FrameworkBundle/Routing/Router.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI
3333
private $collectedParameters = array();
3434

3535
/**
36-
* Constructor.
37-
*
3836
* @param ContainerInterface $container A ContainerInterface instance
3937
* @param mixed $resource The main resource to load
4038
* @param array $options An array of options

src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class DelegatingEngine extends BaseDelegatingEngine implements EngineInterface
2525
protected $container;
2626

2727
/**
28-
* Constructor.
29-
*
3028
* @param ContainerInterface $container The DI container
3129
* @param array $engineIds An array of engine Ids
3230
*/

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class ActionsHelper extends Helper
2525
private $handler;
2626

2727
/**< 10000 /div>
28-
* Constructor.
29-
*
3028
* @param FragmentHandler $handler A FragmentHandler instance
3129
*/
3230
public function __construct(FragmentHandler $handler)

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
use Symfony\Component\Templating\Helper\Helper;
1616

1717
/**
18-
* CodeHelper.
19-
*
2018
* @author Fabien Potencier <fabien@symfony.com>
2119
*/
2220
class CodeHelper extends Helper
@@ -26,8 +24,6 @@ class CodeHelper extends Helper
2624
protected $charset;
2725

2826
/**
29-
* Constructor.
30-
*
3127
* @param string|FileLinkFormatter $fileLinkFormat The format for links to source files
3228
* @param string $rootDir The project root directory
3329
* @param string $charset The charset

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class RouterHelper extends Helper
2424
protected $generator;
2525

2626
/**
27-
* Constructor.
28-
*
2927
* @param UrlGeneratorInterface $router A Router instance
3028
*/
3129
public function __construct(UrlGeneratorInterface $router)

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@
1515
use Symfony\Component\Translation\TranslatorInterface;
1616

1717
/**
18-
* TranslatorHelper.
19-
*
2018
* @author Fabien Potencier <fabien@symfony.com>
2119
*/
2220
class TranslatorHelper extends Helper
2321
{
2422
protected $translator;
2523

2624
/**
27-
* Constructor.
28-
*
2925
* @param TranslatorInterface $translator A TranslatorInterface instance
3026
*/
3127
public function __construct(TranslatorInterface $translator)

src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class FilesystemLoader implements LoaderInterface
2626
protected $locator;
2727

2828
/**
29-
* Constructor.
30-
*
3129
* @param FileLocatorInterface $locator A FileLocatorInterface instance
3230
*/
3331
public function __construct(FileLocatorInterface $locator)

src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class TemplateLocator implements FileLocatorInterface
2727
private $cacheHits = array();
2828

2929
/**
30-
* Constructor.
31-
*
3230
* @param FileLocatorInterface $locator A FileLocatorInterface instance
3331
* @param string $cacheDir The cache path
3432
*/

src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class PhpEngine extends BasePhpEngine implements EngineInterface
2727
protected $container;
2828

2929
/**
30-
* Constructor.
31-
*
3230
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
3331
* @param ContainerInterface $container The DI container
3432
* @param LoaderInterface $loader A loader instance

0 commit comments

Comments
 (0)
0