1 | <?php |
||
2 | |||
3 | use Anax\Route\Exception\ForbiddenException; |
||
0 ignored issues
–
show
|
|||
4 | use Anax\Route\Exception\InternalErrorException; |
||
0 ignored issues
–
show
The type
Anax\Route\Exception\InternalErrorException was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
5 | use Anax\Route\Exception\NotFoundException; |
||
0 ignored issues
–
show
The type
Anax\Route\Exception\NotFoundException was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
6 | |||
7 | /** |
||
8 | * Routes to ease testing. |
||
9 | */ |
||
10 | return [ |
||
11 | // Path where to mount the routes, is added to each route path. |
||
12 | "mount" => "test", |
||
13 | |||
14 | // All routes in order |
||
15 | "routes" => [ |
||
16 | [ |
||
17 | "info" => "Just say hi with a string.", |
||
18 | "path" => "hi", |
||
19 | "handler" => function () { |
||
20 | return "Hi."; |
||
21 | }, |
||
22 | ], |
||
23 | [ |
||
24 | "info" => "Say No! with status code 500.", |
||
25 | "path" => "no", |
||
26 | "handler" => function () { |
||
27 | return ["No!", 500]; |
||
28 | }, |
||
29 | ], |
||
30 | [ |
||
31 | "info" => "Say Hi through JSON.", |
||
32 | "path" => "json", |
||
33 | "handler" => function () { |
||
34 | return [["message" => "Hi JSON"]]; |
||
35 | }, |
||
36 | ], |
||
37 | [ |
||
38 | "info" => "Sample controller.", |
||
39 | "mount" => "controller", |
||
40 | "handler" => "\Anax\Controller\SampleController", |
||
41 | ], |
||
42 | [ |
||
43 | "info" => "Sample controller app style.", |
||
44 | "mount" => "appstyle", |
||
45 | "handler" => "\Anax\Controller\SampleAppController", |
||
46 | ], |
||
47 | [ |
||
48 | "info" => "Throw standard exception.", |
||
49 | "path" => "exception", |
||
50 | "handler" => function () { |
||
51 | throw new \Exception("Standard \Exception"); |
||
52 | }, |
||
53 | ], |
||
54 | [ |
||
55 | "info" => "Try internal 403.", |
||
56 | "path" => "403", |
||
57 | "handler" => function () { |
||
58 | throw new ForbiddenException("Detailed error message."); |
||
59 | }, |
||
60 | ], |
||
61 | [ |
||
62 | "info" => "Try internal 404.", |
||
63 | "path" => "404", |
||
64 | "handler" => function () { |
||
65 | throw new NotFoundException("Detailed error message."); |
||
66 | }, |
||
67 | ], |
||
68 | [ |
||
69 | "info" => "Try internal 500.", |
||
70 | "path" => "500", |
||
71 | "handler" => function () { |
||
72 | throw new InternalErrorException("Detailed error message."); |
||
73 | }, |
||
74 | ], |
||
75 | ] |
||
76 | ]; |
||
77 |
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