symfony/type-info
Symfony TypeInfo extracts and normalizes PHP type information from reflections and type strings, with support for generics, nullables, enums, and collections. Resolve types via TypeResolver and work with a rich Type API for inspection and string casting.
Illuminate\Validation, Symfony\Serializer).$typeResolver = TypeResolver::create();
$type = $typeResolver->resolve(new ReflectionProperty(User::class, 'email'));
ValidationFailed) remains viable.phpstan/phpdoc-parser for PHPDoc resolution (no changes).TypeContextFactory::collectTemplates remains the recommended mitigation for reflection overhead.#64299) may impact custom type definitions or complex object shapes in validation/serialization.
ObjectShapeType implementations.ObjectShapeType.phpstan/phpdoc-parser dependency.ObjectShapeType hardening (#64299):
use imports from v8.0.9.CollectionType in v7.3+).symfony/validator and symfony/serializer.Type::toString() remains viable.symfony/type-info:^8.1.0-BETA3 and phpstan/phpdoc-parser.ObjectShapeType hardening early in custom validation/serialization logic.v8.1.0-BETA3.v7.x.use Imports: Retain validation from v8.0.9.ObjectShapeType: Test custom implementations:
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectShapeType;
// Example: Custom shape definition
$shape = new ObjectShapeType([
'property1' => new Type\StringType(),
'property2' => new Type\CollectionType(new Type\IntType()),
]);
ObjectShapeType hardening in CI before full rollout.
/** @test */
public function custom_object_shape_type_remains_compatible() {
$shape = new ObjectShapeType(['name' => new Type\StringType()]);
$normalizer = new ObjectNormalizer();
$normalizer->setSupportedTypes(ObjectNormalizer::FORMAT_JSON, [
'App\Models\User' => ['object' => $shape]
]);
$this->assertTrue(true); // Add assertions for custom shape behavior
}
ObjectShapeType hardening (#64299) for breaking changes in future releases.symfony/type-info:^8.1.0-BETA3 and test custom validation/serialization logic.phpstan/phpdoc-parser to a stable version.ObjectShapeType compatibility in validation rules../vendor/bin/phpunit --filter "testObjectShapeType"
ObjectShapeType failures with:
$shape = new ObjectShapeType(['property' => new Type\StringType()]);
try {
$shape->getType('property');
} catch (TypeException $e) {
// Log or handle exception
}
ObjectShapeType edge cases to Symfony GitHub.TypeContextFactory) remains critical for high-throughput apps.ObjectShapeType hardening may break custom validation logic or serializer encoders.
use Imports: Retain mitigation from v8.0.9.ObjectShapeType hardening:
"Test custom
ObjectShapeTypeimplementations and validation rules after upgrading to v8.1.0-BETA3. Avoid assumptions about nested shape behavior until thoroughly validated."
ObjectShapeType compatibility.ObjectShapeType in the starter template.How can I help you explore Laravel packages today?