diff --git a/Admin/SecuritytxtAdmin.php b/Admin/SecuritytxtAdmin.php index 632814a..be2fff3 100644 --- a/Admin/SecuritytxtAdmin.php +++ b/Admin/SecuritytxtAdmin.php @@ -26,7 +26,7 @@ class SecuritytxtAdmin extends Admin final public const SYSTEM = 'BitExpert'; final public const SECURITY_CONTEXT = 'bitexpert.securitytxt'; final public const SECURITYTXT_LIST_KEY = 'securitytxt'; - final public const SECURITYTXT_LIST_VIEW = 'app.securitytxt_list'; + final public const SECURITYTXT_LIST_VIEW = 'bitexpert.securitytxt_list'; public function __construct( private readonly ViewBuilderFactoryInterface $viewBuilderFactory, diff --git a/BitExpertSuluSecuritytxtBundle.php b/BitExpertSuluSecuritytxtBundle.php index 67a0e39..4e8dc29 100644 --- a/BitExpertSuluSecuritytxtBundle.php +++ b/BitExpertSuluSecuritytxtBundle.php @@ -11,7 +11,6 @@ namespace BitExpert\Sulu\SecuritytxtBundle; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; class BitExpertSuluSecuritytxtBundle extends Bundle diff --git a/Controller/Admin/SecuritytxtAdminController.php b/Controller/Admin/SecuritytxtAdminController.php index 7d4965d..b801c66 100644 --- a/Controller/Admin/SecuritytxtAdminController.php +++ b/Controller/Admin/SecuritytxtAdminController.php @@ -40,7 +40,7 @@ public function __construct( ) { } - #[Route(path: 'securitytxt/{id}', name: 'app.get_securitytxt', methods: ['GET'])] + #[Route(path: 'securitytxt/{id}', name: 'bitexpert.get_securitytxt', methods: ['GET'])] public function getAction(int $id): Response { $entity = $this->repository->findById($id); @@ -51,7 +51,7 @@ public function getAction(int $id): Response return $this->json($this->getDataForEntity($entity)); } - #[Route(path: 'securitytxt/{id}', name: 'app.put_securitytxt', methods: ['PUT'])] + #[Route(path: 'securitytxt/{id}', name: 'bitexpert.put_securitytxt', methods: ['PUT'])] public function putAction(int $id, Request $request): Response { $entity = $this->repository->findById($id); @@ -68,7 +68,7 @@ public function putAction(int $id, Request $request): Response return $this->json($this->getDataForEntity($entity)); } - #[Route(path: 'securitytxt', name: 'app.post_securitytxt', methods: ['POST'])] + #[Route(path: 'securitytxt', name: 'bitexpert.post_securitytxt', methods: ['POST'])] public function postAction(Request $request): Response { $entity = $this->repository->create(); @@ -83,7 +83,7 @@ public function postAction(Request $request): Response return $this->json($this->getDataForEntity($entity), 201); } - #[Route(path: 'securitytxt/{id}', name: 'app.delete_securitytxt', methods: ['DELETE'])] + #[Route(path: 'securitytxt/{id}', name: 'bitexpert.delete_securitytxt', methods: ['DELETE'])] public function deleteAction(int $id): Response { $this->repository->remove($id); @@ -91,7 +91,7 @@ public function deleteAction(int $id): Response return $this->json(null, 204); } - #[Route(path: 'securitytxt', name: 'app.get_securitytxt_list', methods: ['GET'])] + #[Route(path: 'securitytxt', name: 'bitexpert.get_securitytxt_list', methods: ['GET'])] public function getListAction(): Response { $listRepresentation = $this->doctrineListRepresentationFactory->createDoctrineListRepresentation( diff --git a/DependencyInjection/BitExpertSuluSecuritytxtExtension.php b/DependencyInjection/BitExpertSuluSecuritytxtExtension.php index 5457b23..55ccd37 100644 --- a/DependencyInjection/BitExpertSuluSecuritytxtExtension.php +++ b/DependencyInjection/BitExpertSuluSecuritytxtExtension.php @@ -38,8 +38,8 @@ public function prepend(ContainerBuilder $container): void 'resources' => [ 'securitytxt' => [ 'routes' => [ - 'list' => 'app.get_securitytxt_list', - 'detail' => 'app.get_securitytxt', + 'list' => 'bitexpert.get_securitytxt_list', + 'detail' => 'bitexpert.get_securitytxt', ], ], ], diff --git a/Resources/config/packages/securitytxt.yaml b/Resources/config/packages/securitytxt.yaml index dadd080..583bfaf 100644 --- a/Resources/config/packages/securitytxt.yaml +++ b/Resources/config/packages/securitytxt.yaml @@ -2,5 +2,5 @@ sulu_admin: resources: securitytxt: routes: - list: app.get_securitytxt_list - detail: app.get_securitytxt + list: bitexpert.get_securitytxt_list + detail: bitexpert.get_securitytxt diff --git a/phpstan.neon b/phpstan.neon index 80467c7..0580baa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,3 +11,6 @@ parameters: - Repository ignoreErrors: - "#Casting to int something that\\'s already int.#" + - + message: "#::getSecurityContexts\\(\\) should return array#" + path: Admin/SecuritytxtAdmin.php