@@ -71,6 +71,7 @@ public function __construct($container = [])
7171 *
7272 * @return ContainerInterface
7373 */
74+ #[\ReturnTypeWillChange]
7475 public function getContainer ()
7576 {
7677 return $ this ->container ;
@@ -85,6 +86,7 @@ public function getContainer()
8586 *
8687 * @return static
8788 */
89+ #[\ReturnTypeWillChange]
8890 public function add ($ callable )
8991 {
9092 return $ this ->addMiddleware (new DeferredCallable ($ callable , $ this ->container ));
@@ -101,6 +103,7 @@ public function add($callable)
101103 *
102104 * @throws BadMethodCallException
103105 */
106+ #[\ReturnTypeWillChange]
104107 public function __call ($ method , $ args )
105108 {
106109 if ($ this ->container ->has ($ method )) {
@@ -121,6 +124,7 @@ public function __call($method, $args)
121124 *
122125 * @return RouteInterface
123126 */
127+ #[\ReturnTypeWillChange]
124128 public function get ($ pattern , $ callable )
125129 {
126130 return $ this ->map (['GET ' ], $ pattern , $ callable );
@@ -134,6 +138,7 @@ public function get($pattern, $callable)
134138 *
135139 * @return RouteInterface
136140 */
141+ #[\ReturnTypeWillChange]
137142 public function post ($ pattern , $ callable )
138143 {
139144 return $ this ->map (['POST ' ], $ pattern , $ callable );
@@ -147,6 +152,7 @@ public function post($pattern, $callable)
147152 *
148153 * @return RouteInterface
149154 */
155+ #[\ReturnTypeWillChange]
150156 public function put ($ pattern , $ callable )
151157 {
152158 return $ this ->map (['PUT ' ], $ pattern , $ callable );
@@ -160,6 +166,7 @@ public function put($pattern, $callable)
160166 *
161167 * @return RouteInterface
162168 */
169+ #[\ReturnTypeWillChange]
163170 public function patch ($ pattern , $ callable )
164171 {
165172 return $ this ->map (['PATCH ' ], $ pattern , $ callable );
@@ -173,6 +180,7 @@ public function patch($pattern, $callable)
173180 *
174181 * @return RouteInterface
175182 */
183+ #[\ReturnTypeWillChange]
176184 public function delete ($ pattern , $ callable )
177185 {
178186 return $ this ->map (['DELETE ' ], $ pattern , $ callable );
@@ -186,6 +194,7 @@ public function delete($pattern, $callable)
186194 *
187195 * @return RouteInterface
188196 */
197+ #[\ReturnTypeWillChange]
189198 public function options ($ pattern , $ callable )
190199 {
191200 return $ this ->map (['OPTIONS ' ], $ pattern , $ callable );
@@ -199,6 +208,7 @@ public function options($pattern, $callable)
199208 *
200209 * @return RouteInterface
201210 */
211+ #[\ReturnTypeWillChange]
202212 public function any ($ pattern , $ callable )
203213 {
204214 return $ this ->map (['GET ' , 'POST ' , 'PUT ' , 'PATCH ' , 'DELETE ' , 'OPTIONS ' ], $ pattern , $ callable );
@@ -213,6 +223,7 @@ public function any($pattern, $callable)
213223 *
214224 * @return RouteInterface
215225 */
226+ #[\ReturnTypeWillChange]
216227 public function map (array $ methods , $ pattern , $ callable )
217228 {
218229 if ($ callable instanceof Closure) {
@@ -240,6 +251,7 @@ public function map(array $methods, $pattern, $callable)
240251 *
241252 * @return RouteInterface
242253 */
254+ #[\ReturnTypeWillChange]
243255 public function redirect ($ from , $ to , $ status = 302 )
244256 {
245257 $ handler = function ($ request , ResponseInterface $ response ) use ($ to , $ status ) {
@@ -261,6 +273,7 @@ public function redirect($from, $to, $status = 302)
261273 *
262274 * @return RouteGroupInterface
263275 */
276+ #[\ReturnTypeWillChange]
264277 public function group ($ pattern , $ callable )
265278 {
266279 /** @var RouterInterface $router */
@@ -288,6 +301,7 @@ public function group($pattern, $callable)
288301 * @throws Exception
289302 * @throws Throwable
290303 */
304+ #[\ReturnTypeWillChange]
291305 public function run ($ silent = false )
292306 {
293307 $ response = $ this ->container ->get ('response ' );
@@ -338,6 +352,7 @@ public function run($silent = false)
338352 *
339353 * @throws ContainerException
340354 */
355+ #[\ReturnTypeWillChange]
341356 protected function processInvalidMethod (ServerRequestInterface $ request , ResponseInterface $ response )
342357 {
343358 $ router = $ this ->container ->get ('router ' );
@@ -373,6 +388,7 @@ protected function processInvalidMethod(ServerRequestInterface $request, Respons
373388 * @throws Exception
374389 * @throws Throwable
375390 */
391+ #[\ReturnTypeWillChange]
376392 public function process (ServerRequestInterface $ request , ResponseInterface $ response )
377393 {
378394 // Ensure basePath is set
@@ -404,6 +420,7 @@ public function process(ServerRequestInterface $request, ResponseInterface $resp
404420 *
405421 * @param ResponseInterface $response
406422 */
423+ #[\ReturnTypeWillChange]
407424 public function respond (ResponseInterface $ response )
408425 {
409426 // Send response
@@ -484,6 +501,7 @@ public function respond(ResponseInterface $response)
484501 * @throws MethodNotAllowedException
485502 * @throws NotFoundException
486503 */
504+ #[\ReturnTypeWillChange]
487505 public function __invoke (ServerRequestInterface $ request , ResponseInterface $ response )
488506 {
489507 // Get the route info
@@ -540,6 +558,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res
540558 * @throws MethodNotAllowedException
541559 * @throws NotFoundException
542560 */
561+ #[\ReturnTypeWillChange]
543562 public function subRequest (
544563 $ method ,
545564 $ path ,
@@ -573,6 +592,7 @@ public function subRequest(
573592 *
574593 * @return ServerRequestInterface
575594 */
595+ #[\ReturnTypeWillChange]
576596 protected function dispatchRouterAndPrepareRoute (ServerRequestInterface $ request , RouterInterface $ router )
577597 {
578598 $ routeInfo = $ router ->dispatch ($ request );
@@ -604,6 +624,7 @@ protected function dispatchRouterAndPrepareRoute(ServerRequestInterface $request
604624 *
605625 * @throws RuntimeException
606626 */
627+ #[\ReturnTypeWillChange]
607628 protected function finalize (ResponseInterface $ response )
608629 {
609630 // stop PHP sending a Content-Type automatically
@@ -645,6 +666,7 @@ protected function finalize(ResponseInterface $response)
645666 *
646667 * @return bool
647668 */
669+ #[\ReturnTypeWillChange]
648670 protected function isEmptyResponse (ResponseInterface $ response )
649671 {
650672 if (method_exists ($ response , 'isEmpty ' )) {
@@ -661,6 +683,7 @@ protected function isEmptyResponse(ResponseInterface $response)
661683 *
662684 * @return bool
663685 */
686+ #[\ReturnTypeWillChange]
664687 protected function isHeadRequest (RequestInterface $ request )
665688 {
666689 $ method = $ request ->getMethod ();
@@ -679,6 +702,7 @@ protected function isHeadRequest(RequestInterface $request)
679702 *
680703 * @throws Exception If a handler is needed and not found
681704 */
705+ #[\ReturnTypeWillChange]
682706 protected function handleException (Exception $ e , ServerRequestInterface $ request , ResponseInterface $ response )
683707 {
684708 if ($ e instanceof MethodNotAllowedException) {
@@ -718,6 +742,7 @@ protected function handleException(Exception $e, ServerRequestInterface $request
718742 *
719743 * @throws Throwable
720744 */
745+ #[\ReturnTypeWillChange]
721746 protected function handlePhpError (Throwable $ e , ServerRequestInterface $ request , ResponseInterface $ response )
722747 {
723748 $ handler = 'phpErrorHandler ' ;
0 commit comments