Upgrading symfony/property-info 6 to 7
Breakingv6.4.49 → v7.4.22Breaking1Platform1Deprecated4New6Changed6Fixed63
Fetching 59 releases from GitHub…58 / 59
BreakingUpgrade verdict
1 breaking change and a platform requirement change.
In plain terms
- Old deprecated code paths are removed, and the TypeInfo feature is now labeled experimental, so its API may change.
- This version requires PHP 8.2 or newer.
- A class used to describe property types is being phased out.
- The Type class is being phased out and will be removed in a future version.
Must act Top 5 of 6 that need code or config changes
PHP requirement changed in v7.0.0-BETA1: >=8.1 → >=8.2.
What you must change
Breaking1
Removes deprecations and marks TypeInfo as experimental.
TypeInfoPlatform1
Bumps the minimum PHP version to 8.2.
Deprecations to plan for
Deprecated4
Deprecates the
Type class.TypeDeprecates the PropertyInfo Type class.
TypeDeprecates annotations in FrameworkBundle and Serializer.
Deprecates annotations in Serializer in favor of attributes.
API changes
Generated by DepDelta from published PHP source. Not mixed with prose notes.
- changed:
method PropertyAccessExtractorInterface.isReadable(string $class, string $property, array $context = …) → method PropertyAccessExtractorInterface.isReadable(string $class, string $property, array $context = …): ?bool - changed:
method PropertyAccessExtractorInterface.isWritable(string $class, string $property, array $context = …) → method PropertyAccessExtractorInterface.isWritable(string $class, string $property, array $context = …): ?bool - changed:
method PropertyListExtractorInterface.getProperties(string $class, array $context = …) → method PropertyListExtractorInterface.getProperties(string $class, array $context = …): ?array - changed:
method PropertyTypeExtractorInterface.getTypes(string $class, string $property, array $context = …) → method PropertyTypeExtractorInterface.getTypes(string $class, string $property, array $context = …): ?array - changed:
static property Type.builtinCollectionTypes → static property Type.builtinCollectionTypes: array - changed:
static property Type.builtinTypes → static property Type.builtinTypes: array - added:
interface PropertyDocBlockExtractorInterface - added:
method PropertyDocBlockExtractorInterface.getDocBlock(string $class, string $property): ?DocBlock - added:
method PropertyInfoCacheExtractor.getType(string $class, string $property, array $context = …): ?Type - added:
method PropertyInfoExtractor.getType(string $class, string $property, array $context = …): ?Type
- changed:
method PropertyInfoPass.process(ContainerBuilder $container) → method PropertyInfoPass.process(ContainerBuilder $container): void
- changed:
class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface → class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface, PropertyDocBlockExtractorInterface - changed:
constructor PhpStanExtractor(?array $mutatorPrefixes = …, ?array $accessorPrefixes = …, ?array $arrayMutatorPrefixes = …) → constructor PhpStanExtractor(?array $mutatorPrefixes = …, ?array $accessorPrefixes = …, ?array $arrayMutatorPrefixes = …, bool $allowPrivateAccess = …) - changed:
final class PhpStanExtractor implements PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface → final class PhpStanExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface - added:
method ConstructorArgumentTypeExtractorInterface.getTypeFromConstructor(string $class, string $property): ?Type - added:
method ConstructorExtractor.getType(string $class, string $property, array $context = …): ?Type - added:
method PhpDocExtractor.getDocBlock(string $class, string $property): ?DocBlock - added:
method PhpDocExtractor.getType(string $class, string $property, array $context = …): ?Type - added:
method PhpDocExtractor.getTypeFromConstructor(string $class, string $property): ?Type - added:
method PhpStanExtractor.getLongDescription(string $class, string $property, array $context = …): ?string - added:
method PhpStanExtractor.getShortDescription(string $class, string $property, array $context = …): ?string - added:
method PhpStanExtractor.getType(string $class, string $property, array $context = …): ?Type - added:
method PhpStanExtractor.getTypeFromConstructor(string $class, string $property): ?Type - added:
method ReflectionExtractor.getType(string $class, string $property, array $context = …): ?Type - added:
method ReflectionExtractor.getTypeFromConstructor(string $class, string $property): ?Type
- removed:
constructor NameScope(string $calledClassName, string $namespace, array $uses = …, ?string $selfClassName = …) - removed:
final class NameScope - removed:
final class NameScopeFactory - removed:
method NameScope.resolveParentClass(): ?string - removed:
method NameScope.resolveRootClass(): string - removed:
method NameScope.resolveSelfClass(): string - removed:
method NameScope.resolveStringName(string $name): string - removed:
method NameScopeFactory.create(string $calledClassName, ?string $declaringClassName = …, ?string $selfClassName = …): NameScope
- changed:
method PhpStanTypeHelper.getTypes(PhpDocTagValueNode $node, NameScope $nameScope): array → method PhpStanTypeHelper.getTypes(PhpDocTagValueNode $node, TypeContext $typeContext): array - added:
class LegacyTypeConverter - added:
method PhpDocTypeHelper.getType(DocType $varType): ?Type - added:
static method LegacyTypeConverter.toTypeInfoType(?array $legacyTypes): ?Type