From a2c8189ef617d8a27bdfd4abba6a46a1a904b19d Mon Sep 17 00:00:00 2001 From: Alexandre Lemaire Date: Tue, 19 Mar 2024 23:38:00 -0400 Subject: [PATCH] Also support PHP 8.2 --- .github/workflows/phpspec-task.yml | 7 +------ composer.json | 6 +++--- src/CirclicalAutoWire/Service/RouterService.php | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/phpspec-task.yml b/.github/workflows/phpspec-task.yml index d647491..29eff6e 100644 --- a/.github/workflows/phpspec-task.yml +++ b/.github/workflows/phpspec-task.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: operating-system: [ ubuntu-18.04 ] - php-versions: ['8.0.12', '8.1', '8.2' ] + php-versions: ['8.0.12', '8.1', '8.2', '8.3' ] name: Evaluate Behavior, ${{ matrix.php-versions }} on ${{ matrix.operating-system }} steps: # Get the source code @@ -34,11 +34,6 @@ jobs: # Execute PHPSpec - name: Execute PHPSpec run: XDEBUG_MODE=coverage vendor/bin/phpspec --config=phpspec.yml run - # Push Coverage -# - name: Push Coverage -# env: -# CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} -# run: vendor/bin/codacycoverage clover build/coverage.xml diff --git a/composer.json b/composer.json index d3f1d69..78d565b 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "minimum-stability": "dev", "require": { - "php": "~8.0.12 || ~8.1.0 || ~8.2.0 ", + "php": "~8.0.12 || ~8.1.0 || ~8.2.0 || ~8.3.0", "laminas/laminas-mvc": "^3.3", "laminas/laminas-servicemanager": "^3.11", "laminas/laminas-eventmanager": "^3.4", @@ -34,7 +34,7 @@ "laminas/laminas-config": "^3.7", "laminas/laminas-cli": "^1.4.0", "doctrine/annotations": "^1.13.0", - "roave/better-reflection": "^4.12 | ^5.4", + "roave/better-reflection": "^4.12 | ^5.4 | ^6.24", "psr/container": "*" }, @@ -42,7 +42,7 @@ "phpspec/phpspec": "6.1.* | ^7.0.1 | ^7.2.0", "friends-of-phpspec/phpspec-code-coverage": "@stable", "codacy/coverage": "dev-master", - "phpstan/phpstan": "1.1.2", + "phpstan/phpstan": "^1.10", "laminas/laminas-coding-standard": "^2.3.0" }, "autoload": { diff --git a/src/CirclicalAutoWire/Service/RouterService.php b/src/CirclicalAutoWire/Service/RouterService.php index eb32bb1..316ccbf 100644 --- a/src/CirclicalAutoWire/Service/RouterService.php +++ b/src/CirclicalAutoWire/Service/RouterService.php @@ -66,7 +66,7 @@ public function getAnnotations(): array public function parseController(string $controllerClass) { $class = new ReflectionClass($controllerClass); - /** @var Route $classAnnotation */ + /** @var ?Route $classAnnotation */ $classAnnotation = $this->reader->getClassAnnotation($class, Route::class); // First, get all annotations for this controller