Skip to content

Commit 46e66e8

Browse files
committed
Fixed deprecation warnings about passing null as parameter
1 parent 0cc7b69 commit 46e66e8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

DependencyInjection/RegisterControllerArgumentLocatorsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function process(ContainerBuilder $container)
124124
$args = [];
125125
foreach ($parameters as $p) {
126126
/** @var \ReflectionParameter $p */
127-
$type = ltrim($target = ProxyHelper::getTypeHint($r, $p), '\\');
127+
$type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\');
128128
$invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
129129

130130
if (isset($arguments[$r->name][$p->name])) {

EventListener/RouterListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static function getSubscribedEvents()
164164
private function createWelcomeResponse(): Response
165165
{
166166
$version = Kernel::VERSION;
167-
$projectDir = realpath($this->projectDir).\DIRECTORY_SEPARATOR;
167+
$projectDir = realpath((string) $this->projectDir).\DIRECTORY_SEPARATOR;
168168
$docVersion = substr(Kernel::VERSION, 0, 3);
169169

170170
ob_start();

Tests/HttpCache/HttpCacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ public function testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag()
212212

213213
public function testValidatesPrivateResponsesCachedOnTheClient()
214214
{
215-
$this->setNextResponse(200, [], '', function ($request, $response) {
216-
$etags = preg_split('/\s*,\s*/', $request->headers->get('IF_NONE_MATCH'));
215+
$this->setNextResponse(200, [], '', function (Request $request, $response) {
216+
$etags = preg_split('/\s*,\s*/', $request->headers->get('IF_NONE_MATCH', ''));
217217
if ($request->cookies->has('authenticated')) {
218218
$response->headers->set('Cache-Control', 'private, no-store');
219219
$response->setETag('"private tag"');

0 commit comments

Comments
 (0)