Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit19682cb

Browse files
committed
[FrameworkBundle] use service() in route condition
1 parent78ad4b9 commit19682cb

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" ?>
22

33
<containerxmlns="http://symfony.com/schema/dic/services"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
66

77
<parameters>
88
<parameterkey="router.request_context.host">localhost</parameter>
@@ -79,6 +79,15 @@
7979
</argument>
8080
</service>
8181
</argument>
82+
<argumenttype="service"key="service">
83+
<serviceclass="Closure">
84+
<factoryclass="Closure"method="fromCallable" />
85+
<argumenttype="collection">
86+
<argumenttype="service"id="service_container" />
87+
<argument>get</argument>
88+
</argument>
89+
</service>
90+
</argument>
8291
</argument>
8392
</argument>
8493
<callmethod="setConfigCacheFactory">
@@ -132,6 +141,7 @@
132141
<serviceid="Symfony\Component\Routing\Matcher\ExpressionLanguageProvider">
133142
<argumenttype="collection">
134143
<argument>env</argument>
144+
<argument>service</argument>
135145
</argument>
136146
<tagname="routing.expression_language_provider" />
137147
</service>

‎src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ExpressionLanguageTest extends TestCase
2121
private$context;
2222
private$expressionLanguage;
2323

24-
publicfunctionsetUp():void
24+
protectedfunctionsetUp():void
2525
{
2626
$this->context =newRequestContext();
2727
$this->context->setParameter('_functions', [
@@ -71,7 +71,7 @@ public function testEvaluate(string $expression, $expected)
7171
$this->assertSame($expected,$this->expressionLanguage->evaluate($expression, ['context' =>$this->context]));
7272
}
7373

74-
publicfunctionevaluateProvider():array
74+
publicfunctionevaluateProvider():iterable
7575
{
7676
return [
7777
['env("APP_ENV")','test'],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp