Skip to content

Commit 9ccadb6

Browse files
committed
Bump minimum requirement on XP core to 10.8.0, remove compatibility code
1 parent be8b1f9 commit 9ccadb6

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"description" : "Reflection",
77
"keywords": ["module", "xp"],
88
"require" : {
9-
"xp-framework/core": "^10.6",
9+
"xp-framework/core": "^10.8",
1010
"xp-framework/ast": "^7.0",
1111
"php" : ">=7.0.0"
1212
},

src/main/php/lang/reflection/Type.class.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
class Type {
1111
private $reflect;
1212
private $annotations= null;
13-
private static $ENUMS;
14-
15-
static function __static() {
16-
self::$ENUMS= interface_exists(\UnitEnum::class, false);
17-
}
1813

1914
/** @param ReflectionClass $reflect */
2015
public function __construct($reflect) {
@@ -58,7 +53,7 @@ public function kind(): Kind {
5853
return Kind::$INTERFACE;
5954
} else if ($this->reflect->isTrait()) {
6055
return Kind::$TRAIT;
61-
} else if ($this->reflect->isSubclassOf(Enum::class) || (self::$ENUMS && $this->reflect->isSubclassOf(\UnitEnum::class))) {
56+
} else if ($this->reflect->isSubclassOf(Enum::class) || $this->reflect->isSubclassOf(\UnitEnum::class)) {
6257
return Kind::$ENUM;
6358
} else {
6459
return Kind::$CLASS;

0 commit comments

Comments
 (0)