File tree 3 files changed +3
-32
lines changed
3 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -40,21 +40,3 @@ parameters:
40
40
count : 1
41
41
path : tests/DependencyInjection/ConfigurationTest.php
42
42
43
- -
44
- message : """
45
- #^Fetching deprecated class constant MASTER_REQUEST of class Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:
46
- since symfony/http\\-kernel 5\\.3, use MAIN_REQUEST instead\\.
47
- To ease the migration, this constant won't be removed until Symfony 7\\.0\\.$#
48
- """
49
- count : 1
50
- path : tests/Listener/ListenerTestCase.php
51
-
52
- -
53
- message : """
54
- #^Fetching deprecated class constant MASTER_REQUEST of class Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelInterface\\:
55
- since symfony/http\\-kernel 5\\.3, use MAIN_REQUEST instead\\.
56
- To ease the migration, this constant won't be removed until Symfony 7\\.0\\.$#
57
- """
58
- count : 1
59
- path : tests/Twig/IntegrationTest.php
60
-
Original file line number Diff line number Diff line change @@ -78,9 +78,6 @@ private function getRequestType(bool $mainRequest): int
78
78
return HttpKernelInterface::SUB_REQUEST ;
79
79
}
80
80
81
- return \defined (HttpKernelInterface::class.'::MAIN_REQUEST ' )
82
- ? HttpKernelInterface::MAIN_REQUEST
83
- : HttpKernelInterface::MASTER_REQUEST
84
- ;
81
+ return HttpKernelInterface::MAIN_REQUEST ;
85
82
}
86
83
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function testItWorksDynamically(): void
64
64
$ listener ->onKernelRequest (new RequestEvent (
65
65
$ this ->createStub (HttpKernelInterface::class),
66
66
Request::create ('/ ' ),
67
- $ this -> getMasterRequestType ()
67
+ HttpKernelInterface:: MAIN_REQUEST
68
68
));
69
69
70
70
$ this ->assertSame ('<script type="text/javascript">console.log( \'123456 \');</script>
@@ -113,7 +113,7 @@ public function testItWorksStatically(): void
113
113
$ listener ->onKernelRequest (new RequestEvent (
114
114
$ this ->createStub (HttpKernelInterface::class),
115
115
Request::create ('/ ' ),
116
- $ this -> getMasterRequestType ()
116
+ HttpKernelInterface:: MAIN_REQUEST
117
117
));
118
118
119
119
$ this ->assertSame ('<script type="text/javascript">console.log( \'Hello \');</script>
@@ -127,12 +127,4 @@ public function testItWorksStatically(): void
127
127
128
128
$ this ->assertSame (['script-src ' => ['sha-script ' ], 'style-src ' => ['sha-style ' ]], $ getSha ($ listener ));
129
129
}
130
-
131
- private function getMasterRequestType (): int
132
- {
133
- return \defined (HttpKernelInterface::class.'::MAIN_REQUEST ' )
134
- ? HttpKernelInterface::MAIN_REQUEST
135
- : HttpKernelInterface::MASTER_REQUEST
136
- ;
137
- }
138
130
}
You can’t perform that action at this time.
0 commit comments