Skip to content

Migration from 5.x to 6.x

Jonathan VUILLEMIN edited this page Apr 14, 2021 · 5 revisions

Table of contents

New features

You can find below the list of new features offered by version 6.x.

New interfaces

Version 6.x provides new interfaces to implement if you need to customize the way core library works:

Breaking changes

Globally, top level classes of the library and their usage did not change, ensuring the migration to the version 6.x to be straightforward.

But version 6.x introduce some methods signatures changes, as well as classes namespaces fixes, listed below.

Methods signatures changes

  • The LtiServiceServerRequestHandlerInterface method handleServiceRequest() has been replaced with handleValidatedServiceRequest() that now allows to work with the launch validation result (gives access to registration, token, and scopes):
use OAT\Library\Lti1p3Core\Security\OAuth2\Validator\Result\RequestAccessTokenValidationResultInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

interface LtiServiceServerRequestHandlerInterface
{
    ...

    public function handleValidatedServiceRequest(
        RequestAccessTokenValidationResultInterface $validationResult,
        ServerRequestInterface $request,
        array $options = []
    ): ResponseInterface;
}

Classes namespaces changes