Skip to content

Commit

Permalink
Merge pull request #15 from oat-sa/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ekkinox authored Apr 14, 2021
2 parents 0bb0fc3 + 854ca15 commit 22a9540
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 65 deletions.
33 changes: 0 additions & 33 deletions .Jenkinsfile

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on: push

jobs:
build:
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
coverage: ["true"]
include:
- php: 8.0
coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP & Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2

- name: Install dependencies
run: composer install --no-interaction --no-suggest

- name: PHPUnit
env:
COVERAGE: ${{ matrix.coverage }}
run: |
[ $COVERAGE = "true" ] \
&& mkdir -p build/logs && ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml \
|| ./vendor/bin/phpunit
- name: Psalm
run: |
./vendor/bin/psalm --shepherd
- name: Coveralls
if: ${{ matrix.coverage == 'true' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./vendor/bin/php-coveralls -v
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CHANGELOG
=========

4.0.0
-----

* Added github actions CI
* Removed jenkins and travis CI
* Updated oat-sa/lib-lti1p3-core dependency to version 6.0
* Updated documentation

3.0.0
-----

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Latest Version](https://img.shields.io/github/tag/oat-sa/lib-lti1p3-deep-linking.svg?style=flat&label=release)](https://github.com/oat-sa/lib-lti1p3-deep-linking/tags)
[![License GPL2](http://img.shields.io/badge/licence-GPL%202.0-blue.svg)](http://www.gnu.org/licenses/gpl-2.0.html)
[![Build Status](https://travis-ci.org/oat-sa/lib-lti1p3-deep-linking.svg?branch=master)](https://travis-ci.org/oat-sa/lib-lti1p3-deep-linking)
[![Build Status](https://github.com/oat-sa/lib-lti1p3-deep-linking/actions/workflows/build.yaml/badge.svg?branch=master)](https://github.com/oat-sa/lib-lti1p3-deep-linking/actions)
[![Test Coverage Status](https://coveralls.io/repos/github/oat-sa/lib-lti1p3-deep-linking/badge.svg?branch=master)](https://coveralls.io/github/oat-sa/lib-lti1p3-deep-linking?branch=master)
[![Psalm Level Status](https://shepherd.dev/github/oat-sa/lib-lti1p3-deep-linking/level.svg)](https://shepherd.dev/github/oat-sa/lib-lti1p3-deep-linking)
[![Packagist Downloads](http://img.shields.io/packagist/dt/oat-sa/lib-lti1p3-deep-linking.svg)](https://packagist.org/packages/oat-sa/lib-lti1p3-deep-linking)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"ext-json": "*",
"php": ">=7.2.0",
"oat-sa/lib-lti1p3-core": "^5.0"
"oat-sa/lib-lti1p3-core": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "8.5.14",
Expand Down
17 changes: 9 additions & 8 deletions doc/deep-linking-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ You can use the [ToolLaunchValidator](https://github.com/oat-sa/lib-lti1p3-core/
```php
<?php

use OAT\Library\Lti1p3Core\Message\Launch\Validator\ToolLaunchValidator;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Tool\ToolLaunchValidator;
use OAT\Library\Lti1p3Core\Registration\RegistrationRepositoryInterface;
use OAT\Library\Lti1p3Core\Security\Nonce\NonceRepositoryInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down Expand Up @@ -152,12 +152,13 @@ if (!$result->hasError()) {
When a deep linking request is received by a tool, the tool may offer the user [content items](https://www.imsglobal.org/spec/lti-dl/v2p0/#content-item-types) selection according to the platform deep linking settings.

For example:

```php
<?php

use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResult;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResultInterface;

/** @var LaunchValidationResult $result */
/** @var LaunchValidationResultInterface $result */
$result = $validator->validatePlatformOriginatingLaunch($request);

if (!$result->hasError()) {
Expand Down Expand Up @@ -211,11 +212,11 @@ Once the resource collection ready, you can return it to the platform in a [deep
```php
<?php

use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResult;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResultInterface;
use OAT\Library\Lti1p3Core\Registration\RegistrationRepositoryInterface;
use OAT\Library\Lti1p3DeepLinking\Message\Launch\Builder\DeepLinkingLaunchResponseBuilder;

/** @var LaunchValidationResult $result */
/** @var LaunchValidationResultInterface $result */
$result = $validator->validatePlatformOriginatingLaunch(...);

// Create a builder instance
Expand Down Expand Up @@ -269,7 +270,7 @@ The [PlatformLaunchValidator](https://github.com/oat-sa/lib-lti1p3-core/blob/mas
```php
<?php

use OAT\Library\Lti1p3Core\Message\Launch\Validator\PlatformLaunchValidator;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Platform\PlatformLaunchValidator;
use OAT\Library\Lti1p3Core\Registration\RegistrationRepositoryInterface;
use OAT\Library\Lti1p3Core\Security\Nonce\NonceRepositoryInterface;
use Psr\Http\Message\ServerRequestInterface;
Expand Down Expand Up @@ -302,12 +303,12 @@ Once the deep linking response validation done, you can access the [returned con
```php
<?php

use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResult;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Result\LaunchValidationResultInterface;
use OAT\Library\Lti1p3Core\Resource\Link\LinkInterface;
use OAT\Library\Lti1p3Core\Resource\LtiResourceLink\LtiResourceLinkInterface;
use OAT\Library\Lti1p3DeepLinking\Factory\ResourceCollectionFactory;

/** @var LaunchValidationResult $result */
/** @var LaunchValidationResultInterface $result */
$result = $validator->validateToolOriginatingLaunch($request);

if (!$result->hasError()) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/DeepLinkingFlowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

namespace OAT\Library\Lti1p3DeepLinking\Tests\Integration;

use OAT\Library\Lti1p3Core\Message\Launch\Validator\PlatformLaunchValidator;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\ToolLaunchValidator;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Platform\PlatformLaunchValidator;
use OAT\Library\Lti1p3Core\Message\Launch\Validator\Tool\ToolLaunchValidator;
use OAT\Library\Lti1p3Core\Message\LtiMessageInterface;
use OAT\Library\Lti1p3Core\Resource\LtiResourceLink\LtiResourceLink;
use OAT\Library\Lti1p3Core\Resource\LtiResourceLink\LtiResourceLinkInterface;
Expand Down

0 comments on commit 22a9540

Please sign in to comment.