/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/ObjectMapper/Tests/Fixtures/ClassMap/CostRequestWithSourceAndAutoMappedView.php
18 строк
558 B
Pascal CESCON
[ObjectMapper] Fix #[Map] attribute breaking auto-mapping of other properties
30 апр 2026, 10:24
30 апр 2026, 10:24
b938340
Код
Авторство
О чём код?
<?php namespace Symfony\Component\ObjectMapper\Tests\Fixtures\ClassMap; use Symfony\Component\ObjectMapper\Attribute\Map; /** * A target class with both explicit #[Map] attribute and auto-mapped properties. */ #[Map(source: Cost::class)] final class CostRequestWithSourceAndAutoMappedView { public ?int $amount = null; // Should be auto-mapped (same name as source) public ?int $tax = null; // Should be auto-mapped (same name as source) #[Map(source: 'bar')] public ?string $foo = null; // Explicit mapping from 'bar' to 'foo' }