diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index fdc8dab6c..362094d29 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -2,6 +2,14 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`. +## 6.49.1 + +Released: 2024-03-15 + +### Fixes + +* Fixes `class_implements(): Class AllowDynamicProperties does not exist and could not be loaded` error on PHP 8.1 and lower. + ## 6.49.0 Released: 2024-03-13 diff --git a/src/PHPUnit/AttributeParser.php b/src/PHPUnit/AttributeParser.php index 26b6ca000..a9fecd419 100644 --- a/src/PHPUnit/AttributeParser.php +++ b/src/PHPUnit/AttributeParser.php @@ -79,6 +79,10 @@ public static function forMethod(string $className, string $methodName): array */ public static function validAttribute($class): bool { + if (\is_string($class) && ! class_exists($class)) { + return false; + } + $implements = class_implements($class); return isset($implements[TestingFeature::class])