Skip to content

Commit be82f92

Browse files
Merge branch '6.0' into 6.1
* 6.0: Fix integration test gha Update RedisTrait.php Use static methods inside data providers [VarExporter] Fix exporting classes with __unserialize() but not __serialize() [Validator] Fix IBAN format for Tunisia and Mauritania [Workflow] Allow spaces in place names so the PUML dump doesn't break
2 parents 6382e76 + 72e2151 commit be82f92

File tree

22 files changed

+132
-42
lines changed

22 files changed

+132
-42
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
ports:
4949
- 16379:6379
5050
redis-cluster:
51-
image: grokzen/redis-cluster:5.0.4
51+
image: grokzen/redis-cluster:latest
5252
ports:
5353
- 7000:7000
5454
- 7001:7001

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi
202202
break;
203203
}
204204

205-
$sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout']);
205+
$sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::OPT_NULL_MULTIBULK_AS_NULL') ? [$params['auth'] ?? ''] : []);
206206

207207
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
208208
[$host, $port] = $address;
@@ -214,7 +214,10 @@ public static function createConnection(string $dsn, array $options = []): \Redi
214214
}
215215

216216
try {
217-
@$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') ? [['stream' => $params['ssl'] ?? null]] : []);
217+
@$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') ? [[
218+
'auth' => $params['auth'] ?? '',
219+
'stream' => $params['ssl'] ?? null,
220+
]] : []);
218221

219222
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
220223
try {

src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testIsFresh(callable $mockContainer, $expected)
5151
$this->assertSame($expected, $this->resourceChecker->isFresh($this->resource, time()));
5252
}
5353

54-
public function isFreshProvider()
54+
public static function isFreshProvider()
5555
{
5656
yield 'not fresh on missing parameter' => [function (MockObject $container) {
5757
$container->method('hasParameter')->with('locales')->willReturn(false);
@@ -62,11 +62,11 @@ public function isFreshProvider()
6262
}, false];
6363

6464
yield 'fresh on every identical parameters' => [function (MockObject $container) {
65-
$container->expects($this->exactly(2))->method('hasParameter')->willReturn(true);
66-
$container->expects($this->exactly(2))->method('getParameter')
65+
$container->expects(self::exactly(2))->method('hasParameter')->willReturn(true);
66+
$container->expects(self::exactly(2))->method('getParameter')
6767
->withConsecutive(
68-
[$this->equalTo('locales')],
69-
[$this->equalTo('default_locale')]
68+
[self::equalTo('locales')],
69+
[self::equalTo('default_locale')]
7070
)
7171
->willReturnMap([
7272
['locales', ['fr', 'en']],

src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
abstract class AbstractCrawlerTest extends TestCase
2121
{
22-
abstract public function getDoctype(): string;
22+
abstract public static function getDoctype(): string;
2323

2424
protected function createCrawler($node = null, string $uri = null, string $baseHref = null)
2525
{

src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class Html5ParserCrawlerTest extends AbstractCrawlerTest
1515
{
16-
public function getDoctype(): string
16+
public static function getDoctype(): string
1717
{
1818
return '<!DOCTYPE html>';
1919
}

src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class NativeParserCrawlerTest extends AbstractCrawlerTest
1515
{
16-
public function getDoctype(): string
16+
public static function getDoctype(): string
1717
{
1818
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
1919
}

src/Symfony/Component/Finder/Tests/GitignoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testToRegex(array $gitignoreLines, array $matchingCases, array $
5555
}
5656
}
5757

58-
public function provider(): array
58+
public static function provider(): array
5959
{
6060
$cases = [
6161
[
@@ -394,7 +394,7 @@ public function provider(): array
394394

395395
public function providerExtended(): array
396396
{
397-
$basicCases = $this->provider();
397+
$basicCases = self::provider();
398398

399399
$cases = [];
400400
foreach ($basicCases as $case) {

src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getAcceptData()
4141
];
4242

4343
return [
44-
[[new NumberComparator('< 1K'), new NumberComparator('> 0.5K')], $this->toAbsolute($lessThan1KGreaterThan05K)],
44+
[[new NumberComparator('< 1K'), new NumberComparator('> 0.5K')], self::toAbsolute($lessThan1KGreaterThan05K)],
4545
];
4646
}
4747
}

src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getNormalizedIniPostMaxSize(): string
6565
$this->request = null;
6666
}
6767

68-
public function methodExceptGetProvider()
68+
public static function methodExceptGetProvider()
6969
{
7070
return [
7171
['POST'],
@@ -79,7 +79,7 @@ public function methodProvider()
7979
{
8080
return array_merge([
8181
['GET'],
82-
], $this->methodExceptGetProvider());
82+
], self::methodExceptGetProvider());
8383
}
8484

8585
/**

src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function provideCompletionSuggestions(): iterable
206206

207207
yield 'form_type' => [
208208
[''],
209-
$this->getCoreTypes(),
209+
self::getCoreTypes(),
210210
];
211211

212212
yield 'option for FQCN' => [
@@ -258,7 +258,7 @@ public function provideCompletionSuggestions(): iterable
258258
];
259259
}
260260

261-
private function getCoreTypes(): array
261+
private static function getCoreTypes(): array
262262
{
263263
$coreExtension = new CoreExtension();
264264
$loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy