Skip to content

Commit

Permalink
Doctrine DBAL 4.0 and ORM 3.0 for tests (#553)
Browse files Browse the repository at this point in the history
Doctrine DBAL 4.0 and ORM 3.0 for tests
  • Loading branch information
Spomky committed Feb 23, 2024
1 parent c5cff9e commit d3da96d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 48 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"symfony/deprecation-contracts": "^3.2",
"symfony/framework-bundle": "^6.1|^7.0",
"symfony/http-client": "^6.1|^7.0",
"symfony/psr-http-message-bridge": "^2.1|^6.1",
"symfony/psr-http-message-bridge": "^2.1|^6.1|^7.0",
"symfony/security-bundle": "^6.1|^7.0",
"symfony/security-core": "^6.1|^7.0",
"symfony/security-http": "^6.1|^7.0",
Expand Down Expand Up @@ -91,9 +91,9 @@
"symfony/security-bundle": "Symfony firewall using a JSON API (perfect for script applications)"
},
"require-dev": {
"doctrine/dbal": "^3.4",
"doctrine/dbal": "^3.8|4.0",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/orm": "^2.14",
"doctrine/orm": "^2.14|^3.0",
"doctrine/persistence": "^3.1",
"ekino/phpstan-banned-code": "^1.0",
"infection/infection": "^0.27",
Expand Down
2 changes: 1 addition & 1 deletion src/symfony/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"symfony/dependency-injection": "^6.1|^7.0",
"symfony/framework-bundle": "^6.1|^7.0",
"symfony/http-client": "^6.1|^7.0",
"symfony/psr-http-message-bridge": "^2.1|^6.1",
"symfony/psr-http-message-bridge": "^2.1|^6.1|^7.0",
"symfony/security-bundle": "^6.1|^7.0",
"symfony/security-core": "^6.1|^7.0",
"symfony/security-http": "^6.1|^7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
class DoctrineCredentialSourceRepository extends ServiceEntityRepository implements PublicKeyCredentialSourceRepositoryInterface, CanSaveCredentialSource
{
/**
* @var class-string
*/
protected readonly string $class;

/**
Expand Down
5 changes: 1 addition & 4 deletions src/symfony/src/Resources/config/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@
$container
->set(WebauthnFactory::FIREWALL_CONFIG_DEFINITION_ID, WebauthnFirewallConfig::class)
->abstract()
->args([
[], // Firewall settings
abstract_arg('Firewall name'), service('security.http_utils'),
]);
->args([[], abstract_arg('Firewall name'), service('security.http_utils')]);
$container->set(CurrentUserEntityGuesser::class)->args(
[service(TokenStorageInterface::class), service(PublicKeyCredentialUserEntityRepositoryInterface::class)]
);
Expand Down
33 changes: 0 additions & 33 deletions src/webauthn/src/CeremonyStep/CheckOrigin.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,36 +76,3 @@ private function getFacetId(
return $appId;
}
}

/*
$rpId = $publicKeyCredentialCreationOptions->rp
->id ?? (is_string($request) ? $request : $request->getUri()->getHost());
$facetId = $this->getFacetId(
$rpId,
$publicKeyCredentialCreationOptions->extensions,
$authenticatorAttestationResponse->attestationObject
->authData
->extensions
);
$parsedRelyingPartyId = parse_url($C->origin);
is_array($parsedRelyingPartyId) || throw AuthenticatorResponseVerificationException::create(
sprintf('The origin URI "%s" is not valid', $C->origin)
);
array_key_exists(
'scheme',
$parsedRelyingPartyId
) || throw AuthenticatorResponseVerificationException::create('Invalid origin rpId.');
$clientDataRpId = $parsedRelyingPartyId['host'] ?? '';
$clientDataRpId !== '' || throw AuthenticatorResponseVerificationException::create('Invalid origin rpId.');
$rpIdLength = mb_strlen($facetId);
mb_substr(
'.' . $clientDataRpId,
-($rpIdLength + 1)
) === '.' . $facetId || throw AuthenticatorResponseVerificationException::create('rpId mismatch.');
if (! in_array($facetId, $securedRelyingPartyId, true)) {
$scheme = $parsedRelyingPartyId['scheme'];
$scheme === 'https' || throw AuthenticatorResponseVerificationException::create(
'Invalid scheme. HTTPS required.'
);
}
*/
7 changes: 0 additions & 7 deletions tests/symfony/functional/Attestation/AttestationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ public function foo(): void
);
$descriptor = $publicKeyCredential->getPublicKeyCredentialDescriptor();
static::assertSame(PublicKeyCredentialDescriptor::CREDENTIAL_TYPE_PUBLIC_KEY, $descriptor->type);
/*static::assertSame(
base64_decode(
'mMihuIx9LukswxBOMjMHDf6EAONOy7qdWhaQQ7dOtViR2cVB/MNbZxURi2cvgSvKSILb3mISe9lPNG9sYgojuY5iNinYOg6hRVxmm0VssuNG2pm1+RIuTF9DUtEJZEEK',
true
),
$descriptor->id
);*/
static::assertSame([], $descriptor->transports);
$response = $publicKeyCredential->response;
static::assertInstanceOf(AuthenticatorAttestationResponse::class, $response);
Expand Down

0 comments on commit d3da96d

Please sign in to comment.