Your project controllers should only contains actions as public methods
- Read doc
- Productivity
- Major
More information: https://insight.symfony.com/what-we-analyse/symfony.controller.non_action_public_method_in_controller_class
- private EntityManagerInterface $em,
- ) {
- $this->config = $config;
- }
- #[Route('/refresh-cache')]
- public function refreshCache(): Response
- {
- $this->denyAccessUnlessGranted('ROLE_CONFIG_REFRESH_CACHE');
- $configs = $this->em->getRepository(ConfigInterface::class)
2le