8000 Merge branch '7.0' into 7.1 · symfony/symfony@973495d · GitHub
[go: up one dir, main page]

Skip to content

Commit 973495d

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: fix Redis proxies tests [VarDumper] Fix missing colors initialization in CliDumper [SecurityBundle] Add missing removed config options to upgrade guide [VarDumper] Fixes `Typed property Symfony\Component\VarDumper\Dumper\CliDumper::$colors must not be accessed before initialization` [Process] Fix executable finder when the command starts with a dash [Validator] added reviewed Lithuanian and Dutch translations simplify the parser factory creation
2 parents d4b1992 + 5253b6b commit 973495d

File tree

11 files changed

+25
-15
lines changed

11 files changed

+25
-15
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
[[ "${{ matrix.mode }}" = *-deps ]] && mv composer.json.phpunit composer.json || true
130130
131131
if [[ "${{ matrix.mode }}" = low-deps ]]; then
132-
echo SYMFONY_PHPUNIT_REQUIRE="nikic/php-parser:^4.16" >> $GITHUB_ENV
132+
echo SYMFONY_PHPUNIT_REQUIRE="nikic/php-parser:^4.18" >> $GITHUB_ENV
133133
fi
134134
135135
- name: Install dependencies

UPGRADE-7.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ SecurityBundle
429429
--------------
430430

431431
* Enabling SecurityBundle and not configuring it is not allowed, either remove the bundle or configure at least one firewall
432+
* Remove the `enable_authenticator_manager` config option
433+
* Remove the `security.firewalls.logout.csrf_token_generator` config option, use `security.firewalls.logout.csrf_token_manager` instead
432434
* Remove the `require_previous_session` config option from authenticators
433435

434436
Serializer

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"league/uri": "^6.5|^7.0",
139139
"masterminds/html5": "^2.7.2",
140140
"monolog/monolog": "^3.0",
141-
"nikic/php-parser": "^4.16|^5.0",
141+
"nikic/php-parser": "^4.18|^5.0",
142142
"nyholm/psr7": "^1.0",
143143
"pda/pheanstalk": "^4.0",
144144
"php-http/discovery": "^1.15",

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ CHANGELOG
1010
---
1111

1212
* Enabling SecurityBundle and not configuring it is not allowed
13-
* Remove configuration options `enable_authenticator_manager`, `csrf_token_generator` and `require_previous_session`
13+
* Remove the `enable_authenticator_manager` config option
14+
* Remove the `security.firewalls.logout.csrf_token_generator` config option, use `security.firewalls.logout.csrf_token_manager` instead
15+
* Remove the `require_previous_session` config option from authenticators
1416

1517
6.4
1618
---

src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,17 @@ public function testRedis6Proxy($class, $stub)
101101
continue;
102102
}
103103
$return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return ';
104-
$methods[] = "\n ".str_replace('timeout = 0.0', 'timeout = 0', ProxyHelper::exportSignature($method, false, $args))."\n".<<<EOPHP
104+
$signature = ProxyHelper::exportSignature($method, false, $args);
105+
106+
if ('Redis' === $class && 'mget' === $method->name) {
107+
$signature = str_replace(': \Redis|array|false', ': \Redis|array', $signature);
108+
}
109+
110+
if ('RedisCluster' === $class && 'publish' === $method->name) {
111+
$signature = str_replace(': \RedisCluster|bool|int', ': \RedisCluster|bool', $signature);
112+
}
113+
114+
$methods[] = "\n ".str_replace('timeout = 0.0', 'timeout = 0', $signature)."\n".<<<EOPHP
105115
{
106116
{$return}(\$this->lazyObjectState->realInstance ??= (\$this->lazyObjectState->initializer)())->{$method->name}({$args});
107117
}

src/Symfony/Component/Process/PhpExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function find(bool $includeArgs = true): string|false
< 1E0A code>3333
{
3434
if ($php = getenv('PHP_BINARY')) {
3535
if (!is_executable($php)) {
36-
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
36+
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --';
3737
if (\function_exists('exec') && $php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
3838
if (!is_executable($php)) {
3939
return false;

src/Symfony/Component/Translation/Extractor/PhpAstExtractor.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ public function __construct(
3939
throw new \LogicException(sprintf('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser".', static::class));
4040
}
4141

42-
if (method_exists(ParserFactory::class, 'createForHostVersion')) {
43-
$this->parser = (new ParserFactory())->createForHostVersion();
44-
} else {
45-
$this->parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
46-
}
42+
$this->parser = (new ParserFactory())->createForHostVersion();
4743
}
4844

4945
public function extract(iterable|string $resource, MessageCatalogue $catalogue): void

src/Symfony/Component/Translation/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/translation-contracts": "^2.5|^3.0"
2222
},
2323
"require-dev": {
24-
"nikic/php-parser": "^4.16|^5.0",
24+
"nikic/php-parser": "^4.18|^5.0",
2525
"symfony/config": "^6.4|^7.0",
2626
"symfony/console": "^6.4|^7.0",
2727
"symfony/dependency-injection": "^6.4|^7.0",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@
432432
</trans-unit>
433433
<trans-unit id="111">
434434
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
435-
<target state="needs-review-translation">Nustatyta simbolių koduotė yra netinkama ({{ detected }}). Leidžiamos koduotės yra {{ encodings }}.</target>
435+
<target>Aptikta simbolių koduotė neteisinga ({{ detected }}). Leidžiamos koduotės {{ encodings }}.</target>
436436
</trans-unit>
437437
<trans-unit id="112">
438438
<source>This value is not a valid MAC address.</source>
439-
<target state="needs-review-translation">Ši vertė nėra galiojantis MAC adresas.</target>
439+
<target>Ši reikšmė nėra teisingas MAC adresas.</target>
440440
</trans-unit>
441441
</body>
442442
</file>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
</trans-unit>
433433
<trans-unit id="111">
434434
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
435-
<target state="needs-review-translation">De gedetecteerde karaktercodering is ongeldig ({{ detected }}). Toegestane coderingen zijn {{ encodings }}.</target>
435+
<target>De gedetecteerde tekencodering is ongeldig ({{ detected }}). Toegestane coderingen zijn {{ encodings }}.</target>
436436
</trans-unit>
437437
<trans-unit id="112">
438438
<source>This value is not a valid MAC address.</source>

src/Symfony/Component/VarDumper/Dumper/CliDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ protected function supportsColors(): bool
550550

551551
protected function dumpLine(int $depth, bool $endOfValue = false): void
552552
{
553-
if ($this->colors) {
553+
if ($this->colors ??= $this->supportsColors()) {
554554
$this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line);
555555
}
556556
parent::dumpLine($depth);

0 commit comments

Comments
 (0)
0