1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace Antidot\React\PSR15\Middleware; |
||||
6 | |||||
7 | use Antidot\React\PSR15\Response\PromiseResponse; |
||||
8 | use Psr\Http\Message\ResponseInterface; |
||||
9 | use Psr\Http\Message\ServerRequestInterface; |
||||
10 | use Psr\Http\Server\MiddlewareInterface; |
||||
11 | use Psr\Http\Server\RequestHandlerInterface; |
||||
12 | use React\Promise\FulfilledPromise; |
||||
13 | use Zend\Diactoros\Response\HtmlResponse; |
||||
0 ignored issues
–
show
|
|||||
14 | |||||
15 | final class RouteNotFoundMiddleware implements MiddlewareInterface |
||||
16 | { |
||||
17 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||||
18 | { |
||||
19 | $promise = new FulfilledPromise(); |
||||
0 ignored issues
–
show
The class
React\Promise\FulfilledPromise has been deprecated: 2.8.0 External usage of FulfilledPromise is deprecated, use `resolve()` instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
20 | |||||
21 | return new PromiseResponse($promise->then(function () { |
||||
22 | return new HtmlResponse('<html><head></head><body>Page not found</body></html>', 404); |
||||
23 | })); |
||||
24 | } |
||||
25 | } |
||||
26 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths