1 | <?php |
||
2 | |||
3 | namespace App\Controller; |
||
4 | |||
5 | use PhpXmlRpc\PhpXmlRpc; |
||
6 | use PhpXmlRpc\Server; |
||
7 | use Psr\Log\LoggerInterface; |
||
0 ignored issues
–
show
|
|||
8 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
||
0 ignored issues
–
show
The type
Symfony\Bundle\Framework...ller\AbstractController 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 ![]() |
|||
9 | use Symfony\Component\HttpFoundation\Response; |
||
0 ignored issues
–
show
The type
Symfony\Component\HttpFoundation\Response 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 ![]() |
|||
10 | use Symfony\Component\Routing\Annotation\Route; |
||
0 ignored issues
–
show
The type
Symfony\Component\Routing\Annotation\Route 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 ![]() |
|||
11 | |||
12 | class ServerController extends AbstractController |
||
13 | { |
||
14 | protected $server; |
||
15 | |||
16 | public function __construct(Server $server, LoggerInterface $logger = null) |
||
17 | { |
||
18 | $this->server = $server; |
||
19 | if ($logger) { |
||
20 | PhpXmlRpc::setLogger($logger); |
||
21 | } |
||
22 | } |
||
23 | |||
24 | # This single method serves ALL the xml-rpc requests. |
||
25 | # The configuration for which xml-rpc methods exist and how they are handled is carried out in the service definition |
||
26 | # of the Server in the constructor |
||
27 | #[Route('/xmlrpc', name: 'xml_rpc', methods: ['POST'])] |
||
28 | public function serve(): Response |
||
29 | { |
||
30 | $xmlrpcResponse = $this->server->service(null, true); |
||
31 | $response = new Response($xmlrpcResponse, 200, ['Content-Type' => 'text/xml']); |
||
32 | // there should be no need to disable response caching since this is only accessed via POST |
||
33 | return $response; |
||
34 | } |
||
35 | } |
||
36 |
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