From 52110e083d9fdc9c359e29553d77322a5591be7a Mon Sep 17 00:00:00 2001 From: Mati Kochen Date: Fri, 8 Dec 2023 20:07:02 +0100 Subject: [PATCH 1/8] feat: bump to php 8.0 --- .github/workflows/build.yaml | 4 ++-- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 28c7876..0e13aba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,10 +9,10 @@ jobs: strategy: fail-fast: false matrix: - php: [7.2, 7.3, 7.4] + php: [8.0, 8.1, 8.2, 8.3] coverage: ["true"] include: - - php: 8.0 + - php: 8.3 coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8 steps: diff --git a/composer.json b/composer.json index b853ca4..a82c357 100644 --- a/composer.json +++ b/composer.json @@ -5,11 +5,11 @@ "license": "GPL-2.0-only", "require": { "ext-json": "*", - "php": ">=7.2.0", + "php": ">=8.0.0", "oat-sa/lib-lti1p3-core": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.14", + "phpunit/phpunit": "^9.6", "php-coveralls/php-coveralls": "^2.4", "psalm/plugin-phpunit": "^0.15.1", "vimeo/psalm": "^4.6" From 6f6f325dad36f83a7e6469c5e0f858332126b287 Mon Sep 17 00:00:00 2001 From: Mati Kochen Date: Fri, 8 Dec 2023 20:02:14 +0100 Subject: [PATCH 2/8] feat: bump core to v7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a82c357..f17e661 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "require": { "ext-json": "*", "php": ">=8.0.0", - "oat-sa/lib-lti1p3-core": "^6.0" + "oat-sa/lib-lti1p3-core": "^7.0" }, "require-dev": { "phpunit/phpunit": "^9.6", From e977bc915ccfe1f7de44875e5446b2cf7818b08f Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 21 Dec 2023 20:27:11 +0100 Subject: [PATCH 3/8] ci: execute Build workflow on pull requests to `main` --- .github/workflows/build.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0e13aba..ae35c64 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,6 +1,10 @@ name: Build -on: push +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: @@ -10,10 +14,10 @@ jobs: fail-fast: false matrix: php: [8.0, 8.1, 8.2, 8.3] - coverage: ["true"] + coverage: ["false"] include: - php: 8.3 - coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8 + coverage: "true" # Collecting coverage reports only once steps: - name: Checkout From 39fcbec7c970f43f8f62bcedc3da265bf62058f0 Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 21 Dec 2023 20:29:01 +0100 Subject: [PATCH 4/8] chore: temporarily depend on an unreleased version of `oat-sa/lib-lti1p3-core` --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f17e661..ff51c4b 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "require": { "ext-json": "*", "php": ">=8.0.0", - "oat-sa/lib-lti1p3-core": "^7.0" + "oat-sa/lib-lti1p3-core": "dev-feature/TR-5944/upgrade-dependencies as 7.0.0" }, "require-dev": { "phpunit/phpunit": "^9.6", From b8aa2ee2bcfa716961d166643481bbdf6cba7f62 Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 21 Dec 2023 20:40:35 +0100 Subject: [PATCH 5/8] chore: adjust request handlers to the lack of response factories --- .../CreateLineItemServiceServerRequestHandler.php | 12 +++--------- .../DeleteLineItemServiceServerRequestHandler.php | 12 +++--------- .../GetLineItemServiceServerRequestHandler.php | 12 +++--------- .../ListLineItemsServiceServerRequestHandler.php | 10 ++-------- .../UpdateLineItemServiceServerRequestHandler.php | 14 ++++---------- .../Handler/ResultServiceServerRequestHandler.php | 12 +++--------- .../Handler/ScoreServiceServerRequestHandler.php | 14 ++++---------- ...eateLineItemServiceServerRequestHandlerTest.php | 2 -- ...leteLineItemServiceServerRequestHandlerTest.php | 2 -- .../GetLineItemServiceServerRequestHandlerTest.php | 2 -- ...istLineItemsServiceServerRequestHandlerTest.php | 1 - ...dateLineItemServiceServerRequestHandlerTest.php | 2 -- .../ResultServiceServerRequestHandlerTest.php | 2 -- .../ScoreServiceServerRequestHandlerTest.php | 2 -- 14 files changed, 22 insertions(+), 77 deletions(-) diff --git a/src/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandler.php b/src/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandler.php index 04a4595..e0a36d1 100644 --- a/src/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandler.php +++ b/src/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\LineItem\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializer; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializerInterface; @@ -48,21 +47,16 @@ class CreateLineItemServiceServerRequestHandler implements LtiServiceServerReque /** @var LineItemSerializerInterface */ private $serializer; - /** @var ResponseFactory */ - private $factory; - /** @var LoggerInterface */ protected $logger; public function __construct( LineItemRepositoryInterface $repository, ?LineItemSerializerInterface $serializer = null, - ?ResponseFactory $factory = null, ?LoggerInterface $logger = null ) { $this->repository = $repository; $this->serializer = $serializer ?? new LineItemSerializer(); - $this->factory = $factory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -100,7 +94,7 @@ public function handleValidatedServiceRequest( } catch (LtiExceptionInterface $exception) { $this->logger->error($exception->getMessage()); - return $this->factory->createResponse(400, null, [], $exception->getMessage()); + return new Response(400, [], $exception->getMessage()); } $lineItem = $this->repository->save($lineItem); @@ -111,6 +105,6 @@ public function handleValidatedServiceRequest( 'Content-Length' => strlen($responseBody), ]; - return $this->factory->createResponse(201, null, $responseHeaders, $responseBody); + return new Response(201, $responseHeaders, $responseBody); } } diff --git a/src/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandler.php b/src/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandler.php index a617ccb..9be20c5 100644 --- a/src/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandler.php +++ b/src/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\LineItem\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Service\LineItem\LineItemServiceInterface; use OAT\Library\Lti1p3Core\Security\OAuth2\Validator\Result\RequestAccessTokenValidationResultInterface; @@ -41,19 +40,14 @@ class DeleteLineItemServiceServerRequestHandler implements LtiServiceServerReque /** @var LineItemRepositoryInterface */ private $repository; - /** @var ResponseFactory */ - private $factory; - /** @var LoggerInterface */ protected $logger; public function __construct( LineItemRepositoryInterface $repository, - ?ResponseFactory $factory = null, ?LoggerInterface $logger = null ) { $this->repository = $repository; - $this->factory = $factory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -95,11 +89,11 @@ public function handleValidatedServiceRequest( $this->logger->error($message); - return $this->factory->createResponse(404, null, [], $message); + return new Response(404, [], $message); } $this->repository->delete($lineItemIdentifier); - return $this->factory->createResponse(204); + return new Response(204); } } diff --git a/src/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandler.php b/src/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandler.php index d3f36a0..05adb3d 100644 --- a/src/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandler.php +++ b/src/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\LineItem\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializer; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializerInterface; @@ -46,21 +45,16 @@ class GetLineItemServiceServerRequestHandler implements LtiServiceServerRequestH /** @var LineItemSerializerInterface */ private $serializer; - /** @var ResponseFactory */ - private $factory; - /** @var LoggerInterface */ protected $logger; public function __construct( LineItemRepositoryInterface $repository, ?LineItemSerializerInterface $serializer = null, - ?ResponseFactory $factory = null, ?LoggerInterface $logger = null ) { $this->repository = $repository; $this->serializer = $serializer ?? new LineItemSerializer(); - $this->factory = $factory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -104,7 +98,7 @@ public function handleValidatedServiceRequest( $this->logger->error($message); - return $this->factory->createResponse(404, null, [], $message); + return new Response(404, [], $message); } $responseBody = $this->serializer->serialize($lineItem); @@ -113,6 +107,6 @@ public function handleValidatedServiceRequest( 'Content-Length' => strlen($responseBody), ]; - return $this->factory->createResponse(200, null, $responseHeaders, $responseBody); + return new Response(200, $responseHeaders, $responseBody); } } diff --git a/src/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandler.php b/src/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandler.php index 7339164..79c60bf 100644 --- a/src/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandler.php +++ b/src/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\LineItem\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Model\LineItem\LineItemContainerInterface; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemCollectionSerializer; @@ -50,19 +49,14 @@ class ListLineItemsServiceServerRequestHandler implements LtiServiceServerReques /** @var UrlBuilderInterface */ private $builder; - /** @var ResponseFactory */ - private $factory; - public function __construct( LineItemRepositoryInterface $repository, ?LineItemCollectionSerializerInterface $serializer = null, ?UrlBuilderInterface $builder = null, - ?ResponseFactory $factory = null ) { $this->repository = $repository; $this->serializer = $serializer ?? new LineItemCollectionSerializer(); $this->builder = $builder ?? new UrlBuilder(); - $this->factory = $factory ?? new HttplugFactory(); } public function getServiceName(): string @@ -130,6 +124,6 @@ public function handleValidatedServiceRequest( ); } - return $this->factory->createResponse(200, null, $responseHeaders, $responseBody); + return new Response(200, $responseHeaders, $responseBody); } } diff --git a/src/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandler.php b/src/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandler.php index 48f7b6c..b7b54c2 100644 --- a/src/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandler.php +++ b/src/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\LineItem\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializer; use OAT\Library\Lti1p3Ags\Serializer\LineItem\LineItemSerializerInterface; @@ -48,21 +47,16 @@ class UpdateLineItemServiceServerRequestHandler implements LtiServiceServerReque /** @var LineItemSerializerInterface */ private $serializer; - /** @var ResponseFactory */ - private $factory; - /** @var LoggerInterface */ protected $logger; public function __construct( LineItemRepositoryInterface $repository, ?LineItemSerializerInterface $serializer = null, - ?ResponseFactory $factory = null, ?LoggerInterface $logger = null ) { $this->repository = $repository; $this->serializer = $serializer ?? new LineItemSerializer(); - $this->factory = $factory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -104,7 +98,7 @@ public function handleValidatedServiceRequest( $this->logger->error($message); - return $this->factory->createResponse(404, null, [], $message); + return new Response(404, [], $message); } try { @@ -112,7 +106,7 @@ public function handleValidatedServiceRequest( } catch (LtiExceptionInterface $exception) { $this->logger->error($exception->getMessage()); - return $this->factory->createResponse(400, null, [], $exception->getMessage()); + return new Response(400, [], $exception->getMessage()); } $lineItem = $this->repository->save($lineItem->copy($updatedLineItem)); @@ -123,6 +117,6 @@ public function handleValidatedServiceRequest( 'Content-Length' => strlen($responseBody), ]; - return $this->factory->createResponse(200, null, $responseHeaders, $responseBody); + return new Response(200, $responseHeaders, $responseBody); } } diff --git a/src/Service/Result/Server/Handler/ResultServiceServerRequestHandler.php b/src/Service/Result/Server/Handler/ResultServiceServerRequestHandler.php index abd6974..2409d1a 100644 --- a/src/Service/Result/Server/Handler/ResultServiceServerRequestHandler.php +++ b/src/Service/Result/Server/Handler/ResultServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\Result\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Factory\Result\ResultCollectionFactory; use OAT\Library\Lti1p3Ags\Factory\Result\ResultCollectionFactoryInterface; use OAT\Library\Lti1p3Ags\Model\Result\ResultContainerInterface; @@ -66,9 +65,6 @@ class ResultServiceServerRequestHandler implements LtiServiceServerRequestHandle /** @var UrlBuilderInterface */ private $builder; - /** @var ResponseFactory */ - private $responseFactory; - /** @var LoggerInterface */ protected $logger; @@ -79,7 +75,6 @@ public function __construct( ?ResultCollectionFactoryInterface $resultCollectionFactory = null, ?UrlExtractorInterface $extractor = null, ?UrlBuilderInterface $builder = null, - ?ResponseFactory $responseFactory = null, ?LoggerInterface $logger = null ) { $this->lineItemRepository = $lineItemRepository; @@ -88,7 +83,6 @@ public function __construct( $this->resultCollectionFactory = $resultCollectionFactory ?? new ResultCollectionFactory(); $this->extractor = $extractor ?? new UrlExtractor(); $this->builder = $builder ?? new UrlBuilder(); - $this->responseFactory = $responseFactory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -132,7 +126,7 @@ public function handleValidatedServiceRequest( $this->logger->error($message); - return $this->responseFactory->createResponse(404, null, [], $message); + return new Response(404, [], $message); } parse_str($request->getUri()->getQuery(), $parameters); @@ -178,6 +172,6 @@ public function handleValidatedServiceRequest( ); } - return $this->responseFactory->createResponse(200, null, $responseHeaders, $responseBody); + return new Response(200, $responseHeaders, $responseBody); } } diff --git a/src/Service/Score/Server/Handler/ScoreServiceServerRequestHandler.php b/src/Service/Score/Server/Handler/ScoreServiceServerRequestHandler.php index 14a3356..887a2de 100644 --- a/src/Service/Score/Server/Handler/ScoreServiceServerRequestHandler.php +++ b/src/Service/Score/Server/Handler/ScoreServiceServerRequestHandler.php @@ -22,8 +22,7 @@ namespace OAT\Library\Lti1p3Ags\Service\Score\Server\Handler; -use Http\Message\ResponseFactory; -use Nyholm\Psr7\Factory\HttplugFactory; +use Nyholm\Psr7\Response; use OAT\Library\Lti1p3Ags\Repository\LineItemRepositoryInterface; use OAT\Library\Lti1p3Ags\Repository\ScoreRepositoryInterface; use OAT\Library\Lti1p3Ags\Serializer\Score\ScoreSerializer; @@ -56,9 +55,6 @@ class ScoreServiceServerRequestHandler implements LtiServiceServerRequestHandler /** @var UrlExtractorInterface */ private $extractor; - /** @var ResponseFactory */ - private $factory; - /** @var LoggerInterface */ protected $logger; @@ -67,14 +63,12 @@ public function __construct( ScoreRepositoryInterface $scoreRepository, ?ScoreSerializerInterface $serializer = null, ?UrlExtractorInterface $extractor = null, - ?ResponseFactory $factory = null, ?LoggerInterface $logger = null ) { $this->lineItemRepository = $lineItemRepository; $this->scoreRepository = $scoreRepository; $this->serializer = $serializer ?? new ScoreSerializer(); $this->extractor = $extractor ?? new UrlExtractor(); - $this->factory = $factory ?? new HttplugFactory(); $this->logger = $logger ?? new NullLogger(); } @@ -116,7 +110,7 @@ public function handleValidatedServiceRequest( $this->logger->error($message); - return $this->factory->createResponse(404, null, [], $message); + return new Response(404, [], $message); } try { @@ -124,13 +118,13 @@ public function handleValidatedServiceRequest( } catch (LtiExceptionInterface $exception) { $this->logger->error($exception->getMessage()); - return $this->factory->createResponse(400, null, [], $exception->getMessage()); + return new Response(400, [], $exception->getMessage()); } $this->scoreRepository->save( $score->setLineItemIdentifier($lineItem->getIdentifier()) ); - return $this->factory->createResponse(201); + return new Response(201); } } diff --git a/tests/Integration/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandlerTest.php b/tests/Integration/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandlerTest.php index 1103b53..72a3bcb 100644 --- a/tests/Integration/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/LineItem/Server/Handler/CreateLineItemServiceServerRequestHandlerTest.php @@ -75,14 +75,12 @@ protected function setUp(): void $this->subject = new CreateLineItemServiceServerRequestHandler( $this->repository, null, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandlerTest.php b/tests/Integration/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandlerTest.php index 46bce09..a5d2d42 100644 --- a/tests/Integration/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/LineItem/Server/Handler/DeleteLineItemServiceServerRequestHandlerTest.php @@ -66,14 +66,12 @@ protected function setUp(): void $this->subject = new DeleteLineItemServiceServerRequestHandler( $this->repository, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandlerTest.php b/tests/Integration/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandlerTest.php index 400fd76..ef1d2ec 100644 --- a/tests/Integration/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/LineItem/Server/Handler/GetLineItemServiceServerRequestHandlerTest.php @@ -74,14 +74,12 @@ protected function setUp(): void $this->subject = new GetLineItemServiceServerRequestHandler( $this->repository, null, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandlerTest.php b/tests/Integration/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandlerTest.php index 5c616b1..b6d45f7 100644 --- a/tests/Integration/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/LineItem/Server/Handler/ListLineItemsServiceServerRequestHandlerTest.php @@ -76,7 +76,6 @@ protected function setUp(): void $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandlerTest.php b/tests/Integration/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandlerTest.php index fad1131..bd77f4a 100644 --- a/tests/Integration/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/LineItem/Server/Handler/UpdateLineItemServiceServerRequestHandlerTest.php @@ -75,14 +75,12 @@ protected function setUp(): void $this->subject = new UpdateLineItemServiceServerRequestHandler( $this->repository, null, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/Result/Server/Handler/ResultServiceServerRequestHandlerTest.php b/tests/Integration/Service/Result/Server/Handler/ResultServiceServerRequestHandlerTest.php index 967d20a..f6d147b 100644 --- a/tests/Integration/Service/Result/Server/Handler/ResultServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/Result/Server/Handler/ResultServiceServerRequestHandlerTest.php @@ -84,14 +84,12 @@ protected function setUp(): void null, null, null, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } diff --git a/tests/Integration/Service/Score/Server/Handler/ScoreServiceServerRequestHandlerTest.php b/tests/Integration/Service/Score/Server/Handler/ScoreServiceServerRequestHandlerTest.php index 00d2f8c..df1b410 100644 --- a/tests/Integration/Service/Score/Server/Handler/ScoreServiceServerRequestHandlerTest.php +++ b/tests/Integration/Service/Score/Server/Handler/ScoreServiceServerRequestHandlerTest.php @@ -82,14 +82,12 @@ protected function setUp(): void $this->scoreRepository, null, null, - null, $this->logger ); $this->server = new LtiServiceServer( $this->validatorMock, $this->subject, - null, $this->logger ); } From db0c3384298742ea21a336555584af2952f33e88 Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 21 Dec 2023 20:40:49 +0100 Subject: [PATCH 6/8] fix: migrate phpunit.xml.dist configuration to phpunit 9 --- phpunit.xml.dist | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 075edfc..5441481 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,20 @@ - - - - - - - - - - tests/Integration - - - tests/Unit - - - - - - src - - + + + + src + + + + + + + + tests/Integration + + + tests/Unit + + From 1988e58a4fb102f9748a89f806d228326c367aee Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 21 Dec 2023 20:58:04 +0100 Subject: [PATCH 7/8] fix: add direct dependencies explicitly to the root-level composer.json --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ff51c4b..03f0533 100644 --- a/composer.json +++ b/composer.json @@ -4,9 +4,12 @@ "type": "library", "license": "GPL-2.0-only", "require": { - "ext-json": "*", "php": ">=8.0.0", - "oat-sa/lib-lti1p3-core": "dev-feature/TR-5944/upgrade-dependencies as 7.0.0" + "ext-json": "*", + "nesbot/carbon": "^2.72", + "nyholm/psr7": "^1.8", + "oat-sa/lib-lti1p3-core": "dev-feature/TR-5944/upgrade-dependencies as 7.0.0", + "psr/http-message": "^1.1" }, "require-dev": { "phpunit/phpunit": "^9.6", From 7b1d4e634a7f5990a5e86c5340ab5caa215bbfee Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Fri, 22 Dec 2023 09:18:49 +0100 Subject: [PATCH 8/8] chore: require the released `oat-sa/lib-lti1p3-core` Signed-off-by: Sergei Mikhailov --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 03f0533..b5b222a 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "ext-json": "*", "nesbot/carbon": "^2.72", "nyholm/psr7": "^1.8", - "oat-sa/lib-lti1p3-core": "dev-feature/TR-5944/upgrade-dependencies as 7.0.0", + "oat-sa/lib-lti1p3-core": "^7.0", "psr/http-message": "^1.1" }, "require-dev": {