Skip to content

Commit 2f7ee73

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: [FrameworkBundle] set NamespacedPoolInterface alias to cache.app [Ldap] Fix `LdapUser::isEqualTo` Add table of contents in `UPGRADE-7.3.md` do not restrict experimental components to a single minor version pass log level instead of exception to resolve the logger skip interactive questions asked by Composer [SecurityBundle] Remove `AnonymousFactory` leftovers [WebProfilerBundle] Fix toolbar with ajax requests not closing [HttpKernel] Fix Symfony 7.3 end of maintenance date [Translation] Validate of pt_BR translation by a native speaker
2 parents 19b1fba + 6abb902 commit 2f7ee73

File tree

12 files changed

+83
-23
lines changed

12 files changed

+83
-23
lines changed

UPGRADE-7.3.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,37 @@ Read more about this in the [Symfony documentation](https://symfony.com/doc/7.3/
88

99
If you're upgrading from a version below 7.2, follow the [7.2 upgrade guide](UPGRADE-7.2.md) first.
1010

11+
Table of Contents
12+
-----------------
13+
14+
Bundles
15+
16+
* [FrameworkBundle](#FrameworkBundle)
17+
* [SecurityBundle](#SecurityBundle)
18+
* [WebProfilerBundle](#WebProfilerBundle)
19+
20+
Bridges
21+
22+
* [DoctrineBridge](#DoctrineBridge)
23+
24+
Components
25+
26+
* [AssetMapper](#AssetMapper)
27+
* [Console](#Console)
28+
* [DependencyInjection](#DependencyInjection)
29+
* [HttpFoundation](#HttpFoundation)
30+
* [Ldap](#Ldap)
31+
* [OptionsResolver](#OptionsResolver)
32+
* [PropertyInfo](#PropertyInfo)
33+
* [Security](#Security)
34+
* [Notifier](#Notifier)
35+
* [Serializer](#Serializer)
36+
* [TypeInfo](#TypeInfo)
37+
* [Validator](#Validator)
38+
* [VarDumper](#VarDumper)
39+
* [VarExporter](#VarExporter)
40+
* [Workflow](#Workflow)
41+
1142
AssetMapper
1243
-----------
1344

@@ -193,8 +224,8 @@ SecurityBundle
193224

194225
* Deprecate the `security.hide_user_not_found` config option in favor of `security.expose_security_errors`
195226

196-
Notifier
197-
--------
227+
Notifier
228+
--------
198229

199230
* Deprecate the `Sms77` transport, use `SevenIo` instead
200231

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
$passthruOrFail("$COMPOSER require --no-update --no-interaction ".$SYMFONY_PHPUNIT_REQUIRE);
241241
}
242242
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
243-
$passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
243+
$passthruOrFail("$COMPOSER require --no-update --no-interaction phpunit/phpunit-mock-objects \"~3.1.0\"");
244244
}
245245

246246
if (preg_match('{\^((\d++\.)\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[2].'99', \PHP_VERSION, '<')) {
@@ -256,13 +256,13 @@
256256
if (realpath($p) === realpath($path)) {
257257
$path = $p;
258258
}
259-
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
259+
$passthruOrFail("$COMPOSER require --no-update --no-interaction symfony/phpunit-bridge \"*@dev\"");
260260
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', \DIRECTORY_SEPARATOR, $path)));
261261
if ('\\' === \DIRECTORY_SEPARATOR) {
262262
file_put_contents('composer.json', preg_replace('/^( {8})"phpunit-bridge": \{$/m', "$0\n$1 ".'"options": {"symlink": false},', file_get_contents('composer.json')));
263263
}
264264
} else {
265-
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*\"");
265+
$passthruOrFail("$COMPOSER require --no-update --no-interaction symfony/phpunit-bridge \"*\"");
266266
}
267267
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
268268
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ public function load(array $configs, ContainerBuilder $container): void
303303
// Load Cache configuration first as it is used by other components
304304
$loader->load('cache.php');
305305

306+
if (!interface_exists(NamespacedPoolInterface::class)) {
307+
$container->removeAlias(NamespacedPoolInterface::class);
308+
}
309+
306310
$configuration = $this->getConfiguration($configs, $container);
307311
$config = $this->processConfiguration($configuration, $configs);
308312

src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Symfony\Component\Cache\Messenger\EarlyExpirationHandler;
2929
use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer;
3030
use Symfony\Contracts\Cache\CacheInterface;
31+
use Symfony\Contracts\Cache\NamespacedPoolInterface;
3132
use Symfony\Contracts\Cache\TagAwareCacheInterface;
3233

3334
return static function (ContainerConfigurator $container) {
@@ -250,6 +251,8 @@
250251

251252
->alias(CacheInterface::class, 'cache.app')
252253

254+
->alias(NamespacedPoolInterface::class, 'cache.app')
255+
253256
->alias(TagAwareCacheInterface::class, 'cache.app.taggable')
254257
;
255258
};

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"symfony/messenger": "^6.4|^7.0",
5555
"symfony/mime": "^6.4|^7.0",
5656
"symfony/notifier": "^6.4|^7.0",
57-
"symfony/object-mapper": "^v7.3.0-beta2",
57+
"symfony/object-mapper": "^7.3",
5858
"symfony/process": "^6.4|^7.0",
5959
"symfony/rate-limiter": "^6.4|^7.0",
6060
"symfony/scheduler": "^6.4.4|^7.0.4",
@@ -70,7 +70,7 @@
7070
"symfony/workflow": "^7.3",
7171
"symfony/yaml": "^6.4|^7.0",
7272
"symfony/property-info": "^6.4|^7.0",
73-
"symfony/json-streamer": "7.3.*",
73+
"symfony/json-streamer": "^7.3",
7474
"symfony/uid": "^6.4|^7.0",
7575
"symfony/web-link": "^6.4|^7.0",
7676
"symfony/webhook": "^7.2",
@@ -89,12 +89,10 @@
8989
"symfony/dom-crawler": "<6.4",
9090
"symfony/http-client": "<6.4",
9191
"symfony/form": "<6.4",
92-
"symfony/json-streamer": ">=7.4",
9392
"symfony/lock": "<6.4",
9493
"symfony/mailer": "<6.4",
9594
"symfony/messenger": "<6.4",
9695
"symfony/mime": "<6.4",
97-
"symfony/object-mapper": ">=7.4",
9896
"symfony/property-info": "<6.4",
9997
"symfony/property-access": "<6.4",
10098
"symfony/runtime": "<6.4.13|>=7.0,<7.1.6",

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ private function createFirewalls(array $config, ContainerBuilder $container): vo
321321
$authenticators[$name] = ServiceLocatorTagPass::register($container, $firewallAuthenticatorRefs);
322322
}
323323
$contextId = 'security.firewall.map.context.'.$name;
324-
$isLazy = !$firewall['stateless'] && (!empty($firewall['anonymous']['lazy']) || $firewall['lazy']);
324+
$isLazy = !$firewall['stateless'] && $firewall['lazy'];
325325
$context = new ChildDefinition($isLazy ? 'security.firewall.lazy_context' : 'security.firewall.context');
326326
$context = $container->setDefinition($contextId, $context);
327327
$context
@@ -683,7 +683,7 @@ private function getUserProvider(ContainerBuilder $container, string $id, array
683683
return $this->createMissingUserProvider($container, $id, $factoryKey);
684684
}
685685

686-
if ('remember_me' === $factoryKey || 'anonymous' === $factoryKey) {
686+
if ('remember_me' === $factoryKey) {
687687
return 'security.user_providers';
688688
}
689689

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
145145
var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax');
146146
if (requestStack.length) {
147-
ajaxToolbarPanel.style.display = 'block';
147+
ajaxToolbarPanel.style.display = '';
148148
} else {
149149
ajaxToolbarPanel.style.display = 'none';
150150
}

src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ public static function getSubscribedEvents(): array
161161

162162
/**
163163
* Logs an exception.
164-
*
164+
*
165165
* @param ?string $logChannel
166166
*/
167167
protected function logException(\Throwable $exception, string $message, ?string $logLevel = null, /* ?string $logChannel = null */): void
168168
{
169169
$logChannel = (3 < \func_num_args() ? \func_get_arg(3) : null) ?? $this->resolveLogChannel($exception);
170-
170+
171171
$logLevel ??= $this->resolveLogLevel($exception);
172-
172+
173173
if(!$logger = $this->getLogger($logChannel)) {
174174
return;
175175
}
@@ -218,7 +218,7 @@ protected function duplicateRequest(\Throwable $exception, Request $request): Re
218218
$attributes = [
219219
'_controller' => $this->controller,
220220
'exception' => $exception,
221-
'logger' => DebugLoggerConfigurator::getDebugLogger($this->getLogger($exception)),
221+
'logger' => DebugLoggerConfigurator::getDebugLogger($this->getLogger($this->resolveLogChannel($exception))),
222222
];
223223
$request = $request->duplicate(null, null, $attributes);
224224
$request->setMethod('GET');

src/Symfony/Component/JsonPath/composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
"symfony/polyfill-mbstring": "~1.0"
2121
},
2222
"require-dev": {
23-
"symfony/json-streamer": "7.3.*"
24-
},
25-
"conflict": {
26-
"symfony/json-streamer": ">=7.4"
23+
"symfony/json-streamer": "^7.3"
2724
},
2825
"autoload": {
2926
"psr-4": { "Symfony\\Component\\JsonPath\\": "" },

src/Symfony/Component/Ldap/Security/LdapUser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getRoles(): array
4747

4848
public function getPassword(): ?string
4949
{
50-
return $this->password;
50+
return $this->password ?? null;
5151
}
5252

5353
public function getSalt(): ?string
@@ -89,7 +89,7 @@ public function isEqualTo(UserInterface $user): bool
8989
return false;
9090
}
9191

92-
if ($this->getPassword() !== $user->getPassword()) {
92+
if (($this->getPassword() ?? $user->getPassword()) !== $user->getPassword()) {
9393
return false;
9494
}
9595

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Ldap\Tests\Security;
13+
14+
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Ldap\Entry;
16+
use Symfony\Component\Ldap\Security\LdapUser;
17+
18+
class LdapUserTest extends TestCase
19+
{
20+
public function testIsEqualToWorksOnUnserializedUser()
21+
{
22+
$user = new LdapUser(new Entry('uid=jonhdoe,ou=MyBusiness,dc=symfony,dc=com', []), 'jonhdoe', 'p455w0rd');
23+
$unserializedUser = unserialize(serialize($user));
24+
25+
$this->assertTrue($unserializedUser->isEqualTo($user));
26+
}
27+
}

src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
</trans-unit>
469469
<trans-unit id="121">
470470
<source>This value is not a valid Twig template.</source>
471-
<target state="needs-review-translation">Este valor não é um modelo Twig válido.</target>
471+
<target>Este valor não é um modelo Twig válido.</target>
472472
</trans-unit>
473473
</body>
474474
</file>

0 commit comments

Comments
 (0)