Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 307ff44

Browse filesBrowse 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 94dd873 + e0c7f0e commit 307ff44
Copy full SHA for 307ff44

File tree

Expand file treeCollapse file tree

3 files changed

+28
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+28
-1
lines changed

‎Resources/config/schema/symfony-1.0.xsd

Copy file name to clipboardExpand all lines: Resources/config/schema/symfony-1.0.xsd
+1-1Lines 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>
+19Lines 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>

‎Tests/DependencyInjection/XmlFrameworkExtensionTest.php

Copy file name to clipboardExpand all lines: Tests/DependencyInjection/XmlFrameworkExtensionTest.php
+8Lines 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
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.