diff --git a/src/Psalm/Internal/Analyzer/ClosureAnalyzer.php b/src/Psalm/Internal/Analyzer/ClosureAnalyzer.php index afe483caf..0149e800c 100644 --- a/src/Psalm/Internal/Analyzer/ClosureAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ClosureAnalyzer.php @@ -14,6 +14,7 @@ use Psalm\Issue\DuplicateParam; use Psalm\Issue\PossiblyUndefinedVariable; use Psalm\Issue\UndefinedVariable; use Psalm\IssueBuffer; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type; use Psalm\Type\Atomic\TNamedObject; use Psalm\Type\Union; @@ -30,6 +31,7 @@ use function strtolower; */ final class ClosureAnalyzer extends FunctionLikeAnalyzer { + use UnserializeMemoryUsageSuppressionTrait; /** * @param PhpParser\Node\Expr\Closure|PhpParser\Node\Expr\ArrowFunction $function */ diff --git a/src/Psalm/Internal/Analyzer/FunctionAnalyzer.php b/src/Psalm/Internal/Analyzer/FunctionAnalyzer.php index bcf139590..3c8a293b0 100644 --- a/src/Psalm/Internal/Analyzer/FunctionAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/FunctionAnalyzer.php @@ -7,6 +7,7 @@ namespace Psalm\Internal\Analyzer; use PhpParser; use Psalm\Config; use Psalm\Context; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use UnexpectedValueException; use function is_string; @@ -18,6 +19,7 @@ use function strtolower; */ final class FunctionAnalyzer extends FunctionLikeAnalyzer { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(PhpParser\Node\Stmt\Function_ $function, SourceAnalyzer $source) { $codebase = $source->getCodebase(); diff --git a/src/Psalm/Internal/Analyzer/MethodAnalyzer.php b/src/Psalm/Internal/Analyzer/MethodAnalyzer.php index 3758cd06b..1c68bee7a 100644 --- a/src/Psalm/Internal/Analyzer/MethodAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/MethodAnalyzer.php @@ -20,6 +20,7 @@ use Psalm\IssueBuffer; use Psalm\StatementsSource; use Psalm\Storage\ClassLikeStorage; use Psalm\Storage\MethodStorage; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use UnexpectedValueException; use function in_array; @@ -31,6 +32,7 @@ use function strtolower; */ final class MethodAnalyzer extends FunctionLikeAnalyzer { + use UnserializeMemoryUsageSuppressionTrait; // https://github.com/php/php-src/blob/a83923044c48982c80804ae1b45e761c271966d3/Zend/zend_enum.c#L77-L95 private const FORBIDDEN_ENUM_METHODS = [ '__construct', diff --git a/src/Psalm/Storage/Assertion/Any.php b/src/Psalm/Storage/Assertion/Any.php index ad9e4e88c..b8e3e3e58 100644 --- a/src/Psalm/Storage/Assertion/Any.php +++ b/src/Psalm/Storage/Assertion/Any.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class Any extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return $this; diff --git a/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php b/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php index 73f0e3e9c..53e7cdffb 100644 --- a/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php +++ b/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class ArrayKeyDoesNotExist extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new ArrayKeyExists(); diff --git a/src/Psalm/Storage/Assertion/ArrayKeyExists.php b/src/Psalm/Storage/Assertion/ArrayKeyExists.php index aab0e3f01..c21d4428e 100644 --- a/src/Psalm/Storage/Assertion/ArrayKeyExists.php +++ b/src/Psalm/Storage/Assertion/ArrayKeyExists.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class ArrayKeyExists extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new ArrayKeyDoesNotExist(); diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php b/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php index 01e55a421..b37c99713 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class DoesNotHaveAtLeastCount extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param positive-int $count */ public function __construct(public readonly int $count) { diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php b/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php index 125b0bd8f..e557085cd 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class DoesNotHaveExactCount extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param positive-int $count */ public function __construct(public readonly int $count) { diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php b/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php index 72b5e0e20..4a6a891c4 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class DoesNotHaveMethod extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly string $method) { } diff --git a/src/Psalm/Storage/Assertion/Empty_.php b/src/Psalm/Storage/Assertion/Empty_.php index 344b99d6b..53bca41fa 100644 --- a/src/Psalm/Storage/Assertion/Empty_.php +++ b/src/Psalm/Storage/Assertion/Empty_.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class Empty_ extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new NonEmpty(); diff --git a/src/Psalm/Storage/Assertion/Falsy.php b/src/Psalm/Storage/Assertion/Falsy.php index d758b8352..5ac93ba42 100644 --- a/src/Psalm/Storage/Assertion/Falsy.php +++ b/src/Psalm/Storage/Assertion/Falsy.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class Falsy extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new Truthy(); diff --git a/src/Psalm/Storage/Assertion/HasArrayKey.php b/src/Psalm/Storage/Assertion/HasArrayKey.php index 1326f0951..8b0bb5096 100644 --- a/src/Psalm/Storage/Assertion/HasArrayKey.php +++ b/src/Psalm/Storage/Assertion/HasArrayKey.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use UnexpectedValueException; /** @@ -12,6 +13,7 @@ use UnexpectedValueException; */ final class HasArrayKey extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly string $key) { } diff --git a/src/Psalm/Storage/Assertion/HasAtLeastCount.php b/src/Psalm/Storage/Assertion/HasAtLeastCount.php index 479d51918..98581348f 100644 --- a/src/Psalm/Storage/Assertion/HasAtLeastCount.php +++ b/src/Psalm/Storage/Assertion/HasAtLeastCount.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class HasAtLeastCount extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param positive-int $count */ public function __construct(public readonly int $count) { diff --git a/src/Psalm/Storage/Assertion/HasExactCount.php b/src/Psalm/Storage/Assertion/HasExactCount.php index 9bb5b8edd..8f28be407 100644 --- a/src/Psalm/Storage/Assertion/HasExactCount.php +++ b/src/Psalm/Storage/Assertion/HasExactCount.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class HasExactCount extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param positive-int $count */ public function __construct(public readonly int $count) { diff --git a/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php b/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php index db401486a..39be9c6d6 100644 --- a/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php +++ b/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use UnexpectedValueException; /** @@ -12,6 +13,7 @@ use UnexpectedValueException; */ final class HasIntOrStringArrayAccess extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { throw new UnexpectedValueException('This should never be called'); diff --git a/src/Psalm/Storage/Assertion/HasMethod.php b/src/Psalm/Storage/Assertion/HasMethod.php index 87e090cad..ed994ce14 100644 --- a/src/Psalm/Storage/Assertion/HasMethod.php +++ b/src/Psalm/Storage/Assertion/HasMethod.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class HasMethod extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly string $method) { } diff --git a/src/Psalm/Storage/Assertion/HasStringArrayAccess.php b/src/Psalm/Storage/Assertion/HasStringArrayAccess.php index 1d2b519b7..3a8e65a28 100644 --- a/src/Psalm/Storage/Assertion/HasStringArrayAccess.php +++ b/src/Psalm/Storage/Assertion/HasStringArrayAccess.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use UnexpectedValueException; /** @@ -12,6 +13,7 @@ use UnexpectedValueException; */ final class HasStringArrayAccess extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { throw new UnexpectedValueException('This should never be called'); diff --git a/src/Psalm/Storage/Assertion/InArray.php b/src/Psalm/Storage/Assertion/InArray.php index 021f18f1d..6c88a4f3d 100644 --- a/src/Psalm/Storage/Assertion/InArray.php +++ b/src/Psalm/Storage/Assertion/InArray.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Union; /** @@ -12,6 +13,7 @@ use Psalm\Type\Union; */ final class InArray extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Union $type) { } diff --git a/src/Psalm/Storage/Assertion/IsAClass.php b/src/Psalm/Storage/Assertion/IsAClass.php index 1909c7eb0..905302771 100644 --- a/src/Psalm/Storage/Assertion/IsAClass.php +++ b/src/Psalm/Storage/Assertion/IsAClass.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsAClass extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param Atomic\TTemplateParamClass|Atomic\TNamedObject $type */ public function __construct(public readonly Atomic $type, public readonly bool $allow_string) { diff --git a/src/Psalm/Storage/Assertion/IsClassEqual.php b/src/Psalm/Storage/Assertion/IsClassEqual.php index fc117d150..88e8d1527 100644 --- a/src/Psalm/Storage/Assertion/IsClassEqual.php +++ b/src/Psalm/Storage/Assertion/IsClassEqual.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsClassEqual extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly string $type) { } diff --git a/src/Psalm/Storage/Assertion/IsClassNotEqual.php b/src/Psalm/Storage/Assertion/IsClassNotEqual.php index e5ccaa421..d94fb6246 100644 --- a/src/Psalm/Storage/Assertion/IsClassNotEqual.php +++ b/src/Psalm/Storage/Assertion/IsClassNotEqual.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsClassNotEqual extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly string $type) { } diff --git a/src/Psalm/Storage/Assertion/IsCountable.php b/src/Psalm/Storage/Assertion/IsCountable.php index 552d7904c..f1f213df5 100644 --- a/src/Psalm/Storage/Assertion/IsCountable.php +++ b/src/Psalm/Storage/Assertion/IsCountable.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsCountable extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new IsNotCountable(true); diff --git a/src/Psalm/Storage/Assertion/IsEqualIsset.php b/src/Psalm/Storage/Assertion/IsEqualIsset.php index ce2a2f279..7cc82cacb 100644 --- a/src/Psalm/Storage/Assertion/IsEqualIsset.php +++ b/src/Psalm/Storage/Assertion/IsEqualIsset.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsEqualIsset extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new Any(); diff --git a/src/Psalm/Storage/Assertion/IsGreaterThan.php b/src/Psalm/Storage/Assertion/IsGreaterThan.php index fa3087475..a4d4fb153 100644 --- a/src/Psalm/Storage/Assertion/IsGreaterThan.php +++ b/src/Psalm/Storage/Assertion/IsGreaterThan.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsGreaterThan extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly int $value) { } diff --git a/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php b/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php index 3d4dde1bd..295ad5eb4 100644 --- a/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php +++ b/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsGreaterThanOrEqualTo extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly int $value) { } diff --git a/src/Psalm/Storage/Assertion/IsIdentical.php b/src/Psalm/Storage/Assertion/IsIdentical.php index de3c3db39..86f521240 100644 --- a/src/Psalm/Storage/Assertion/IsIdentical.php +++ b/src/Psalm/Storage/Assertion/IsIdentical.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsIdentical extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/IsIsset.php b/src/Psalm/Storage/Assertion/IsIsset.php index be7c11bed..01fc40467 100644 --- a/src/Psalm/Storage/Assertion/IsIsset.php +++ b/src/Psalm/Storage/Assertion/IsIsset.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsIsset extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new IsNotIsset(); diff --git a/src/Psalm/Storage/Assertion/IsLessThan.php b/src/Psalm/Storage/Assertion/IsLessThan.php index 508b3f803..5587ad32c 100644 --- a/src/Psalm/Storage/Assertion/IsLessThan.php +++ b/src/Psalm/Storage/Assertion/IsLessThan.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsLessThan extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly int $value) { } diff --git a/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php b/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php index d6934334e..2ef344bf3 100644 --- a/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php +++ b/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsLessThanOrEqualTo extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly int $value) { } diff --git a/src/Psalm/Storage/Assertion/IsLooselyEqual.php b/src/Psalm/Storage/Assertion/IsLooselyEqual.php index a5d5b6ac4..4fd2aa367 100644 --- a/src/Psalm/Storage/Assertion/IsLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsLooselyEqual.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsLooselyEqual extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/IsNotAClass.php b/src/Psalm/Storage/Assertion/IsNotAClass.php index 80303df36..d710eb7ee 100644 --- a/src/Psalm/Storage/Assertion/IsNotAClass.php +++ b/src/Psalm/Storage/Assertion/IsNotAClass.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsNotAClass extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param Atomic\TTemplateParamClass|Atomic\TNamedObject $type */ public function __construct(public readonly Atomic $type, public readonly bool $allow_string) { diff --git a/src/Psalm/Storage/Assertion/IsNotCountable.php b/src/Psalm/Storage/Assertion/IsNotCountable.php index 5f11cf6df..bf9b4db9a 100644 --- a/src/Psalm/Storage/Assertion/IsNotCountable.php +++ b/src/Psalm/Storage/Assertion/IsNotCountable.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsNotCountable extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly bool $is_negatable) { } diff --git a/src/Psalm/Storage/Assertion/IsNotIdentical.php b/src/Psalm/Storage/Assertion/IsNotIdentical.php index 11c482d1c..22b6e7c02 100644 --- a/src/Psalm/Storage/Assertion/IsNotIdentical.php +++ b/src/Psalm/Storage/Assertion/IsNotIdentical.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsNotIdentical extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/IsNotIsset.php b/src/Psalm/Storage/Assertion/IsNotIsset.php index d73aa64b6..890b3fdb1 100644 --- a/src/Psalm/Storage/Assertion/IsNotIsset.php +++ b/src/Psalm/Storage/Assertion/IsNotIsset.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class IsNotIsset extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new IsIsset(); diff --git a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php index bb8d4ee7d..63a5a78f8 100644 --- a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsNotLooselyEqual extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/IsNotType.php b/src/Psalm/Storage/Assertion/IsNotType.php index 1d51e0370..28a769ca2 100644 --- a/src/Psalm/Storage/Assertion/IsNotType.php +++ b/src/Psalm/Storage/Assertion/IsNotType.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsNotType extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/IsType.php b/src/Psalm/Storage/Assertion/IsType.php index 709208067..0bc6c63c9 100644 --- a/src/Psalm/Storage/Assertion/IsType.php +++ b/src/Psalm/Storage/Assertion/IsType.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -12,6 +13,7 @@ use Psalm\Type\Atomic; */ final class IsType extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly Atomic $type) { } diff --git a/src/Psalm/Storage/Assertion/NestedAssertions.php b/src/Psalm/Storage/Assertion/NestedAssertions.php index 353807d24..7d6f405ca 100644 --- a/src/Psalm/Storage/Assertion/NestedAssertions.php +++ b/src/Psalm/Storage/Assertion/NestedAssertions.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use function json_encode; @@ -15,6 +16,7 @@ use const JSON_THROW_ON_ERROR; */ final class NestedAssertions extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param array>> $assertions */ public function __construct(public readonly array $assertions) { diff --git a/src/Psalm/Storage/Assertion/NonEmpty.php b/src/Psalm/Storage/Assertion/NonEmpty.php index ac208f4d2..159da72e7 100644 --- a/src/Psalm/Storage/Assertion/NonEmpty.php +++ b/src/Psalm/Storage/Assertion/NonEmpty.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class NonEmpty extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new Empty_(); diff --git a/src/Psalm/Storage/Assertion/NonEmptyCountable.php b/src/Psalm/Storage/Assertion/NonEmptyCountable.php index a36bffdd2..8ab74c5bf 100644 --- a/src/Psalm/Storage/Assertion/NonEmptyCountable.php +++ b/src/Psalm/Storage/Assertion/NonEmptyCountable.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class NonEmptyCountable extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public readonly bool $is_negatable) { } diff --git a/src/Psalm/Storage/Assertion/NotInArray.php b/src/Psalm/Storage/Assertion/NotInArray.php index 17c385f88..fd47839f8 100644 --- a/src/Psalm/Storage/Assertion/NotInArray.php +++ b/src/Psalm/Storage/Assertion/NotInArray.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Union; /** @@ -12,6 +13,7 @@ use Psalm\Type\Union; */ final class NotInArray extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public readonly Union $type, ) { diff --git a/src/Psalm/Storage/Assertion/NotNestedAssertions.php b/src/Psalm/Storage/Assertion/NotNestedAssertions.php index 4ca457dcf..acf8696b1 100644 --- a/src/Psalm/Storage/Assertion/NotNestedAssertions.php +++ b/src/Psalm/Storage/Assertion/NotNestedAssertions.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use function json_encode; @@ -15,6 +16,7 @@ use const JSON_THROW_ON_ERROR; */ final class NotNestedAssertions extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; /** @param array>> $assertions */ public function __construct(public readonly array $assertions) { diff --git a/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php b/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php index 130616778..b9eb20f26 100644 --- a/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php +++ b/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class NotNonEmptyCountable extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new NonEmptyCountable(true); diff --git a/src/Psalm/Storage/Assertion/Truthy.php b/src/Psalm/Storage/Assertion/Truthy.php index 35ec5d32e..c1e62224f 100644 --- a/src/Psalm/Storage/Assertion/Truthy.php +++ b/src/Psalm/Storage/Assertion/Truthy.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Psalm\Storage\Assertion; use Psalm\Storage\Assertion; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; /** * @psalm-immutable */ final class Truthy extends Assertion { + use UnserializeMemoryUsageSuppressionTrait; public function getNegation(): Assertion { return new Falsy(); diff --git a/src/Psalm/Storage/FunctionStorage.php b/src/Psalm/Storage/FunctionStorage.php index f9c9dcfee..043bb1832 100644 --- a/src/Psalm/Storage/FunctionStorage.php +++ b/src/Psalm/Storage/FunctionStorage.php @@ -6,6 +6,7 @@ namespace Psalm\Storage; final class FunctionStorage extends FunctionLikeStorage { + use UnserializeMemoryUsageSuppressionTrait; /** @var array */ public array $byref_uses = []; } diff --git a/src/Psalm/Storage/MethodStorage.php b/src/Psalm/Storage/MethodStorage.php index c6ebc2d8a..3dd5986db 100644 --- a/src/Psalm/Storage/MethodStorage.php +++ b/src/Psalm/Storage/MethodStorage.php @@ -8,6 +8,7 @@ use Psalm\Type\Union; final class MethodStorage extends FunctionLikeStorage { + use UnserializeMemoryUsageSuppressionTrait; public bool $is_static = false; public int $visibility = 0; diff --git a/src/Psalm/Type/Atomic/Scalar.php b/src/Psalm/Type/Atomic/Scalar.php index 739bb9bb5..c4597dffb 100644 --- a/src/Psalm/Type/Atomic/Scalar.php +++ b/src/Psalm/Type/Atomic/Scalar.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -11,6 +12,7 @@ use Psalm\Type\Atomic; */ abstract class Scalar extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function canBeFullyExpressedInPhp(int $analysis_php_version_id): bool { return true; diff --git a/src/Psalm/Type/Atomic/TArray.php b/src/Psalm/Type/Atomic/TArray.php index 0aee4453e..37cf0bc69 100644 --- a/src/Psalm/Type/Atomic/TArray.php +++ b/src/Psalm/Type/Atomic/TArray.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Analyzer\StatementsAnalyzer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -19,6 +20,7 @@ use function count; */ class TArray extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; /** * @use GenericTrait */ diff --git a/src/Psalm/Type/Atomic/TCallable.php b/src/Psalm/Type/Atomic/TCallable.php index 90fb430a2..cbf8141d1 100644 --- a/src/Psalm/Type/Atomic/TCallable.php +++ b/src/Psalm/Type/Atomic/TCallable.php @@ -8,6 +8,7 @@ use Psalm\Codebase; use Psalm\Internal\Analyzer\StatementsAnalyzer; use Psalm\Internal\Type\TemplateResult; use Psalm\Storage\FunctionLikeParameter; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -18,6 +19,7 @@ use Psalm\Type\Union; */ final class TCallable extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; use CallableTrait; public string $value; diff --git a/src/Psalm/Type/Atomic/TClassConstant.php b/src/Psalm/Type/Atomic/TClassConstant.php index 21e8c0a25..6acc150a2 100644 --- a/src/Psalm/Type/Atomic/TClassConstant.php +++ b/src/Psalm/Type/Atomic/TClassConstant.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type; use Psalm\Type\Atomic; @@ -14,6 +15,7 @@ use Psalm\Type\Atomic; */ final class TClassConstant extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $fq_classlike_name, public string $const_name, diff --git a/src/Psalm/Type/Atomic/TClassStringMap.php b/src/Psalm/Type/Atomic/TClassStringMap.php index aae43a24b..e64f0c603 100644 --- a/src/Psalm/Type/Atomic/TClassStringMap.php +++ b/src/Psalm/Type/Atomic/TClassStringMap.php @@ -9,6 +9,7 @@ use Psalm\Internal\Analyzer\StatementsAnalyzer; use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; use Psalm\Internal\Type\TemplateStandinTypeReplacer; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -21,6 +22,7 @@ use Psalm\Type\Union; */ final class TClassStringMap extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; /** * Constructs a new instance of a list */ diff --git a/src/Psalm/Type/Atomic/TClosedResource.php b/src/Psalm/Type/Atomic/TClosedResource.php index 3bde7d550..ffdf3697f 100644 --- a/src/Psalm/Type/Atomic/TClosedResource.php +++ b/src/Psalm/Type/Atomic/TClosedResource.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ final class TClosedResource extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'closed-resource'; diff --git a/src/Psalm/Type/Atomic/TConditional.php b/src/Psalm/Type/Atomic/TConditional.php index 4d6fc9f9a..6509a5747 100644 --- a/src/Psalm/Type/Atomic/TConditional.php +++ b/src/Psalm/Type/Atomic/TConditional.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -17,6 +18,7 @@ use Psalm\Type\Union; */ final class TConditional extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $param_name, public string $defining_class, diff --git a/src/Psalm/Type/Atomic/TIterable.php b/src/Psalm/Type/Atomic/TIterable.php index a9b9ae988..52878f27c 100644 --- a/src/Psalm/Type/Atomic/TIterable.php +++ b/src/Psalm/Type/Atomic/TIterable.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Analyzer\StatementsAnalyzer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -22,6 +23,7 @@ use function substr; */ final class TIterable extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; use HasIntersectionTrait; /** * @use GenericTrait diff --git a/src/Psalm/Type/Atomic/TKeyedArray.php b/src/Psalm/Type/Atomic/TKeyedArray.php index 9a7da6213..189784ec3 100644 --- a/src/Psalm/Type/Atomic/TKeyedArray.php +++ b/src/Psalm/Type/Atomic/TKeyedArray.php @@ -10,6 +10,7 @@ use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; use Psalm\Internal\Type\TemplateStandinTypeReplacer; use Psalm\Internal\Type\TypeCombiner; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -32,6 +33,7 @@ use function str_replace; */ class TKeyedArray extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; /** * If the shape has fallback params then they are here * diff --git a/src/Psalm/Type/Atomic/TMixed.php b/src/Psalm/Type/Atomic/TMixed.php index 579c8a347..a10195837 100644 --- a/src/Psalm/Type/Atomic/TMixed.php +++ b/src/Psalm/Type/Atomic/TMixed.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ class TMixed extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public bool $from_loop_isset = false, bool $from_docblock = false) { parent::__construct($from_docblock); diff --git a/src/Psalm/Type/Atomic/TNever.php b/src/Psalm/Type/Atomic/TNever.php index a9918aeb8..6121a752b 100644 --- a/src/Psalm/Type/Atomic/TNever.php +++ b/src/Psalm/Type/Atomic/TNever.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -14,6 +15,7 @@ use Psalm\Type\Atomic; */ final class TNever extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'never'; diff --git a/src/Psalm/Type/Atomic/TNull.php b/src/Psalm/Type/Atomic/TNull.php index 4f8df9abe..e8ee44fef 100644 --- a/src/Psalm/Type/Atomic/TNull.php +++ b/src/Psalm/Type/Atomic/TNull.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ final class TNull extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'null'; diff --git a/src/Psalm/Type/Atomic/TObject.php b/src/Psalm/Type/Atomic/TObject.php index 14b5036a7..e6c4556aa 100644 --- a/src/Psalm/Type/Atomic/TObject.php +++ b/src/Psalm/Type/Atomic/TObject.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ class TObject extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'object'; diff --git a/src/Psalm/Type/Atomic/TPropertiesOf.php b/src/Psalm/Type/Atomic/TPropertiesOf.php index 7724143c1..c9df9d0bd 100644 --- a/src/Psalm/Type/Atomic/TPropertiesOf.php +++ b/src/Psalm/Type/Atomic/TPropertiesOf.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -15,6 +16,7 @@ use Psalm\Type\Atomic; */ final class TPropertiesOf extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; // These should match the values of // `Psalm\Internal\Analyzer\ClassLikeAnalyzer::VISIBILITY_*`, as they are // used to compared against properties visibililty. diff --git a/src/Psalm/Type/Atomic/TResource.php b/src/Psalm/Type/Atomic/TResource.php index b01a0987b..f67527df2 100644 --- a/src/Psalm/Type/Atomic/TResource.php +++ b/src/Psalm/Type/Atomic/TResource.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ final class TResource extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'resource'; diff --git a/src/Psalm/Type/Atomic/TTemplateIndexedAccess.php b/src/Psalm/Type/Atomic/TTemplateIndexedAccess.php index c572c1852..102b8c0e5 100644 --- a/src/Psalm/Type/Atomic/TTemplateIndexedAccess.php +++ b/src/Psalm/Type/Atomic/TTemplateIndexedAccess.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -11,6 +12,7 @@ use Psalm\Type\Atomic; */ final class TTemplateIndexedAccess extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $array_param_name, public string $offset_param_name, diff --git a/src/Psalm/Type/Atomic/TTemplateKeyOf.php b/src/Psalm/Type/Atomic/TTemplateKeyOf.php index 4773dc9d4..c6a728c88 100644 --- a/src/Psalm/Type/Atomic/TTemplateKeyOf.php +++ b/src/Psalm/Type/Atomic/TTemplateKeyOf.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -17,6 +18,7 @@ use Psalm\Type\Union; */ final class TTemplateKeyOf extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $param_name, public string $defining_class, diff --git a/src/Psalm/Type/Atomic/TTemplateParam.php b/src/Psalm/Type/Atomic/TTemplateParam.php index 9f618b309..84169899a 100644 --- a/src/Psalm/Type/Atomic/TTemplateParam.php +++ b/src/Psalm/Type/Atomic/TTemplateParam.php @@ -6,6 +6,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -19,6 +20,7 @@ use function implode; */ final class TTemplateParam extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; use HasIntersectionTrait; /** diff --git a/src/Psalm/Type/Atomic/TTemplatePropertiesOf.php b/src/Psalm/Type/Atomic/TTemplatePropertiesOf.php index 4efe92a60..48cd32f85 100644 --- a/src/Psalm/Type/Atomic/TTemplatePropertiesOf.php +++ b/src/Psalm/Type/Atomic/TTemplatePropertiesOf.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -17,6 +18,7 @@ use Psalm\Type\Union; */ final class TTemplatePropertiesOf extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; /** * @param TPropertiesOf::VISIBILITY_*|null $visibility_filter */ diff --git a/src/Psalm/Type/Atomic/TTemplateValueOf.php b/src/Psalm/Type/Atomic/TTemplateValueOf.php index 583d07957..23d33af5d 100644 --- a/src/Psalm/Type/Atomic/TTemplateValueOf.php +++ b/src/Psalm/Type/Atomic/TTemplateValueOf.php @@ -7,6 +7,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Internal\Type\TemplateInferredTypeReplacer; use Psalm\Internal\Type\TemplateResult; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -17,6 +18,7 @@ use Psalm\Type\Union; */ final class TTemplateValueOf extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $param_name, public string $defining_class, diff --git a/src/Psalm/Type/Atomic/TTypeAlias.php b/src/Psalm/Type/Atomic/TTypeAlias.php index ebda8e411..9a76d8040 100644 --- a/src/Psalm/Type/Atomic/TTypeAlias.php +++ b/src/Psalm/Type/Atomic/TTypeAlias.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -11,6 +12,7 @@ use Psalm\Type\Atomic; */ final class TTypeAlias extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct( public string $declaring_fq_classlike_name, public string $alias_name, diff --git a/src/Psalm/Type/Atomic/TValueOf.php b/src/Psalm/Type/Atomic/TValueOf.php index 38e095709..55a9d8d6a 100644 --- a/src/Psalm/Type/Atomic/TValueOf.php +++ b/src/Psalm/Type/Atomic/TValueOf.php @@ -6,6 +6,7 @@ namespace Psalm\Type\Atomic; use Psalm\Codebase; use Psalm\Storage\EnumCaseStorage; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; use Psalm\Type\Union; @@ -20,6 +21,7 @@ use function assert; */ final class TValueOf extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function __construct(public Union $type, bool $from_docblock = false) { parent::__construct($from_docblock); diff --git a/src/Psalm/Type/Atomic/TVoid.php b/src/Psalm/Type/Atomic/TVoid.php index cac95d622..d1cd2faf6 100644 --- a/src/Psalm/Type/Atomic/TVoid.php +++ b/src/Psalm/Type/Atomic/TVoid.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Psalm\Type\Atomic; +use Psalm\Storage\UnserializeMemoryUsageSuppressionTrait; use Psalm\Type\Atomic; /** @@ -13,6 +14,7 @@ use Psalm\Type\Atomic; */ final class TVoid extends Atomic { + use UnserializeMemoryUsageSuppressionTrait; public function getKey(bool $include_extra = true): string { return 'void';