Skip to content

[TypeInfo] Remove @experimental tag #58852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public function __construct(
) {
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
foreach ($this->extractors as $extractor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ public function getTypesFromConstructor(string $class, string $property): ?array
return array_merge([], ...$types);
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
/** @var DocBlock $docBlock */
Expand Down Expand Up @@ -256,9 +253,6 @@ public function getType(string $class, string $property, array $context = []): ?
return Type::list($type);
}

/**
* @experimental
*/
public function getTypeFromConstructor(string $class, string $property): ?Type
{
if (!$docBlock = $this->getDocBlockFromConstructor($class, $property)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ public function getTypesFromConstructor(string $class, string $property): ?array
return $types;
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
/** @var PhpDocNode|null $docNode */
Expand Down Expand Up @@ -234,9 +231,6 @@ public function getType(string $class, string $property, array $context = []): ?
return Type::list($type);
}

/**
* @experimental
*/
public function getTypeFromConstructor(string $class, string $property): ?Type
{
if (!$tagDocNode = $this->getDocBlockFromConstructor($class, $property)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ public function getTypesFromConstructor(string $class, string $property): ?array
return $types;
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
[$mutatorReflection, $prefix] = $this->getMutatorMethod($class, $property);
Expand Down Expand Up @@ -269,9 +266,6 @@ public function getType(string $class, string $property, array $context = []): ?
return $type;
}

/**
* @experimental
*/
public function getTypeFromConstructor(string $class, string $property): ?Type
{
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public function getProperties(string $class, array $context = []): ?array
return $this->extract('getProperties', [$class, $context]);
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
return $this->extract('getType', [$class, $property, $context]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ public function getLongDescription(string $class, string $property, array $conte
return $this->extract($this->descriptionExtractors, 'getLongDescription', [$class, $property, $context]);
}

/**
* @experimental
*/
public function getType(string $class, string $property, array $context = []): ?Type
{
return $this->extract($this->typeExtractors, 'getType', [$class, $property, $context]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ public function getTypes(DocType $varType): array

/**
* Creates a {@see Type} from a PHPDoc type.
*
* @experimental
*/
public function getType(DocType $varType): ?Type
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/TypeInfo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ CHANGELOG
* Remove `Type::getBaseType()`, `Type::asNonNullable()` and `Type::__call()` methods
* Remove `CompositeTypeTrait`
* Add `PhpDocAwareReflectionTypeResolver` resolver
* The type resolvers are not marked as `@internal` anymore
* The component is not marked as `@experimental` anymore

7.1
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
interface ExceptionInterface extends \Throwable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Exception/LogicException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
class LogicException extends \LogicException implements ExceptionInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
class UnsupportedException extends \LogicException implements ExceptionInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
abstract class Type implements \Stringable
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/BackedEnumType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
* @template U of BuiltinType<TypeIdentifier::INT>|BuiltinType<TypeIdentifier::STRING>
*
* @extends EnumType<T>
*
* @experimental
*/
final class BackedEnumType extends EnumType
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/BuiltinType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @template T of TypeIdentifier
*
* @experimental
*/
final class BuiltinType extends Type
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/CollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* @template T of BuiltinType<TypeIdentifier::ARRAY>|BuiltinType<TypeIdentifier::ITERABLE>|ObjectType|GenericType
*
* @implements WrappingTypeInterface<T>
*
* @experimental
*/
final class CollectionType extends Type implements WrappingTypeInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
*
* @template T of Type
*
* @experimental
*/
interface CompositeTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/EnumType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* @template T of class-string<\UnitEnum>
*
* @extends ObjectType<T>
*
* @experimental
*/
class EnumType extends ObjectType
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/GenericType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* @template T of BuiltinType<TypeIdentifier::ARRAY>|BuiltinType<TypeIdentifier::ITERABLE>|ObjectType
*
* @implements WrappingTypeInterface<T>
*
* @experimental
*/
final class GenericType extends Type implements WrappingTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/IntersectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
* @template T of ObjectType|GenericType<ObjectType>|CollectionType<GenericType<ObjectType>>
*
* @implements CompositeTypeInterface<T>
*
* @experimental
*/
final class IntersectionType extends Type implements CompositeTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/NullableType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @extends UnionType<T|BuiltinType<TypeIdentifier::NULL>>
*
* @implements WrappingTypeInterface<T>
*
* @experimental
*/
final class NullableType extends UnionType implements WrappingTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/ObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @template T of class-string
*
* @experimental
*/
class ObjectType extends Type
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/TemplateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
* @template T of Type
*
* @implements WrappingTypeInterface<T>
*
* @experimental
*/
final class TemplateType extends Type implements WrappingTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/UnionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
* @template T of Type
*
* @implements CompositeTypeInterface<T>
*
* @experimental
*/
class UnionType extends Type implements CompositeTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/Type/WrappingTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
*
* @template T of Type
*
* @experimental
*/
interface WrappingTypeInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/TypeContext/TypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
final class TypeContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
final class TypeContextFactory
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/TypeFactoryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
trait TypeFactoryTrait
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/TypeIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
enum TypeIdentifier: string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* Resolves type on reflection prioriziting PHP documentation.
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
*
* @internal
*/
final readonly class PhpDocAwareReflectionTypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @internal
*/
final readonly class ReflectionParameterTypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @internal
*/
final readonly class ReflectionPropertyTypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @internal
*/
final readonly class ReflectionReturnTypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @internal
*/
final class ReflectionTypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @internal
*/
final class StringTypeResolver implements TypeResolverInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/TypeInfo/TypeResolver/TypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
final readonly class TypeResolver implements TypeResolverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
*
* @experimental
*/
interface TypeResolverInterface
{
Expand Down
Loading