diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df4e6fc..b443f14 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,8 +16,8 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - php-versions: [ '8.2', '8.3', '8.4' ] - symfony-version: ['5.4.*', '6.4.*', '7.2.*'] + php-versions: [ '8.3', '8.4', '8.5' ] + symfony-version: ['6.4.*', '7.4.*'] fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/Services/Event/Impl/EventFactoryImpl.php b/Services/Event/Impl/EventFactoryImpl.php index b325f3a..bbb1d66 100644 --- a/Services/Event/Impl/EventFactoryImpl.php +++ b/Services/Event/Impl/EventFactoryImpl.php @@ -25,9 +25,9 @@ class EventFactoryImpl implements EventFactory */ public function make( $eventName, - UseCaseRequest $useCaseRequest = null, - UseCaseResponse $useCaseResponse = null, - \Exception $exception = null + ?UseCaseRequest $useCaseRequest = null, + ?UseCaseResponse $useCaseResponse = null, + ?\Exception $exception = null ) { return $this->useCaseEventBuilder ->create() diff --git a/Services/Event/Impl/UseCaseEventBuilderImpl.php b/Services/Event/Impl/UseCaseEventBuilderImpl.php index b70ba07..69f7eba 100644 --- a/Services/Event/Impl/UseCaseEventBuilderImpl.php +++ b/Services/Event/Impl/UseCaseEventBuilderImpl.php @@ -39,7 +39,7 @@ public function named($name) /** * @return UseCaseEventBuilder */ - public function withUseCaseRequest(UseCaseRequest $useCaseRequest = null) + public function withUseCaseRequest(?UseCaseRequest $useCaseRequest = null) { if (null !== $useCaseRequest) { $this->event->setUseCaseRequest($useCaseRequest); @@ -51,7 +51,7 @@ public function withUseCaseRequest(UseCaseRequest $useCaseRequest = null) /** * @return UseCaseEventBuilder */ - public function withUseCaseResponse(UseCaseResponse $useCaseResponse = null) + public function withUseCaseResponse(?UseCaseResponse $useCaseResponse = null) { if (null !== $useCaseResponse) { $this->event->setUseCaseResponse($useCaseResponse); @@ -63,7 +63,7 @@ public function withUseCaseResponse(UseCaseResponse $useCaseResponse = null) /** * @return UseCaseEventBuilder */ - public function withUseCaseException(\Exception $exception = null) + public function withUseCaseException(?\Exception $exception = null) { if (null !== $exception) { $this->event->setUseCaseException($exception); diff --git a/Services/Event/UseCaseEventBuilder.php b/Services/Event/UseCaseEventBuilder.php index 3501bdc..b4c5934 100644 --- a/Services/Event/UseCaseEventBuilder.php +++ b/Services/Event/UseCaseEventBuilder.php @@ -31,19 +31,19 @@ abstract public function named($name); * @return UseCaseEventBuilder * @codeCoverageIgnore */ - abstract public function withUseCaseRequest(UseCaseRequest $useCaseRequest = null); + abstract public function withUseCaseRequest(?UseCaseRequest $useCaseRequest = null); /** * @return UseCaseEventBuilder * @codeCoverageIgnore */ - abstract public function withUseCaseResponse(UseCaseResponse $useCaseResponse = null); + abstract public function withUseCaseResponse(?UseCaseResponse $useCaseResponse = null); /** * @return UseCaseEventBuilder * @codeCoverageIgnore */ - abstract public function withUseCaseException(\Exception $exception = null); + abstract public function withUseCaseException(?\Exception $exception = null); /** * @return UseCaseEvent diff --git a/composer.json b/composer.json index 6b63d06..869ab87 100644 --- a/composer.json +++ b/composer.json @@ -20,16 +20,16 @@ } }, "require": { - "php": ">=8.2", - "openclassrooms/use-case": "^2.0", - "symfony/cache": "~5.4 || ~6.4 || ~7.1", - "symfony/dependency-injection": "~5.4 || ~6.4 || ~7.1", - "symfony/config": "~5.0 || ~6.4 || ~7.1", - "symfony/http-kernel": "~5.0 || ~6.4 || ~7.1 || ~7.1", - "symfony/security-core": "~5.0 || ~6.4 || ~7.1", + "php": ">=8.3", + "openclassrooms/use-case": "^2.0 || ^3.0", + "symfony/cache": "^6.4 || ^7.4", + "symfony/dependency-injection": "^6.4 || ^7.4", + "symfony/config": "^6.4 || ^7.4", + "symfony/http-kernel": "^6.4 || ^7.4", + "symfony/security-core": "^6.4 || ^7.4", "doctrine/orm": "~2.3 || ~3.2", "doctrine/dbal": "~3.2", - "symfony/event-dispatcher": "~5.0 || ~6.4 || ~7.1" + "symfony/event-dispatcher": "^6.4 || ^7.4" }, "require-dev": { "phpunit/phpunit": "^10"