8000 Merge branch '5.4' into 6.0 · symfony/symfony@526144a · GitHub
[go: up one dir, main page]

Skip to content

Commit 526144a

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Ldap] Avoid calling the deprecated getUsername() Report the correct package in the deprecation message Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed Fix PHP 8.1 deprecations Add missing deprecation entry [VarDumper] Don't pass null to parse_url() Invalid copy-paste fix
2 parents b494790 + c82d8c9 commit 526144a

File tree

9 files changed

+250
-242
lines changed

9 files changed

+250
-242
lines changed

UPGRADE-6.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ Monolog
151151
* The `$actionLevel` constructor argument of `Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy` has been replaced by the `$inner` one which expects an ActivationStrategyInterface to decorate instead. `Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy` is now final.
152152
* The `$actionLevel` constructor argument of `Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy` has been replaced by the `$inner` one which expects an ActivationStrategyInterface to decorate instead. `Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy` is now final.
153153

154+
Notifier
155+
--------
156+
157+
* Remove `SlackOptions::channel()`, use `SlackOptions::recipient()` instead.
158+
154159
OptionsResolver
155160
---------------
156161

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
them as JavaScript source code. Always use '/*' comments instead
66
of '//' comments to avoid impossible-to-debug side-effects #}
77
8-
if (typeof Sfjs === 'undefined') {
8+
if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
99
Sfjs = (function() {
1010
"use strict";
1111

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ private function renderCell(array $row, int $column, string $cellFormat): string
520520
if ($isNotStyledByTag) {
521521
$cellFormat = $cell->getStyle()->getCellFormat();
522522
if (!\is_string($cellFormat)) {
523-
$tag = http_build_query($cell->getStyle()->getTagOptions(), null, ';');
523+
$tag = http_build_query($cell->getStyle()->getTagOptions(), '', ';');
524524
$cellFormat = '<'.$tag.'>%s</>';
525525
}
526526

src/Symfony/Component/Console/Input/InputOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class InputOption
4242
public const VALUE_IS_ARRAY = 8;
4343

4444
/**
45-
* The option accepts multiple values (e.g. --dir=/foo --dir=/bar).
45+
* The option may have either positive or negative value (e.g. --ansi or --no-ansi).
4646
*/
4747
public const VALUE_NEGATABLE = 16;
4848

src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js

Lines changed: 236 additions & 235 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getSalt(): ?string
7676
*/
7777
public function getUsername(): string
7878
{
79-
trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated and will be removed in 6.0, use getUserIdentifier() instead.', __METHOD__);
79+
trigger_deprecation('symfony/ldap', '5.3', 'Method "%s()" is deprecated and will be removed in 6.0, use getUserIdentifier() instead.', __METHOD__);
8080

8181
return $this->username;
8282
}
@@ -121,7 +121,7 @@ public function isEqualTo(UserInterface $user): bool
121121
return false;
122122
}
123123

124-
if ($this->getUsername() !== $user->getUsername()) {
124+
if ($this->getUserIdentifier() !== $user->getUserIdentifier()) {
125125
return false;
126126
}
127127

src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public function testBindFailureShouldThrowAnException()
138138
$this->expectException(BadCredentialsException::class);
139139
$this->expectExceptionMessage('The presented password is invalid.');
140140

141+
$this->ldap->method('escape')->willReturnArgument(0);
141142
$this->ldap->expects($this->any())->method('bind')->willThrowException(new ConnectionException());
142143

143144
$listener = $this->createListener();
@@ -178,6 +179,7 @@ public function testEmptyQueryResultShouldThrowAnException()
178179
->withConsecutive(
179180
['elsa', 'test1234A$']
180181
);
182+
$this->ldap->method('escape')->willReturnArgument(0);
181183
$this->ldap->expects($this->once())->method('query')->willReturn($query);
182184

183185
$listener = $this->createListener();

src/Symfony/Component/String/Slugger/AsciiSlugger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function slug(string $string, string $separator = '-', string $locale = n
103103
$locale = $locale ?? $this->defaultLocale;
104104

105105
$transliterator = [];
106-
if ('de' === $locale || 0 === strpos($locale, 'de_')) {
106+
if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) {
107107
// Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl)
108108
$transliterator = ['de-ASCII'];
109109
} elseif (\function_exists('transliterator_transliterate') && $locale) {

src/Symfony/Component/VarDumper/VarDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private static function register(): void
7171
$dumper = new CliDumper();
7272
break;
7373
case 'server' === $format:
74-
case 'tcp' === parse_url($format, \PHP_URL_SCHEME):
74+
case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME):
7575
$host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format;
7676
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
7777
$dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders());

0 commit comments

Comments
 (0)
0