Slim 3 error on PHP 8.2

( ! ) Deprecated: Return type of Slim\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\Wamp\www\PHP\slim3\vendor\slim\slim\Slim\Collection.php on line *112*

Example:

<?php
require 'vendor/autoload.php';

$app = new \Slim\App();

$app->get('/', function (Request $req,  Response $res, $args = []) {
	return $res->withStatus(200)->write('Hello World');
});

See here: PHP 8.1 deprecated warnings for Slim 3.x · Issue #3234 · slimphp/Slim · GitHub