Menu
← Back to all error identifiers
Error Identifiers: classConstant.*
There are 35 error identifiers in the classConstant.* group:
-
classConstant.class non-ignorableClass constant cannot be named "class" because it is reserved.
-
classConstant.deprecated phpstan-deprecation-rulesAccessing a class constant marked as @deprecated.
-
classConstant.deprecatedClass phpstan-deprecation-rulesAccessing a class constant on a deprecated class.
-
classConstant.deprecatedEnum phpstan-deprecation-rulesAccessing a constant or case on a deprecated enum.
-
classConstant.deprecatedInterface phpstan-deprecation-rulesAccessing a class constant on a deprecated interface.
-
classConstant.deprecatedTrait phpstan-deprecation-rulesAccessing a class constant defined in a deprecated trait.
-
classConstant.dynamicFetch non-ignorableDynamic class constant fetch requires PHP 8.3 or later.
-
classConstant.dynamicString non-ignorableAccessing ::class on a string variable is not supported.
-
classConstant.final non-ignorableOverriding a class constant declared as final.
-
classConstant.finalNotSupported non-ignorableFinal class constants require PHP 8.1 or later.
-
classConstant.finalPrivate non-ignorablePrivate class constant cannot be declared as final.
-
Accessing a class constant marked as @internal from outside its package.
-
Accessing a constant on a class marked as @internal.
-
Accessing a constant on an enum marked as @internal.
-
Accessing a constant on an interface marked as @internal.
-
Accessing a constant defined in a trait marked as @internal.
-
classConstant.inTrait non-ignorableTrait constants require PHP 8.2 or later.
-
classConstant.missingNativeType non-ignorableOverriding constant is missing the native type declared in the parent.
-
Dynamic class constant name expression is not a string.
-
Dynamic class constant name must be a string type.
-
classConstant.nativeType non-ignorableOverriding constant's native type is not compatible with the parent's type.
-
classConstant.nativeTypeNotSupported non-ignorableNative types for class constants require PHP 8.3 or later.
-
classConstant.nonFinal non-ignorableOverriding a final trait constant without the final modifier.
-
Accessing a class constant on a non-object, non-class-string value.
-
Accessed class constant does not exist.
-
classConstant.notSupported non-ignorableAccessing ::class on an expression requires PHP 8.0 or later.
-
Accessing a constant directly on a trait is not allowed.
-
PHPDoc @var type on a class constant does not match the assigned value.
-
Accessing a private class constant from outside its class.
-
Accessing a protected class constant from outside its class hierarchy.
-
Overriding constant's type is not covariant with the parent's type.
-
PHPDoc @var type on a class constant contains an unresolvable type.
-
Private class constant is declared but never used.
-
classConstant.value non-ignorableAssigned value does not match the class constant's declared native type.
-
classConstant.visibility non-ignorableOverriding constant has more restrictive visibility than the parent.