Skip to content
Closed
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: 1 addition & 1 deletion src/Turbo/TurboExtensionEnabler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class TurboExtensionEnabler
* version is the short SHA of the last commit touching turbo-ext/src/,
* enforced by the phar.yml turbo-version job.
*/
public const EXPECTED_EXTENSION_VERSION = '531d6bd';
public const EXPECTED_EXTENSION_VERSION = '2537056';

private static bool $typeCombinatorCacheEnabled = false;

Expand Down
2 changes: 2 additions & 0 deletions src/Type/Constant/ConstantIntegerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\CompoundType;
use PHPStan\Type\ConstantScalarType;
use PHPStan\Type\GeneralizePrecision;
Expand All @@ -21,6 +22,7 @@
use const PHP_INT_MIN;

/** @api */
#[ReferencedByTurboExtension(key: 'constantIntegerType')]
class ConstantIntegerType extends IntegerType implements ConstantScalarType
{

Expand Down
2 changes: 2 additions & 0 deletions src/Type/Constant/ConstantStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\Accessory\AccessoryLowercaseStringType;
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
Expand Down Expand Up @@ -63,6 +64,7 @@
use function substr_count;

/** @api */
#[ReferencedByTurboExtension(key: 'constantStringType')]
#[InstanceofDeprecated(insteadUse: 'Type::getConstantStrings()')]
class ConstantStringType extends StringType implements ConstantScalarType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Type/Enum/EnumCaseObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\AcceptsResult;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
use PHPStan\Type\CompoundType;
Expand All @@ -32,6 +33,7 @@
use function sprintf;

/** @api */
#[ReferencedByTurboExtension(key: 'enumCaseObjectType')]
#[InstanceofDeprecated(insteadUse: 'Type::getEnumCaseObject() or Type::getEnumCases()')]
class EnumCaseObjectType extends ObjectType
{
Expand Down
4 changes: 4 additions & 0 deletions src/Type/FiniteTypeSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace PHPStan\Type;

use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Type\Generic\TemplateType;
use function array_diff_key;
use function array_key_exists;
Expand All @@ -29,6 +31,8 @@
*
* @see UnionType::getFiniteTypeSet()
*/
#[ShadowedByTurboExtension(turboClass: 'PHPStanTurbo\FiniteTypeSet', implementation: __DIR__ . '/../../turbo-ext/src/FiniteTypeSet.cpp')]
#[ReferencedByTurboExtension(key: 'finiteTypeSet')]
final class FiniteTypeSet
{

Expand Down
2 changes: 2 additions & 0 deletions src/Type/Generic/TemplateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PHPStan\Type\Generic;

use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\CompoundType;
use PHPStan\Type\IsSuperTypeOfResult;
use PHPStan\Type\Type;
Expand All @@ -10,6 +11,7 @@
* @api
* @api-do-not-implement
*/
#[ReferencedByTurboExtension(key: 'templateType')]
interface TemplateType extends CompoundType
{

Expand Down
2 changes: 2 additions & 0 deletions src/Type/IntersectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryDecimalIntegerStringType;
use PHPStan\Type\Accessory\AccessoryLiteralStringType;
Expand Down Expand Up @@ -69,6 +70,7 @@
use function usort;

/** @api */
#[ReferencedByTurboExtension(key: 'intersectionType')]
#[InstanceofDeprecated]
class IntersectionType implements CompoundType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Type/NullType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\Constant\ConstantBooleanType;
use PHPStan\Type\Constant\ConstantFloatType;
Expand All @@ -21,6 +22,7 @@
use PHPStan\Type\Traits\NonRemoveableTypeTrait;

/** @api */
#[ReferencedByTurboExtension(key: 'nullType')]
#[InstanceofDeprecated(insteadUse: 'Type::isNull()')]
class NullType implements ConstantScalarType
{
Expand Down
2 changes: 2 additions & 0 deletions src/Type/UnionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection;
use PHPStan\ShouldNotHappenException;
use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\Enum\EnumCaseObjectType;
use PHPStan\Type\Generic\GenericClassStringType;
use PHPStan\Type\Generic\TemplateIterableType;
Expand All @@ -50,6 +51,7 @@
use function str_contains;

/** @api */
#[ReferencedByTurboExtension(key: 'unionType')]
class UnionType implements CompoundType
{

Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (PHP_PHPSTAN_TURBO != "no") {
// directory by splitting on backslashes only — with forward slashes the
// objects compile flat while the link list expects the subpath
EXTENSION("phpstan_turbo",
"src\\main.cpp src\\support.cpp src\\ArenaCache.cpp src\\CombinationsHelper.cpp src\\ConditionalExpressionHolder.cpp src\\ExpressionResultStorage.cpp src\\ExpressionTypeHolder.cpp src\\NodeScanner.cpp src\\NodeTraverser.cpp src\\ScopeOps.cpp src\\TrinaryLogic.cpp src\\TypeCombinatorCache.cpp",
"src\\main.cpp src\\support.cpp src\\ArenaCache.cpp src\\CombinationsHelper.cpp src\\ConditionalExpressionHolder.cpp src\\ExpressionResultStorage.cpp src\\ExpressionTypeHolder.cpp src\\FiniteTypeSet.cpp src\\NodeScanner.cpp src\\NodeTraverser.cpp src\\ScopeOps.cpp src\\TrinaryLogic.cpp src\\TypeCombinatorCache.cpp",
true,
flags);
ADD_SOURCES(configure_module_dirname + "/src/parser",
Expand Down
Loading
Loading