This project follows the Semantic Versioning principles and, contrary to upgrade a minor version (where the middle number changes) where no difficulty should be encountered, upgrade a major version (where the first number changes) is subject to significant modifications.
First of all, you have to make sure you are using the last v2.x release (v2.1.7 at the time of writing).
Next, you have to verify you don’t use any deprecated class, interface, method or property. If you have PHPUnit tests, you can easily get the list of deprecation used in your application.
You don't have to inject the
CBOR\Decoder service anymore. This service is automatically created with the necessary options.
use Webauthn\AuthenticatorAssertionResponseValidator;//Before:$validator = new AuthenticatorAssertionResponseValidator($publicKeyCredentialSourceRepository,$decoder,$tokenBindingHandler,$extensionOutputCheckerHandler,$algorithmManager);//After$validator = new AuthenticatorAssertionResponseValidator($publicKeyCredentialSourceRepository,$tokenBindingHandler,$extensionOutputCheckerHandler,$algorithmManager);
You must inject the Metadata Statement Repository to use Metadata Statement types other than
It is now time to upgrade the libraries. In your composer.json, change all
web-auth/* dependencies from
v3.0. When done, execute
If you want to see all modifications at once, please have a look at this page.