diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
index aa14250c..1352013d 100644
--- a/.github/workflows/coding-standards.yml
+++ b/.github/workflows/coding-standards.yml
@@ -9,4 +9,4 @@ jobs:
cs:
uses: ray-di/.github/.github/workflows/coding-standards.yml@v1
with:
- php_version: 8.1
+ php_version: 8.2
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index ffaa511b..9ae40e67 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -9,4 +9,4 @@ jobs:
sa:
uses: ray-di/.github/.github/workflows/static-analysis.yml@v1
with:
- php_version: 8.1
+ php_version: 8.2
diff --git a/.gitignore b/.gitignore
index a101f5eb..27150ba5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,4 @@
/composer.lock
/coverage.xml
/vendor-bin/**/vendor
-/.phpunit-cache
+/.phpunit.cache/
diff --git a/composer.json b/composer.json
index 9872cb3a..309e7fd3 100644
--- a/composer.json
+++ b/composer.json
@@ -11,13 +11,15 @@
],
"require": {
"php": "^7.2 || ^8.0",
+ "ext-hash": "*",
+ "ext-tokenizer": "*",
"doctrine/annotations": "^1.12 || ^2.0",
- "koriym/attributes": "^1.0.3",
- "nikic/php-parser": "^4.16"
+ "koriym/attributes": "^1.0.3"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
- "phpunit/phpunit": "^8.5.23 || ^9.5.10"
+ "phpunit/phpunit": "^8.5.23 || ^9.5.10",
+ "nikic/php-parser": "^4.16"
},
"config": {
"sort-packages": true,
diff --git a/phpcs.xml b/phpcs.xml
index 15d1f034..68a24ee3 100755
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -40,7 +40,6 @@ com
-
diff --git a/phpmd.xml b/phpmd.xml
index b97e7d10..f0038972 100644
--- a/phpmd.xml
+++ b/phpmd.xml
@@ -5,7 +5,11 @@
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
+
+
+
+
+
@@ -27,7 +31,7 @@
-
+
diff --git a/phpstan.neon b/phpstan.neon
index e05600cf..29b7ee3e 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,4 +1,5 @@
parameters:
+ phpVersion: 80200
level: max
paths:
- sl-src
diff --git a/psalm.xml b/psalm.xml
index 59c3c010..ed534dd4 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -5,7 +5,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config https://psalm.dev/schema/config"
findUnusedBaselineEntry="true"
- findUnusedCode="false"
+ phpVersion="8.2"
+ findUnusedCode = "false"
>
diff --git a/sl-src/CacheReader.php b/sl-src/CacheReader.php
index 10e779fd..6ec584a8 100644
--- a/sl-src/CacheReader.php
+++ b/sl-src/CacheReader.php
@@ -15,6 +15,7 @@
use function array_merge;
use function assert;
use function filemtime;
+use function is_string;
use function max;
use function rawurlencode;
@@ -161,7 +162,7 @@ private function getLastModification(ReflectionClass $class): int // @phpstan-i
$parent = $class->getParentClass();
$lastModification = max(array_merge(
- [$filename ? filemtime($filename) : 0],
+ [is_string($filename) ? filemtime($filename) : 0],
array_map(function (ReflectionClass $reflectionTrait): int {
return $this->getTraitLastModificationTime($reflectionTrait);
}, $class->getTraits()),
@@ -185,7 +186,7 @@ private function getTraitLastModificationTime(ReflectionClass $reflectionTrait):
}
$lastModificationTime = max(array_merge(
- [$fileName ? filemtime($fileName) : 0],
+ [is_string($fileName) ? filemtime($fileName) : 0],
array_map(function (ReflectionClass $reflectionTrait): int {
return $this->getTraitLastModificationTime($reflectionTrait);
}, $reflectionTrait->getTraits())
diff --git a/src/AopClass.php b/src/AopClass.php
deleted file mode 100644
index 5845084d..00000000
--- a/src/AopClass.php
+++ /dev/null
@@ -1,66 +0,0 @@
-aopClassName = $aopClassName;
- $this->codeGenMethod = new CodeGenMethod($parser, $factory);
- $this->traitStmt = $factory->useTrait('\Ray\Aop\InterceptTrait')->getNode();
- }
-
- /**
- * {@inheritDoc}
- *
- * @param ReflectionClass