Skip to content

Commit 1cb88c4

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Fix some Composer keywords [FrameworkBundle] Rename limiter’s `strategy` to `policy` in XSD [VarDumper] Fixed dumping of CutStub Fix test Change limit argument from string to integer. [Messenger] Fix `evaluate()` calls in `WorkerTest` [Mailer] STDOUT blocks infinitely under Windows when STDERR is filled
2 parents b0054f6 + 8e5fd2f commit 1cb88c4

File tree

14 files changed

+49
-12
lines changed

14 files changed

+49
-12
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@
778778
<xsd:attribute name="lock-factory" type="xsd:string" />
779779
<xsd:attribute name="storage-service" type="xsd:string" />
780780
<xsd:attribute name="cache-pool" type="xsd:string" />
781-
<xsd:attribute name="strategy" type="xsd:string" />
781+
<xsd:attribute name="policy" type="xsd:string" />
782782
<xsd:attribute name="limit" type="xsd:int" />
783783
<xsd:attribute name="interval" type="xsd:string" />
784784
</xsd:complexType>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" ?>
2+
3+
<container xmlns="http://symfony.com/schema/dic/services"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:framework="http://symfony.com/schema/dic/symfony"
6+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
7+
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
8+
9+
<framework:config>
10+
<framework:rate-limiter>
11+
<framework:limiter
12+
name="sliding_window"
13+
policy="sliding_window"
14+
limit="30"
15+
lock-factory="null"
16+
/>
17+
</framework:rate-limiter>
18+
</framework:config>
19+
</container>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Config\FileLocator;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
17+
use Symfony\Component\RateLimiter\Policy\SlidingWindowLimiter;
1718

1819
class XmlFrameworkExtensionTest extends FrameworkExtensionTestCase
1920
{
@@ -66,4 +67,11 @@ public function testLegacyExceptionsConfig()
6667
'status_code' => 500,
6768
], $configuration[\Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException::class]);
6869
}
70+
71+
public function testRateLimiter()
72+
{
73+
$container = $this->createContainerFromFile('rate_limiter');
74+
75+
$this->assertTrue($container->hasDefinition('limiter.sliding_window'));
76+
}
6977
}

src/Symfony/Component/Console/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "symfony/console",
33
"type": "library",
44
"description": "Eases the creation of beautiful and testable command line interfaces",
5-
"keywords": ["console", "cli", "command line", "terminal"],
5+
"keywords": ["console", "cli", "command-line", "terminal"],
66
"homepage": "https://symfony.com",
77
"license": "MIT",
88
"authors": [

src/Symfony/Component/HttpClient/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "symfony/http-client",
33
"type": "library",
44
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
5+
"keywords": ["http"],
56
"homepage": "https://symfony.com",
67
"license": "MIT",
78
"authors": [

src/Symfony/Component/HttpKernel/Profiler/Profiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ public function purge()
121121
/**
122122
* Finds profiler tokens for the given criteria.
123123
*
124-
* @param string|null $limit The maximum number of tokens to return
124+
* @param int|null $limit The maximum number of tokens to return
125125
* @param string|null $start The start date to search from
126126
* @param string|null $end The end date to search to
127127
*
128128
* @see https://php.net/datetime.formats for the supported date/time formats
129129
*/
130-
public function find(?string $ip, ?string $url, ?string $limit, ?string $method, ?string $start, ?string $end, string $statusCode = null): array
130+
public function find(?string $ip, ?string $url, ?int $limit, ?string $method, ?string $start, ?string $end, string $statusCode = null): array
131131
{
132132
return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end), $statusCode);
133133
}

src/Symfony/Component/Ldap/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "symfony/ldap",
33
"type": "library",
44
"description": "Provides a LDAP client for PHP on top of PHP's ldap extension",
5-
"keywords": ["ldap", "active directory"],
5+
"keywords": ["ldap", "active-directory"],
66
"homepage": "https://symfony.com",
77
"license": "MIT",
88
"authors": [

src/Symfony/Component/Mailer/Transport/Smtp/Stream/ProcessStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function initialize(): void
3535
$descriptorSpec = [
3636
0 => ['pipe', 'r'],
3737
1 => ['pipe', 'w'],
38-
2 => ['pipe', 'w'],
38+
2 => ['pipe', '\\' === \DIRECTORY_SEPARATOR ? 'a' : 'w'],
3939
];
4040
$pipes = [];
4141
$this->stream = proc_open($this->command, $descriptorSpec, $pipes);

src/Symfony/Component/Messenger/Tests/WorkerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function testWorkerDispatchesEventsOnSuccess()
206206
$eventDispatcher->expects($this->exactly(5))
207207
->method('dispatch')
208208
->willReturnCallback(function ($event) use (&$series) {
209-
array_shift($series)->evaluate($event, '', true);
209+
array_shift($series)->evaluate($event);
210210

211211
if ($event instanceof WorkerRunningEvent) {
212212
$event->getWorker()->stop();
@@ -260,7 +260,7 @@ public function testWorkerDispatchesEventsOnError()
260260
$eventDispatcher->expects($this->exactly(5))
261261
->method('dispatch')
262262
->willReturnCallback(function ($event) use (&$series) {
263-
array_shift($series)->evaluate($event, '', true);
263+
array_shift($series)->evaluate($event);
264264

265265
if ($event instanceof WorkerRunningEvent) {
266266
$event->getWorker()->stop();

src/Symfony/Component/PropertyAccess/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "symfony/property-access",
33
"type": "library",
44
"description": "Provides functions to read and write from/to an object or array using a simple string notation",
5-
"keywords": ["property", "index", "access", "object", "array", "extraction", "injection", "reflection", "property path"],
5+
"keywords": ["property", "index", "access", "object", "array", "extraction", "injection", "reflection", "property-path"],
66
"homepage": "https://symfony.com",
77
"license": "MIT",
88
"authors": [

0 commit comments

Comments
 (0)