diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c96b8aca7edac3df3a56eea4f24317f190ca8c4b..320b260885495592cdde95c2589effbb7306eb2a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
 default:
-  image: grifart/php8.0-with-all-modules-and-various-tools
+  image: grifart/php8.2-with-all-modules-and-various-tools
 
 stages:
   - build
diff --git a/composer.json b/composer.json
index 927b1ae28e9ab0a356b8f67fb47b24f1854d371e..7601556df23b707d6dd949d5fa635aba37cef1ae 100644
--- a/composer.json
+++ b/composer.json
@@ -24,7 +24,7 @@
 		"phpstan": "phpstan analyze --ansi --no-progress --no-interaction"
 	},
 	"require": {
-		"php": "^8.0",
+		"php": "^8.2",
 		"ext-tokenizer": "*",
 		"nette/finder": "^2.5||^3.0",
 		"nette/php-generator": "^4.0.1",
diff --git a/src/Definition/Types/CheckedClassType.php b/src/Definition/Types/CheckedClassType.php
index 043cd8800fffe9cc21d184a23d36b221f3c08ecb..0ac8f0c564581dacafcf7afded5c2ea4320ba8a3 100644
--- a/src/Definition/Types/CheckedClassType.php
+++ b/src/Definition/Types/CheckedClassType.php
@@ -16,7 +16,7 @@ final class CheckedClassType implements Type, ClassType
 
 	public function __construct(string $typeName)
 	{
-		if ( ! \class_exists($typeName) && ! \interface_exists($typeName) && (\PHP_VERSION_ID >= 80100 && ! \enum_exists($typeName))) {
+		if ( ! \class_exists($typeName) && ! \interface_exists($typeName) && ! \enum_exists($typeName)) {
 			throw new \InvalidArgumentException(\sprintf(
 				'Class type %s was not found. Make sure your autoloading setup is correct.',
 				$typeName
diff --git a/src/Definition/Types/functions.php b/src/Definition/Types/functions.php
index aa8c638b8518788b661d15b3a7cc4b8b111c0e52..5ee25984599450700e2dd7a3a1fce3e13320fd46 100644
--- a/src/Definition/Types/functions.php
+++ b/src/Definition/Types/functions.php
@@ -23,7 +23,7 @@ function resolve(Type|ClassDefinition|string $type): Type {
 		return SimpleType::$type(); // @phpstan-ignore return.type
 	}
 
-	if (\class_exists($type) || \interface_exists($type) || (\PHP_VERSION_ID >= 80100 && \enum_exists($type))) {
+	if (\class_exists($type) || \interface_exists($type) || \enum_exists($type)) {
 		return new CheckedClassType($type);
 	}