Skip to content

Deprecate user plainPassword in favor of using UserManipulator #1928

Deprecate user plainPassword in favor of using UserManipulator

Deprecate user plainPassword in favor of using UserManipulator #1928

Triggered via pull request March 6, 2024 19:26
Status Success
Total duration 2m 49s
Artifacts

continuous-integration.yml

on: pull_request
run  /  Generate test matrix
2s
run / Generate test matrix
Matrix: run / Code Coverage
Matrix: run / Coding Standards
Matrix: run / Lint composer.json
Matrix: run / Lint symfony container
Matrix: run / Mutation Tests
Matrix: run / Static Code Analysis
Matrix: run / Lint twig files
Matrix: run / Lint XLIFF files
Matrix: run / Lint YML files
Matrix: run / tests
Fit to window
Zoom out
Zoom in

Annotations

27 warnings
run / Lint composer.json (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint XLIFF files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint symfony container (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint twig files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Coding Standards (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Lint YML files (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 7.0, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 6.4, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 7.0, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 7.0, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Code Coverage (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.2, Symfony 6.4, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 6.4, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 6.4, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Test: PHP 8.3, Symfony 7.0, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Mutation Tests (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run / Mutation Tests (8.3): src/Action/CheckEmailAction.php#L54
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ public function __invoke(Request $request) : Response { $username = $request->query->get('username', ''); - if ('' === trim($username)) { + if ('' === $username) { // the user does not come from the sendEmail action return new RedirectResponse($this->urlGenerator->generate('nucleos_user_admin_resetting_request')); }
run / Mutation Tests (8.3): src/Action/CheckEmailAction.php#L63
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ // the user does not come from the sendEmail action return new RedirectResponse($this->urlGenerator->generate('nucleos_user_admin_resetting_request')); } - return new Response($this->twig->render('@NucleosUserAdmin/Admin/Security/Resetting/checkEmail.html.twig', ['base_template' => $this->templateRegistry->getTemplate('layout'), 'admin_pool' => $this->adminPool, 'tokenLifetime' => ceil($this->resetTtl / 3600)])); + return new Response($this->twig->render('@NucleosUserAdmin/Admin/Security/Resetting/checkEmail.html.twig', ['base_template' => $this->templateRegistry->getTemplate('layout'), 'admin_pool' => $this->adminPool, 'tokenLifetime' => ceil($this->resetTtl / 3599)])); } }
run / Mutation Tests (8.3): src/Action/CheckEmailAction.php#L63
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ // the user does not come from the sendEmail action return new RedirectResponse($this->urlGenerator->generate('nucleos_user_admin_resetting_request')); } - return new Response($this->twig->render('@NucleosUserAdmin/Admin/Security/Resetting/checkEmail.html.twig', ['base_template' => $this->templateRegistry->getTemplate('layout'), 'admin_pool' => $this->adminPool, 'tokenLifetime' => ceil($this->resetTtl / 3600)])); + return new Response($this->twig->render('@NucleosUserAdmin/Admin/Security/Resetting/checkEmail.html.twig', ['base_template' => $this->templateRegistry->getTemplate('layout'), 'admin_pool' => $this->adminPool, 'tokenLifetime' => ceil($this->resetTtl / 3601)])); } }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L109
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ return new RedirectResponse($this->router->generate('sonata_admin_dashboard')); } $event = new GetResponseLoginEvent($request); - $this->eventDispatcher->dispatch($event, NucleosUserEvents::SECURITY_LOGIN_INITIALIZE); + if (null !== $event->getResponse()) { return $event->getResponse(); }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L127
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $url = '' !== $refererUri && $refererUri !== $request->getUri() ? $refererUri : $this->router->generate('sonata_admin_dashboard'); return new RedirectResponse($url); } - $form = $this->formFactory->create(LoginFormType::class, null, ['action' => $this->router->generate('nucleos_user_admin_security_check'), 'method' => 'POST'])->add('save', SubmitType::class, ['label' => 'security.login.submit']); + $form = $this->formFactory->create(LoginFormType::class, null, ['action' => $this->router->generate('nucleos_user_admin_security_check'), 'method' => 'POST'])->add('save', SubmitType::class, []); // last username entered by the user return new Response($this->twig->render('@NucleosUserAdmin/Admin/Security/login.html.twig', ['form' => $form->createView(), 'admin_pool' => $this->adminPool, 'base_template' => $this->templateRegistry->getTemplate('layout'), 'csrf_token' => $this->getCsrfToken(), 'error' => $this->getLastAuthenticationError($request), 'last_username' => $this->getLastUsername($session), 'reset_route' => $this->router->generate('nucleos_user_admin_resetting_request')])); }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L165
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ // get the error if any (works with forward and redirect -- see below) if ($request->attributes->has($authErrorKey)) { $error = $request->attributes->get($authErrorKey); - } elseif (null !== $session && $session->has($authErrorKey)) { + } elseif (null !== $session || $session->has($authErrorKey)) { $error = $session->get($authErrorKey); $session->remove($authErrorKey); } else {
run / Mutation Tests (8.3): src/Action/LoginAction.php#L167
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $error = $request->attributes->get($authErrorKey); } elseif (null !== $session && $session->has($authErrorKey)) { $error = $session->get($authErrorKey); - $session->remove($authErrorKey); + } else { $error = null; }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L172
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } else { $error = null; } - if (!$error instanceof AuthenticationException) { + if (!true) { $error = null; // The value does not come from the security component. }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L198
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ return false; } $user = $token->getUser(); - return $user instanceof UserInterface; + return true; } private function getCsrfToken() : ?string {
run / Mutation Tests (8.3): src/Action/LoginAction.php#L208
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } private function addFlash(?SessionInterface $session, string $type, string $message) : void { - if (!$session instanceof Session) { + if (!true) { return; } $session->getFlashBag()->add($type, $message); } }
run / Static Code Analysis (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.