From 8c49f69a62ac7f0ee8002a71d2d2ed76fe24b9cb Mon Sep 17 00:00:00 2001 From: Michael Diodone Date: Mon, 8 Jan 2024 16:54:32 +0100 Subject: [PATCH 1/2] Revert laminas-code to upstream This also raises the minimum version to PHP 8.1 --- .github/workflows/tests.yml | 2 +- README.md | 9 ++------- composer.json | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3589fc..949c585 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - php-versions: ['8.0', '8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3'] dependency-versions: ['lowest', 'highest'] runs-on: ubuntu-latest diff --git a/README.md b/README.md index cd22eeb..77e10a1 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ the use of reflection on production. # Prerequisites -This library needs PHP 8.0+. +This library needs PHP 8.1+. -It has been tested using PHP 8.0 - PHP 8.1 - PHP 8.2. +It has been tested using PHP 8.1, PHP 8.2 and PHP 8.3. # Installation @@ -143,12 +143,7 @@ class GenerateDependencyInjectionFactories extends \Symfony\Component\Console\Co require_once $fullpath; $astLocator = (new \Roave\BetterReflection\BetterReflection())->astLocator(); - - // for roave/better-reflection 4.x (PHP 7.4) - $reflector = new \Roave\BetterReflection\Reflector\ClassReflector(new Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator($fileName, $astLocator)); - $classes = $reflector->getAllClasses(); - // for roave/better-reflection 5.x (PHP 8.0) $reflector = new \Roave\BetterReflection\Reflector\DefaultReflector(new Roave\BetterReflection\SourceLocator\Type\SingleFileSourceLocator($fileName, $astLocator)); $classes = $reflector->reflectAllClasses(); diff --git a/composer.json b/composer.json index 999af67..08e6003 100644 --- a/composer.json +++ b/composer.json @@ -16,9 +16,9 @@ } ], "require": { - "php": ">=8.0", + "php": ">=8.1", "doctrine/annotations": "^1.12|^2.0.0", - "rg/laminas-code": "4.7.4", + "laminas/laminas-code": "^4.13", "psr/log": "^1.0.0" }, "require-dev": { From ee7df4e36401f66939524a8cf0233ea20a364894 Mon Sep 17 00:00:00 2001 From: Michael Diodone Date: Mon, 8 Jan 2024 17:20:26 +0100 Subject: [PATCH 2/2] Remove PHP 8.3 as it doesn't work, yet --- .github/workflows/tests.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 949c585..4e7216d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.1', '8.2'] dependency-versions: ['lowest', 'highest'] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 77e10a1..a1fb93c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ the use of reflection on production. This library needs PHP 8.1+. -It has been tested using PHP 8.1, PHP 8.2 and PHP 8.3. +It has been tested using PHP 8.1 and PHP 8.2. # Installation