jdecool/scaleway-runtimepublic Fork
⑂ 9c6aeb9
Commits
⬇ Clone ▾
git clone https://git.rickub.com/jdecool/scaleway-runtime.git
git clone ssh://git@rickub.com/jdecool/scaleway-runtime.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

fix: pass the Invocation's Request to Response Front Controllers on Symfony 7.4 and 8.0Unverified

resolveType() only exists from symfony/runtime 8.1, so on older lines the
override was never called and the closure got a Request built once from the
CLI globals. getArgument() has the same signature on every supported line.
Jérémy DECOOL committed 2026-11-13T22:41:08+01:00 Browse files
9c6aeb9 parent: 637e0aa
modified src/ScalewayRuntime.php +4 -3
@@ -96,9 +96,10 @@ class ScalewayRuntime extends SymfonyRuntime
9696 };
9797 }
9898
99- protected function resolveType(string $type): mixed
99+ protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
100100 {
101- // SymfonyRuntime builds it from PHP globals, which never describe an Invocation.
102- return Request::class === $type ? $this->request : parent::resolveType($type);
101+ // SymfonyRuntime builds it from PHP globals, which never describe an Invocation; resolveType()
102+ // would be the narrower hook but only exists from symfony/runtime 8.1.
103+ return Request::class === $type ? $this->request : parent::getArgument($parameter, $type);
103104 }
104105 }
@@ -96,9 +96,10 @@ class ScalewayRuntime extends SymfonyRuntime
96 };96 };
97 }97 }
98 98
99- protected function resolveType(string $type): mixed99+ protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
100 {100 {
101- // SymfonyRuntime builds it from PHP globals, which never describe an Invocation.101+ // SymfonyRuntime builds it from PHP globals, which never describe an Invocation; resolveType()
102- return Request::class === $type ? $this->request : parent::resolveType($type);102+ // would be the narrower hook but only exists from symfony/runtime 8.1.
103+ return Request::class === $type ? $this->request : parent::getArgument($parameter, $type);
103 }104 }
104 }105 }