From 5.x to 6.0
Step-by-step guide for migrating from 5.x to 6.0
This project follows the Semantic Versioning principles and, contrary to upgrading a minor version (where the middle number changes) where no difficulty should be encountered, upgrading a major version (where the first number changes) is subject to significant modifications.
Deprecations
PublicKeyCredentialEntity.icon
PublicKeyCredentialEntity.icon is deprecated since 5.1.0. This property is removed from the specification and is not used anymore.
PublicKeyCredentialRpEntity.name
Deprecated in v5.3.0
The name property of PublicKeyCredentialRpEntity is deprecated in version 5.3.0 and will be removed in version 6.0.0. According to the WebAuthn Level 3 specification, the Relying Party name is no longer required.
# Before (deprecated)
$rpEntity = PublicKeyCredentialRpEntity::create('My Application', 'example.com');
# After
$rpEntity = PublicKeyCredentialRpEntity::create('', 'example.com');The name member is required by the W3C IDL. Since v5.3.7 the serializer writes the Relying Party ID in that member when the entity has an empty name, so the payload sent to the browser stays valid without any action on your side.
With the Symfony bundle, drop the rp.name node from your creation profiles:
Between 5.3.3 and 5.3.6 the bundle copied rp.id into rp.name on the entity itself, which triggered the deprecation on every options request, including for the applications that had already removed the node. Since 5.3.7 the fallback is applied at serialization time and the deprecation is only triggered by an application that really sets a name.
PublicKeyCredentialSource
Deprecated in v5.3.0
The class Webauthn\PublicKeyCredentialSource has been renamed to Webauthn\CredentialRecord to better reflect its purpose. The old class now extends CredentialRecord for backward compatibility but will be removed in version 6.0.0.
Similarly, the repository interface PublicKeyCredentialSourceRepositoryInterface is deprecated in favor of CredentialRecordRepositoryInterface.
DoctrineCredentialSourceRepository
Deprecated in v5.2.0
The class Webauthn\Bundle\Repository\DoctrineCredentialSourceRepository provided by the Symfony bundle is deprecated and will be removed in version 6.0.0. You should create your own Doctrine-based repository instead.
See the Credential Record Repository page for a complete implementation example.
createFormJson
Deprecated in v5.3.0
The createFormJson method is deprecated and will be removed in version 6.0.0. Use the standard Symfony Serializer to deserialize credential responses instead.
Composer package web-auth/webauthn-stimulus
Deprecated in v5.3.0 — removed in v6.0.0
The dedicated PHP package web-auth/webauthn-stimulus (the Symfony Flex/AssetMapper wrapper around the Stimulus controllers) is deprecated. The same JavaScript is now published to npm as @web-auth/webauthn-stimulus and that is the only package that will keep being maintained in 6.0.0.
Migrate your application before upgrading to 6.0.0:
Then register the controllers from your Stimulus bootstrap file (assets/bootstrap.js with the default AssetMapper recipe) under their package-prefixed identifiers:
Do not add @web-auth/webauthn-stimulus to assets/controllers.json. Symfony UX StimulusBundle resolves controllers.json entries against installed Composer packages, so it throws Could not find package "web-auth/webauthn-stimulus" referred to from controllers.json once the Composer wrapper is gone. Register from JavaScript instead, as shown above.
Your Twig templates do not need any change — stimulus_controller('@web-auth/webauthn-stimulus/authentication') still resolves to the web-auth--webauthn-stimulus--authentication identifier you just registered.
Authenticator Transport CABLE
Deprecated in v5.3.0
The constant AUTHENTICATOR_TRANSPORT_CABLE is deprecated and will be removed in version 6.0.0. Use AUTHENTICATOR_TRANSPORT_HYBRID (the spec-aligned successor for caBLE / cloud-assisted BLE) instead.
New Authenticator Transports
PublicKeyCredentialDescriptor exposes two new transport constants in addition to the historic usb, nfc, ble and internal:
AUTHENTICATOR_TRANSPORT_SMART_CARD(smart-card)AUTHENTICATOR_TRANSPORT_HYBRID(hybrid, replacescable)
All seven values are referenced by PublicKeyCredentialDescriptor::AUTHENTICATOR_TRANSPORTS.
Options Handlers Signature
Changed in v5.3.0
The CreationOptionsHandler and RequestOptionsHandler interfaces now accept an optional ?Request $request parameter. If you implement these interfaces, you must update the signature of your methods.
The same applies to RequestOptionsHandler::onRequestOptions().
Secured RP IDs
secured_rp_ids is deprecated since 5.2.0. Use allowed_origins and allow_subdomains.
Options Storage
options_storage option on the controller or firewall levels are deprecated. Please use the top level configuration key
Firewall
The webauthn firewall is deprecated. Please use the dedicated Passport and Badge instead.
The configuration:
The custom authenticator
The template
With the Stimulus Controller
Last updated
Was this helpful?