Skip to content
Snippets Groups Projects
Verified Commit 959a4ad2 authored by Jiří Pudil's avatar Jiří Pudil
Browse files

chore: bump php requirement

parent 42fffcf8
No related branches found
No related tags found
No related merge requests found
Pipeline #58484 passed
default: default:
image: grifart/php8.0-with-all-modules-and-various-tools image: grifart/php8.2-with-all-modules-and-various-tools
stages: stages:
- build - build
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"phpstan": "phpstan analyze --ansi --no-progress --no-interaction" "phpstan": "phpstan analyze --ansi --no-progress --no-interaction"
}, },
"require": { "require": {
"php": "^8.0", "php": "^8.2",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"nette/finder": "^2.5||^3.0", "nette/finder": "^2.5||^3.0",
"nette/php-generator": "^4.0.1", "nette/php-generator": "^4.0.1",
......
...@@ -16,7 +16,7 @@ final class CheckedClassType implements Type, ClassType ...@@ -16,7 +16,7 @@ final class CheckedClassType implements Type, ClassType
public function __construct(string $typeName) 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( throw new \InvalidArgumentException(\sprintf(
'Class type %s was not found. Make sure your autoloading setup is correct.', 'Class type %s was not found. Make sure your autoloading setup is correct.',
$typeName $typeName
......
...@@ -23,7 +23,7 @@ function resolve(Type|ClassDefinition|string $type): Type { ...@@ -23,7 +23,7 @@ function resolve(Type|ClassDefinition|string $type): Type {
return SimpleType::$type(); // @phpstan-ignore return.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); return new CheckedClassType($type);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment