Skip to content

Add functional tests for all actions #2364

Add functional tests for all actions

Add functional tests for all actions #2364

Triggered via pull request March 10, 2024 12:17
Status Failure
Total duration 1m 24s
Artifacts

continuous-integration.yml

on: pull_request
run  /  Generate test matrix
4s
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

8 errors and 27 warnings
run / Lint twig files (8.3)
Process completed with exit code 255.
run / Lint symfony container (8.3)
Process completed with exit code 255.
run / Lint YML files (8.3)
Process completed with exit code 255.
run / Static Code Analysis (8.3)
<error>Child process error</error> (exit code 255): PHP Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62 Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62
run / Static Code Analysis (8.3)
<error>Child process error</error> (exit code 255): PHP Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62 Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62
run / Static Code Analysis (8.3)
<error>Child process error</error> (exit code 255): PHP Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62 Fatal error: Declaration of PHPStan\Doctrine\Mapping\ClassMetadataFactory::newClassMetadataInstance($className) must be compatible with Doctrine\ORM\Mapping\ClassMetadataFactory::newClassMetadataInstance(string $className): Doctrine\ORM\Mapping\ClassMetadata in /home/runner/work/NucleosUserBundle/NucleosUserBundle/vendor-bin/tools/vendor/phpstan/phpstan-doctrine/src/Doctrine/Mapping/ClassMetadataFactory.php on line 62
run / Static Code Analysis (8.3)
Process completed with exit code 2.
run / Lint XLIFF files (8.3)
Process completed with exit code 255.
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 / 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 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 / 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/.
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 / 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 / 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 / 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.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.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.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 / 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 / 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 / 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 / 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.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 / 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/AccountDeletionAction.php#L69
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ public function __invoke(Request $request) : Response { $user = $this->getUser(); - if (!$user instanceof UserInterface) { + if (!true) { throw new AccessDeniedException('Access Denied.'); } $event = new GetResponseAccountDeletionEvent($user, $request);
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L74
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ throw new AccessDeniedException('Access Denied.'); } $event = new GetResponseAccountDeletionEvent($user, $request); - $this->eventDispatcher->dispatch($event, NucleosUserEvents::ACCOUNT_DELETION_INITIALIZE); + if (null !== ($response = $event->getResponse())) { return $response; }
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L81
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if (null !== ($response = $event->getResponse())) { return $response; } - $form = $this->formFactory->create(AccountDeletionFormType::class, new AccountDeletion(), ['action' => $this->router->generate('nucleos_user_delete_account')])->add('delete', SubmitType::class, ['label' => 'deletion.submit']); + $form = $this->formFactory->create(AccountDeletionFormType::class, new AccountDeletion(), [])->add('delete', SubmitType::class, ['label' => 'deletion.submit']); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { return $this->processDeletion($user, $request);
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L84
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if (null !== ($response = $event->getResponse())) { return $response; } - $form = $this->formFactory->create(AccountDeletionFormType::class, new AccountDeletion(), ['action' => $this->router->generate('nucleos_user_delete_account')])->add('delete', SubmitType::class, ['label' => 'deletion.submit']); + $form = $this->formFactory->create(AccountDeletionFormType::class, new AccountDeletion(), ['action' => $this->router->generate('nucleos_user_delete_account')])->add('delete', SubmitType::class, []); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { return $this->processDeletion($user, $request);
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L109
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ return null; } $user = $token->getUser(); - if ($user instanceof UserInterface) { + if (true) { return $user; } return null;
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L119
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ private function processDeletion(UserInterface $user, Request $request) : Response { $event = new AccountDeletionEvent($user, $request); - $this->eventDispatcher->dispatch($event, NucleosUserEvents::ACCOUNT_DELETION); + $this->userManager->deleteUser($user); $event = new AccountDeletionResponseEvent($user, $request, new RedirectResponse($this->router->generate('nucleos_user_security_logout'))); $this->eventDispatcher->dispatch($event, NucleosUserEvents::ACCOUNT_DELETION_SUCCESS);
run / Mutation Tests (8.3): src/Action/AccountDeletionAction.php#L124
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->eventDispatcher->dispatch($event, NucleosUserEvents::ACCOUNT_DELETION); $this->userManager->deleteUser($user); $event = new AccountDeletionResponseEvent($user, $request, new RedirectResponse($this->router->generate('nucleos_user_security_logout'))); - $this->eventDispatcher->dispatch($event, NucleosUserEvents::ACCOUNT_DELETION_SUCCESS); + return $event->getResponse(); } }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L65
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function __invoke(Request $request) : Response { $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#L72
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if (null !== $event->getResponse()) { return $event->getResponse(); } - $form = $this->formFactory->create(LoginFormType::class, null, ['action' => $this->router->generate('nucleos_user_security_check'), 'method' => 'POST'])->add('save', SubmitType::class, ['label' => 'security.login.submit']); + $form = $this->formFactory->create(LoginFormType::class, null, ['method' => 'POST'])->add('save', SubmitType::class, ['label' => 'security.login.submit']); return new Response($this->twig->render('@NucleosUser/Security/login.html.twig', ['form' => $form->createView(), 'last_username' => $this->authenticationUtils->getLastUsername(), 'error' => $this->authenticationUtils->getLastAuthenticationError(), 'csrf_token' => $this->csrfTokenManager->getToken('authenticate')])); } }
run / Mutation Tests (8.3): src/Action/LoginAction.php#L76
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if (null !== $event->getResponse()) { return $event->getResponse(); } - $form = $this->formFactory->create(LoginFormType::class, null, ['action' => $this->router->generate('nucleos_user_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_security_check'), 'method' => 'POST'])->add('save', SubmitType::class, []); return new Response($this->twig->render('@NucleosUser/Security/login.html.twig', ['form' => $form->createView(), 'last_username' => $this->authenticationUtils->getLastUsername(), 'error' => $this->authenticationUtils->getLastAuthenticationError(), 'csrf_token' => $this->csrfTokenManager->getToken('authenticate')])); } }