Your project should use Doctrine migrations

More information: https://insight.symfony.com/what-we-analyse/composer.using_migrations

Use Doctrine Migrations to keep your production database synchronized

Time to fix: about 1 hour
Read doc Open Issue Permalink
Collective

Your project controllers should only contains actions as public methods 12

More information: https://insight.symfony.com/what-we-analyse/symfony.controller.non_action_public_method_in_controller_class

  1. $entityManager->getFilters()->disable('softdeleteable');
  2. // @codeCoverageIgnoreEnd
  3. }
  4. }
  5. public function configureFilters(Filters $filters): Filters

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. $filters->add(
  8. SoftDeleteFilter::new(
  9. 'deletedAt',
  10. $this->translator->trans('enabel_user.admin.form.showDeleted')
  1. );
  2. return parent::configureFilters($filters);
  3. }
  4. public function configureCrud(Crud $crud): Crud

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  5. {
  6. return $crud
  7. ->setPageTitle(Crud::PAGE_INDEX, 'enabel_user.admin.title.manage_users')
  8. ->setPageTitle(Crud::PAGE_NEW, 'enabel_user.admin.title.new_user')
  9. ->setPageTitle(Crud::PAGE_EDIT, 'enabel_user.admin.title.edit_user')
  1. ->setSearchFields(['id', 'email', 'displayName'])
  2. ->setEntityPermission(User::ADMIN)
  3. ;
  4. }
  5. public function configureActions(Actions $actions): Actions

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. $actions = parent::configureActions($actions);
  8. /** @var User $currentUser */
  9. $currentUser = $this->getUser();
  1. }
  2. /**
  3. * @return iterable<FieldInterface>
  4. */
  5. public function configureFields(string $pageName): iterable

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. /** @var User $currentUser */
  8. $currentUser = $this->getUser();
  9. /** @var AdminContext $context */
  10. $context = $this->adminContextProvider->getContext();
  1. /**
  2. * @param EntityManagerInterface $entityManager
  3. * @param User $entityInstance
  4. */
  5. public function persistEntity(EntityManagerInterface $entityManager, $entityInstance): void

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. /** @var UserPasswordHasherInterface $hasher */
  8. $hasher = $this->container->get('security.password_hasher');
  9. $plainPassword = $entityInstance->getPlainPassword();
  10. if ($plainPassword !== null) {
  1. /**
  2. * @param EntityManagerInterface $entityManager
  3. * @param User $entityInstance
  4. */
  5. public function updateEntity(EntityManagerInterface $entityManager, $entityInstance): void

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. /** @var UserPasswordHasherInterface $hasher */
  8. $hasher = $this->container->get('security.password_hasher');
  9. $plainPassword = $entityInstance->getPlainPassword();
  10. if ($plainPassword !== null) {
  1. $entityInstance->setPassword($password);
  2. }
  3. parent::updateEntity($entityManager, $entityInstance);
  4. }
  5. public function impersonate(AdminContext $context): RedirectResponse

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. {
  7. if (!$this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
  8. throw new HttpException(Response::HTTP_UNAUTHORIZED);
  9. }
  1. }
  2. return new RedirectResponse($referer);
  3. }
  4. public function restoreUser(AdminContext $context): Response

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  5. {
  6. if (!$this->isGranted('ROLE_SUPER_ADMIN')) {
  7. throw new HttpException(Response::HTTP_UNAUTHORIZED);
  8. }
  1. use Symfony\Component\HttpFoundation\RedirectResponse;
  2. use Symfony\Component\Routing\Annotation\Route;
  3. class AzureController extends AbstractController
  4. {
  5. #[Route(path: '/azure/login', name: 'enabel_azure_login')]

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. public function azureLogin(ClientRegistry $clientRegistry): RedirectResponse
  7. {
  8. return $clientRegistry
  9. ->getClient('azure_o365')
  10. ->redirect(
  1. []
  2. );
  3. }
  4. /** @codeCoverageIgnore */
  5. #[Route(path: '/azure/check', name: 'enabel_azure_check')]

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. public function azureCheck(): void
  7. {
  8. throw new \LogicException('This method can be blank - Intercepted by the oauth2 client');
  9. }
  10. }
  1. use Symfony\Component\Routing\Annotation\Route;
  2. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  3. class LocalController extends AbstractController
  4. {
  5. #[Route(path: '/auth/login', name: 'enabel_login')]

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. public function login(AuthenticationUtils $authenticationUtils, ParameterBagInterface $parameterBag): Response
  7. {
  8. if (null !== $this->getUser()) {
  9. /** @var string $defaultTarget */
  10. $defaultTarget = $parameterBag->get('enabel_user.login_redirect_route');
  1. }
  2. /**
  3. * @return never
  4. */
  5. #[Route(path: '/auth/logout', name: 'enabel_logout')]

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  6. public function logout(): Response
  7. {
  8. throw new \LogicException('This method can be blank - Intercepted by the logout key on your firewall.');
  9. }
  10. }

Text files should end with a valid new line character. 7

More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l

  1. - uses: actions/checkout@v3
  2. - uses: actions/setup-python@v4
  3. with:
  4. python-version: 3.x
  5. - run: pip install mkdocs
  6. - run: mkdocs gh-deploy --force

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
in .gitignore, line 4
  1. vendor/
  2. composer.lock
  3. .phpunit.result.cache
  4. /site

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
in CONTRIBUTING.md, line 55
  1. - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
  2. - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
  3. **Happy coding**!

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
in config/routes.yaml, line 3
  1. enabel_user:
  2. resource: "../src/Controller/"
  3. type: attribute

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
in docs/authentication.md, line 135
  1. | displayName | JWT | user.displayname |
  2. | employeeId | JWT | user.employeeid |
  3. | jobTitle | JWT | user.jobtitle |
  4. | language | JWT | user.preferredlanguage |
  5. 7. That's it, you will now be able to connect with your Azure account.

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
in docs/easyadmin.md, line 27
  1. {
  2. ...
  3. yield from $this->userMenuEntry();
  4. ...
  5. ```

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae
  1. title:
  2. edit_user: 'Edit a user'
  3. manage_users: 'Manage users'
  4. new_user: 'Add a user'
  5. user: User
  6. users: Users

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Read doc Open Issue Permalink
    Last edited by Damien Lagae