Skip to content

Fix class-string extend issue #601

Fix class-string extend issue

Fix class-string extend issue #601

Triggered via pull request September 29, 2023 16:18
Status Failure
Total duration 11m 56s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

integrate.yml

on: pull_request
0️⃣ Byte-level
8s
0️⃣ Byte-level
1️⃣ Syntax errors
24s
1️⃣ Syntax errors
3️⃣ Static Analysis
33s
3️⃣ Static Analysis
4️⃣ Coding Standards
46s
4️⃣ Coding Standards
5️⃣ Mutation Testing
11m 13s
5️⃣ Mutation Testing
6️⃣ Rector Checkstyle
45s
6️⃣ Rector Checkstyle
7️⃣ Exported files
4s
7️⃣ Exported files
Matrix: 2️⃣ JS tests
Matrix: 2️⃣ Unit and functional tests
Fit to window
Zoom out
Zoom in

Annotations

12 errors and 10 warnings
3️⃣ Static Analysis: src/symfony/src/Controller/AssertionControllerFactory.php#L30
Method Webauthn\Bundle\Controller\AssertionControllerFactory::__construct() has parameter $publicKeyCredentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Controller/AssertionResponseController.php#L29
Method Webauthn\Bundle\Controller\AssertionResponseController::__construct() has parameter $publicKeyCredentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Controller/AttestationControllerFactory.php#L25
Method Webauthn\Bundle\Controller\AttestationControllerFactory::__construct() has parameter $publicKeyCredentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Controller/AttestationResponseController.php#L32
Method Webauthn\Bundle\Controller\AttestationResponseController::__construct() has parameter $credentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/CredentialOptionsBuilder/ProfileBasedCreationOptionsBuilder.php#L29
Method Webauthn\Bundle\CredentialOptionsBuilder\ProfileBasedCreationOptionsBuilder::__construct() has parameter $credentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/CredentialOptionsBuilder/ProfileBasedRequestOptionsBuilder.php#L28
Method Webauthn\Bundle\CredentialOptionsBuilder\ProfileBasedRequestOptionsBuilder::__construct() has parameter $credentialSourceRepository with generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Repository/DoctrineCredentialSourceRepository.php#L17
Class Webauthn\Bundle\Repository\DoctrineCredentialSourceRepository implements generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Repository/DoctrineCredentialSourceRepository.php#L28
Parameter #2 $entityClass of method Doctrine\Bundle\DoctrineBundle\Repository\LazyServiceEntityRepository<T of Webauthn\PublicKeyCredentialSource>::__construct() expects class-string<T of Webauthn\PublicKeyCredentialSource>, class-string<Webauthn\PublicKeyCredentialSource> given.
3️⃣ Static Analysis: src/symfony/src/Repository/DummyPublicKeyCredentialSourceRepository.php#L18
Class Webauthn\Bundle\Repository\DummyPublicKeyCredentialSourceRepository implements generic interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface but does not specify its types: T
3️⃣ Static Analysis: src/symfony/src/Repository/PublicKeyCredentialSourceRepository.php#L13
Class Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepository extends generic class Webauthn\Bundle\Repository\DoctrineCredentialSourceRepository but does not specify its types: T
4️⃣ Coding Standards
Process completed with exit code 2.
5️⃣ Mutation Testing
Process completed with exit code 2.
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/CertificateToolbox.php#L30
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ public static function fixPEMStructure(string $data, string $type = 'CERTIFICATE') : string { if (str_contains($data, self::PEM_HEADER)) { - return trim($data); + return $data; } $pem = self::PEM_HEADER . $type . '-----' . PHP_EOL; $pem .= chunk_split($data, 64, PHP_EOL);
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L224
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ private function retrieveRevokedSerialNumbers(string $url) : array { try { - if ($this->client instanceof HttpClientInterface) { + if (true) { $crlData = $this->client->request('GET', $url)->getContent(); } else { $crlData = $this->sendPsrRequest($url);
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L224
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ private function retrieveRevokedSerialNumbers(string $url) : array { try { - if ($this->client instanceof HttpClientInterface) { + if (false) { $crlData = $this->client->request('GET', $url)->getContent(); } else { $crlData = $this->sendPsrRequest($url);
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L246
Escaped Mutant for Mutator "Throw_": --- Original +++ New @@ @@ return $sequence->at(0)->asInteger()->number(); }, $list->elements()); } catch (Throwable $e) { - throw CertificateRevocationListException::create($url, 'Failed to download the CRL', $e); + CertificateRevocationListException::create($url, 'Failed to download the CRL', $e); } } /**
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L262
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ $extensions = $subject->tbsCertificate()->extensions(); if ($extensions->hasCRLDistributionPoints()) { $crlDists = $extensions->crlDistributionPoints(); - foreach ($crlDists->distributionPoints() as $dist) { + foreach (array() as $dist) { $url = $dist->fullName()->names()->firstURI(); $scheme = parse_url($url, PHP_URL_SCHEME); if (!in_array($scheme, ['http', 'https'], true)) {
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L267
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ foreach ($crlDists->distributionPoints() as $dist) { $url = $dist->fullName()->names()->firstURI(); $scheme = parse_url($url, PHP_URL_SCHEME); - if (!in_array($scheme, ['http', 'https'], true)) { + if (!in_array($scheme, ['https'], true)) { continue; } $urls[] = $url;
5️⃣ Mutation Testing: src/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php#L267
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ foreach ($crlDists->distributionPoints() as $dist) { $url = $dist->fullName()->names()->firstURI(); $scheme = parse_url($url, PHP_URL_SCHEME); - if (!in_array($scheme, ['http', 'https'], true)) { + if (in_array($scheme, ['http', 'https'], true)) { continue; } $urls[] = $url;
5️⃣ Mutation Testing: src/metadata-service/src/Exception/CertificateRevocationListException.php#L16
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { public function __construct(public readonly string $url, string $message, ?Throwable $previous = null) { - parent::__construct($message, $previous); + } public static function create(string $url, string $message = 'Invalid CRL.', ?Throwable $previous = null) : self {
5️⃣ Mutation Testing: src/metadata-service/src/Exception/CertificateRevocationListException.php#L19
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ { parent::__construct($message, $previous); } - public static function create(string $url, string $message = 'Invalid CRL.', ?Throwable $previous = null) : self + protected static function create(string $url, string $message = 'Invalid CRL.', ?Throwable $previous = null) : self { return new self($url, $message, $previous); } }
5️⃣ Mutation Testing: src/metadata-service/src/Service/DistantResourceMetadataService.php#L37
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ /** * @param array<string, string> $additionalHeaderParameters */ - public function __construct(private readonly ?RequestFactoryInterface $requestFactory, private readonly ClientInterface|HttpClientInterface $httpClient, private readonly string $uri, private readonly bool $isBase64Encoded = false, private readonly array $additionalHeaderParameters = [], ?SerializerInterface $serializer = null) + public function __construct(private readonly ?RequestFactoryInterface $requestFactory, private readonly ClientInterface|HttpClientInterface $httpClient, private readonly string $uri, private readonly bool $isBase64Encoded = true, private readonly array $additionalHeaderParameters = [], ?SerializerInterface $serializer = null) { if ($requestFactory !== null && !$httpClient instanceof HttpClientInterface) { trigger_deprecation('web-auth/metadata-service', '4.7.0', 'The parameter "$requestFactory" will be removed in 5.0.0. Please set it to null and set an Symfony\\Contracts\\HttpClient\\HttpClientInterface as "$httpClient" argument.');