Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c4404fd

Browse filesBrowse files
committed
Merge branch '5.3' into 5.4
* 5.3: fixes issue #41478 by resetting the $attributes array per controller argument [Security] Fix setUsername() deprecation message Add conflict with property-info < 5.3 Fix Symfony 5.3 end of maintenance date Bump Symfony version to 5.3.1 Update VERSION for 5.3.0 Update CHANGELOG for 5.3.0 [FrameworkBundle] fix ConfigBuilderCacheWarmer [FrameworkBundle] fix creating ContainerBuilder at warmup/CLI time [Framework] Remove redundant cache service Remove PoEditor Provider
2 parents e2d1cb1 + 4500326 commit c4404fd
Copy full SHA for c4404fd

26 files changed

+49
-1035
lines changed

‎CHANGELOG-5.3.md

Copy file name to clipboardExpand all lines: CHANGELOG-5.3.md
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ in 5.3 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.3.0...v5.3.1
99

10+
* 5.3.0 (2021-05-31)
11+
12+
* bug #41458 [FrameworkBundle] fix ConfigBuilderCacheWarmer (nicolas-grekas)
13+
* bug #41456 [FrameworkBundle] fix creating ContainerBuilder at warmup/CLI time (nicolas-grekas)
14+
* bug #41452 [FrameworkBundle] Remove redundant cache service (derrabus)
15+
* bug #41451 [Translation] Remove PoEditor Provider (welcoMattic)
16+
* bug #41000 [Form] Use !isset for checks cause this doesn't falsely include 0 (Kai Dederichs)
17+
* bug #41407 [DependencyInjection] keep container.service_subscriber tag on the decorated definition (xabbuh)
18+
* bug #40866 [Filesystem] fix readlink() for Windows (a1812)
19+
* bug #41402 [HttpKernel] Throw when HttpKernel is created and the env is empty (nicolas-grekas)
20+
* bug #41376 [SecurityBundle] Don't register deprecated listeners with authenticator manager enabled (chalasr)
21+
* bug #41394 [Form] fix support for years outside of the 32b range on x86 arch (nicolas-grekas)
22+
* bug #41380 Make Mailgun Header compatible with other Bridges (jderusse)
23+
* bug #39847 [Messenger] Fix merging PrototypedArrayNode associative values (svityashchuk)
24+
* bug #41367 [Ldap] Avoid calling the deprecated getUsername() (derrabus)
25+
* bug #41346 [WebProfilerBundle] Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed (weaverryan)
26+
* bug #41344 [VarDumper] Don't pass null to parse_url() (derrabus)
27+
1028
* 5.3.0-RC1 (2021-05-19)
1129

1230
* security #cve-2021-21424 [Security\Core] Fix user enumeration via response body on invalid credentials (chalasr)

‎src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;
1313

1414
use Psr\Log\LoggerInterface;
15-
use Symfony\Bundle\FrameworkBundle\Command\BuildDebugContainerTrait;
1615
use Symfony\Component\Config\Builder\ConfigBuilderGenerator;
1716
use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
1817
use Symfony\Component\Config\Definition\ConfigurationInterface;
18+
use Symfony\Component\DependencyInjection\ContainerBuilder;
1919
use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
2020
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
2121
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
@@ -28,8 +28,6 @@
2828
*/
2929
class ConfigBuilderCacheWarmer implements CacheWarmerInterface
3030
{
31-
use BuildDebugContainerTrait;
32-
3331
private $kernel;
3432
private $logger;
3533

@@ -73,7 +71,7 @@ private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGener
7371
if ($extension instanceof ConfigurationInterface) {
7472
$configuration = $extension;
7573
} elseif ($extension instanceof ConfigurationExtensionInterface) {
76-
$configuration = $extension->getConfiguration([], $this->getContainerBuilder($this->kernel));
74+
$configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag()));
7775
}
7876

7977
if (!$configuration) {

‎src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde
4040
}
4141

4242
if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) {
43-
$buildContainer = \Closure::bind(function () { return $this->buildContainer(); }, $kernel, \get_class($kernel));
43+
$buildContainer = \Closure::bind(function () {
44+
$this->initializeBundles();
45+
46+
return $this->buildContainer();
47+
}, $kernel, \get_class($kernel));
4448
$container = $buildContainer();
4549
$container->getCompilerPassConfig()->setRemovingPasses([]);
4650
$container->getCompilerPassConfig()->setAfterRemovingPasses([]);

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@
172172
use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory;
173173
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
174174
use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory;
175-
use Symfony\Component\Translation\Bridge\PoEditor\PoEditorProviderFactory;
176175
use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand;
177176
use Symfony\Component\Translation\PseudoLocalizationTranslator;
178177
use Symfony\Component\Translation\Translator;
@@ -1345,15 +1344,12 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
13451344
CrowdinProviderFactory::class => 'translation.provider_factory.crowdin',
13461345
LocoProviderFactory::class => 'translation.provider_factory.loco',
13471346
LokaliseProviderFactory::class => 'translation.provider_factory.lokalise',
1348-
PoEditorProviderFactory::class => 'translation.provider_factory.poeditor',
13491347
];
13501348

13511349
$parentPackages = ['symfony/framework-bundle', 'symfony/translation', 'symfony/http-client'];
13521350

13531351
foreach ($classToServices as $class => $service) {
1354-
switch ($package = substr($service, \strlen('translation.provider_factory.'))) {
1355-
case 'poeditor': $package = 'po-editor'; break;
1356-
}
1352+
$package = substr($service, \strlen('translation.provider_factory.'));
13571353

13581354
if (!$container->hasDefinition('http_client') || !ContainerBuilder::willBeAvailable(sprintf('symfony/%s-translation-provider', $package), $class, $parentPackages)) {
13591355
$container->removeDefinition($service);
@@ -1555,7 +1551,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
15551551
$container->setDefinition('annotations.cached_reader', $container->getDefinition('annotations.psr_cached_reader'));
15561552

15571553
if ('php_array' === $config['cache']) {
1558-
$cacheService = 'annotations.psr_cache';
1554+
$cacheService = 'annotations.cache_adapter';
15591555

15601556
// Enable warmer only if PHP array is used for cache
15611557
$definition = $container->findDefinition('annotations.cache_warmer');

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@
6868
param('kernel.cache_dir').'/annotations.php',
6969
service('cache.annotations'),
7070
])
71+
->tag('container.hot_path')
7172

7273
->set('annotations.cache', DoctrineProvider::class)
7374
->args([
74-
service('annotations.cache_adapter')
75+
service('annotations.cache_adapter'),
7576
])
7677
->tag('container.hot_path')
7778

@@ -86,13 +87,6 @@
8687
inline_service(ArrayAdapter::class),
8788
abstract_arg('Debug-Flag'),
8889
])
89-
->set('annotations.psr_cache', PhpArrayAdapter::class)
90-
->factory([PhpArrayAdapter::class, 'create'])
91-
->args([
92-
param('kernel.cache_dir').'/annotations.php',
93-
service('cache.annotations'),
94-
])
95-
->tag('container.hot_path')
9690
;
9791
}
9892
};

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory;
1515
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
1616
use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory;
17-
use Symfony\Component\Translation\Bridge\PoEditor\PoEditorProviderFactory;
1817
use Symfony\Component\Translation\Provider\NullProviderFactory;
1918
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
2019
use Symfony\Component\Translation\Provider\TranslationProviderCollectionFactory;
@@ -63,14 +62,5 @@
6362
service('translation.loader.xliff'),
6463
])
6564
->tag('translation.provider_factory')
66-
67-
->set('translation.provider_factory.poeditor', PoEditorProviderFactory::class)
68-
->args([
69-
service('http_client'),
70-
service('logger'),
71-
param('kernel.default_locale'),
72-
service('translation.loader.xliff'),
73-
])
74-
->tag('translation.provider_factory')
7565
;
7666
};

‎src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function createArgumentMetadata($controller): array
3434
}
3535

3636
foreach ($reflection->getParameters() as $param) {
37+
$attributes = [];
3738
if (\PHP_VERSION_ID >= 80000) {
3839
foreach ($param->getAttributes() as $reflectionAttribute) {
3940
if (class_exists($reflectionAttribute->getName())) {
@@ -42,7 +43,7 @@ public function createArgumentMetadata($controller): array
4243
}
4344
}
4445

45-
$arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param, $reflection), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes ?? []);
46+
$arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param, $reflection), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes);
4647
}
4748

4849
return $arguments;

‎src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,18 @@ public function testMultipleAttributes()
140140
$this->assertCount(1, $this->factory->createArgumentMetadata([new AttributeController(), 'multiAttributeArg'])[0]->getAttributes());
141141
}
142142

143+
/**
144+
* @requires PHP 8
145+
*/
146+
public function testIssue41478()
147+
{
148+
$arguments = $this->factory->createArgumentMetadata([new AttributeController(), 'issue41478']);
149+
$this->assertEquals([
150+
new ArgumentMetadata('baz', 'string', false, false, null, false, [new Foo('bar')]),
151+
new ArgumentMetadata('bat', 'string', false, false, null, false, []),
152+
], $arguments);
153+
}
154+
143155
private function signature1(self $foo, array $bar, callable $baz)
144156
{
145157
}

‎src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/AttributeController.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/AttributeController.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ public function action(#[Foo('bar')] string $baz) {
2020

2121
public function multiAttributeArg(#[Foo('bar'), Undefined('bar')] string $baz) {
2222
}
23+
24+
public function issue41478(#[Foo('bar')] string $baz, string $bat) {
25+
}
2326
}

‎src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Exception/UserNotFoundException.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function setUserIdentifier(string $identifier): void
6262
*/
6363
public function setUsername(string $username)
6464
{
65-
trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__);
65+
trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use setUserIdentifier() instead.', __METHOD__);
6666

6767
$this->identifier = $username;
6868
}

‎src/Symfony/Component/Serializer/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"phpdocumentor/type-resolver": "<1.4.0",
4848
"symfony/dependency-injection": "<4.4",
4949
"symfony/property-access": "<4.4",
50-
"symfony/property-info": "<4.4",
50+
"symfony/property-info": "<5.3",
5151
"symfony/yaml": "<4.4"
5252
},
5353
"suggest": {

‎src/Symfony/Component/Translation/Bridge/PoEditor/.gitattributes

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/PoEditor/.gitattributes
-4Lines changed: 0 additions & 4 deletions
This file was deleted.

‎src/Symfony/Component/Translation/Bridge/PoEditor/.gitignore

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/PoEditor/.gitignore
-3Lines changed: 0 additions & 3 deletions
This file was deleted.

‎src/Symfony/Component/Translation/Bridge/PoEditor/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/PoEditor/CHANGELOG.md
-7Lines changed: 0 additions & 7 deletions
This file was deleted.

‎src/Symfony/Component/Translation/Bridge/PoEditor/LICENSE

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/PoEditor/LICENSE
-19Lines changed: 0 additions & 19 deletions
This file was deleted.

‎src/Symfony/Component/Translation/Bridge/PoEditor/PoEditorHttpClient.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/PoEditor/PoEditorHttpClient.php
-44Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.