Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/PHPStan/Build/TurboAttributeCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use PhpParser\Node\Expr\BinaryOp\Plus;
use PhpParser\Node\Expr\CallLike;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\Clone_;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\Eval_;
Expand Down Expand Up @@ -342,6 +343,7 @@ final class TurboAttributeCollector
'nodeToReflection' => NodeToReflection::class,
'locatedSource' => LocatedSource::class,
'betterReflectionEnum' => \PHPStan\BetterReflection\Reflection\ReflectionEnum::class,
'cloneExpr' => Clone_::class,
];

private string $realRoot;
Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ArgumentsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
use PHPStan\Reflection\ResolvedFunctionVariant;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\ClosureType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\FunctionParameterClosureThisExtension;
Expand Down Expand Up @@ -80,6 +81,7 @@
* parameter types and bound $this, by-ref and out types, invalidation).
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/ArgumentsHandler.cpp')]
final class ArgumentsHandler
{

Expand Down
4 changes: 2 additions & 2 deletions src/Analyser/ArgumentsNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Constant\ConstantArrayType;
use function array_is_list;
use function array_key_exists;
Expand All @@ -34,7 +34,7 @@
/**
* @api
*/
#[ReferencedByTurboExtension(key: 'argumentsNormalizer')]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/ArgumentsNormalizer.cpp')]
final class ArgumentsNormalizer
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/AttributesHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Turbo\ShadowedByTurboExtension;

/**
* Processes attribute arguments for NodeScopeResolver - as constructor
* arguments when the attribute class has a constructor, as plain expressions
* otherwise.
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/AttributesHandler.cpp')]
final class AttributesHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/ArrayDimFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\NeverType;
use PHPStan\Type\ObjectType;
Expand All @@ -41,6 +42,7 @@
* @implements ExprHandler<ArrayDimFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/ArrayDimFetchHandler.cpp')]
final class ArrayDimFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/ClassConstFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\ShouldNotHappenException;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use function array_merge;
Expand All @@ -27,6 +28,7 @@
* @implements ExprHandler<ClassConstFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/ClassConstFetchHandler.cpp')]
final class ClassConstFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/CloneHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use PHPStan\Analyser\Traverser\CloneTypeTraverser;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\ObjectWithoutClassType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
Expand All @@ -25,6 +26,7 @@
* @implements ExprHandler<Clone_>
*/
#[AutowiredService]
#[ReferencedByTurboExtension(key: 'cloneHandler')]
final class CloneHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/ClosureHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\Analyser\VariableFlow;
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Turbo\ReferencedByTurboExtension;
use function is_string;

/**
* @implements ExprHandler<Closure>
*/
#[AutowiredService]
#[ReferencedByTurboExtension(key: 'closureHandler')]
final class ClosureHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/ConstFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\TypeSpecifierContext;
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\ErrorType;
use PHPStan\Type\NullType;
Expand All @@ -27,6 +28,7 @@
* @implements ExprHandler<ConstFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/ConstFetchHandler.cpp')]
final class ConstFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/FuncCallHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Comparison\ImpossibleCheckTypeHelper;
use PHPStan\ShouldNotHappenException;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Accessory\HasPropertyType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
Expand Down Expand Up @@ -83,6 +84,7 @@
* @implements ExprHandler<FuncCall>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/FuncCallHandler.cpp')]
final class FuncCallHandler implements ExprHandler
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\NonEmptyArrayType;
use PHPStan\Type\ArrayType;
Expand Down Expand Up @@ -58,6 +59,7 @@
* state (throw points, impure points, yield, termination).
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../../turbo-ext/src/FuncCallScopeEffectsHelper.cpp')]
final class FuncCallScopeEffectsHelper
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/Helper/OutputBufferHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Node\Expr\TypeExpr;
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use function in_array;

#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../../turbo-ext/src/OutputBufferHelper.cpp')]
final class OutputBufferHelper
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/NullsafePropertyFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Node\NullsafePropertyFetchExpressionNode;
use PHPStan\Node\Printer\ExprPrinter;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\NullType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
Expand All @@ -34,6 +35,7 @@
* @implements ExprHandler<NullsafePropertyFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/NullsafePropertyFetchHandler.cpp')]
final class NullsafePropertyFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/PropertyFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use PHPStan\Rules\Properties\FoundPropertyReflection;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
Expand All @@ -38,6 +39,7 @@
* @implements ExprHandler<PropertyFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/PropertyFetchHandler.cpp')]
final class PropertyFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ExprHandler/StaticPropertyFetchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use PHPStan\Rules\Properties\FoundPropertyReflection;
use PHPStan\Rules\Properties\PropertyReflectionFinder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\ErrorType;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
Expand All @@ -37,6 +38,7 @@
* @implements ExprHandler<StaticPropertyFetch>
*/
#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/StaticPropertyFetchHandler.cpp')]
final class StaticPropertyFetchHandler implements ExprHandler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/ParametersProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use PhpParser\Node;
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Turbo\ShadowedByTurboExtension;

#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/ParametersProcessor.cpp')]
final class ParametersProcessor
{

Expand Down
2 changes: 2 additions & 0 deletions src/Analyser/PropertyHookThrowPointsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use PHPStan\Turbo\ShadowedByTurboExtension;

#[AutowiredService]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/PropertyHookThrowPointsResolver.cpp')]
final class PropertyHookThrowPointsResolver
{

Expand Down
4 changes: 2 additions & 2 deletions src/Analyser/VariableWriteOffset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace PHPStan\Analyser;

use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Type;
use function count;
use function is_int;
Expand All @@ -13,7 +13,7 @@
*
* @internal
*/
#[ReferencedByTurboExtension(key: 'variableWriteOffset')]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/VariableWriteOffset.cpp')]
final class VariableWriteOffset
{

Expand Down
2 changes: 2 additions & 0 deletions src/Node/ClosureReturnStatementsNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
use PhpParser\NodeAbstract;
use PHPStan\Analyser\ImpurePoint;
use PHPStan\Analyser\StatementResult;
use PHPStan\Turbo\ReferencedByTurboExtension;
use function count;

/**
* @api
*/
#[ReferencedByTurboExtension(key: 'closureReturnStatementsNode')]
final class ClosureReturnStatementsNode extends NodeAbstract implements ReturnStatementsNode
{

Expand Down
2 changes: 2 additions & 0 deletions src/Node/NullsafePropertyFetchExpressionNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Override;
use PhpParser\Node\Expr\NullsafePropertyFetch;
use PhpParser\NodeAbstract;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Type;

/**
Expand All @@ -15,6 +16,7 @@
*
* @internal
*/
#[ReferencedByTurboExtension(key: 'nullsafePropertyFetchExpressionNode')]
final class NullsafePropertyFetchExpressionNode extends NodeAbstract implements VirtualNode
{

Expand Down
2 changes: 2 additions & 0 deletions src/Php/PhpVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace PHPStan\Php;

use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\Turbo\ReferencedByTurboExtension;
use function floor;

/**
Expand All @@ -14,6 +15,7 @@
* @api
*/
#[AutowiredService(factory: '@PHPStan\Php\PhpVersionFactory::create')]
#[ReferencedByTurboExtension(key: 'phpVersion')]
final class PhpVersion
{

Expand Down
3 changes: 3 additions & 0 deletions src/Reflection/AllowedConstantsResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace PHPStan\Reflection;

use PHPStan\Turbo\ReferencedByTurboExtension;

/**
* Result of checking constants passed to a parameter against its allowed set.
*
Expand All @@ -11,6 +13,7 @@
*
* @api
*/
#[ReferencedByTurboExtension(key: 'allowedConstantsResult')]
final class AllowedConstantsResult
{

Expand Down
2 changes: 2 additions & 0 deletions src/Reflection/BetterReflection/BetterReflectionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
use PHPStan\Reflection\SignatureMap\SignatureMapProvider;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\IntegerRangeType;
Expand All @@ -67,6 +68,7 @@
use const PHP_VERSION_ID;

#[NonAutowiredService(name: 'betterReflectionProvider')]
#[ReferencedByTurboExtension(key: 'betterReflectionProvider')]
final class BetterReflectionProvider implements ReflectionProvider
{

Expand Down
2 changes: 2 additions & 0 deletions src/Reflection/ExtendedCallableFunctionVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
use PHPStan\Reflection\Callables\SimpleImpurePoint;
use PHPStan\Reflection\Callables\SimpleThrowPoint;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVarianceMap;
use PHPStan\Type\Type;

#[ReferencedByTurboExtension(key: 'extendedCallableFunctionVariant')]
final class ExtendedCallableFunctionVariant extends ExtendedFunctionVariant implements CallableParametersAcceptor
{

Expand Down
2 changes: 2 additions & 0 deletions src/Reflection/FunctionVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

namespace PHPStan\Reflection;

use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Generic\TemplateTypeMap;
use PHPStan\Type\Generic\TemplateTypeVarianceMap;
use PHPStan\Type\Type;

/**
* @api
*/
#[ReferencedByTurboExtension(key: 'functionVariant')]
class FunctionVariant implements ParametersAcceptor
{

Expand Down
Loading
Loading