Menu
← Back to all error identifiers
Error Identifiers: new.*
There are 14 error identifiers in the new.* group:
-
Instantiating an abstract class.
-
Invalid date string passed to the DateTime constructor.
-
Invalid date string passed to the DateTimeImmutable constructor.
-
new.deprecatedClass phpstan-deprecation-rulesInstantiating a deprecated class.
-
Enums cannot be instantiated with the new keyword.
-
Interfaces cannot be instantiated.
-
Instantiating a class marked as @internal from outside its package.
-
Class without a constructor is instantiated with arguments.
-
Instantiating a class with a private constructor from outside the class.
-
Instantiating a class with a protected constructor from outside the class hierarchy.
-
Object instantiation on a separate line has no effect when the constructor is pure.
-
Unsafe usage of new static() in a non-final class.
-
Using new static() in a static method of an abstract class.
-
Traits cannot be instantiated with the new keyword.