diff --git a/src/Symfony/Bridge/Doctrine/Attribute/MapEntity.php b/src/Symfony/Bridge/Doctrine/Attribute/MapEntity.php index 529bf05dc7767..73bb1aa398f37 100644 --- a/src/Symfony/Bridge/Doctrine/Attribute/MapEntity.php +++ b/src/Symfony/Bridge/Doctrine/Attribute/MapEntity.php @@ -20,6 +20,19 @@ #[\Attribute(\Attribute::TARGET_PARAMETER)] class MapEntity extends ValueResolver { + /** + * @param class-string|null $class The entity class + * @param string|null $objectManager Specify the object manager used to retrieve the entity + * @param string|null $expr An expression to fetch the entity using the {@see https://symfony.com/doc/current/components/expression_language.html ExpressionLanguage} syntax. + * Any request attribute are available as a variable, and your entity repository in the 'repository' variable. + * @param array|null $mapping Configures the properties and values to use with the findOneBy() method + * The key is the route placeholder name and the value is the Doctrine property name + * @param string[]|null $exclude Configures the properties that should be used in the findOneBy() method by excluding + * one or more properties so that not all are used + * @param bool|null $stripNull Whether to prevent null values from being used as parameters in the query (defaults to false) + * @param string[]|string|null $id If an id option is configured and matches a route parameter, then the resolver will find by the primary key + * @param bool|null $evictCache If true, forces Doctrine to always fetch the entity from the database instead of cache (defaults to false) + */ public function __construct( public ?string $class = null, public ?string $objectManager = null, diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php index f807a1e86d5d9..b6c7a5e35c783 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -37,8 +37,13 @@ class UniqueEntity extends Constraint public bool|array|string $ignoreNull = true; /** - * @param array|string $fields The combination of fields that must contain unique values or a set of options - * @param bool|array|string $ignoreNull The combination of fields that ignore null values + * @param array|string $fields The combination of fields that must contain unique values or a set of options + * @param bool|string[]|string $ignoreNull The combination of fields that ignore null values + * @param string|null $em The entity manager used to query for uniqueness instead of the manager of this class + * @param string|null $entityClass The entity class to enforce uniqueness on instead of the current class + * @param string|null $repositoryMethod The repository method to check uniqueness instead of findBy. The method will receive as its argument + * a fieldName => value associative array according to the fields option configuration + * @param string|null $errorPath Bind the constraint violation to this field instead of the first one in the fields option configuration */ public function __construct( array|string $fields, diff --git a/src/Symfony/Bridge/Twig/Attribute/Template.php b/src/Symfony/Bridge/Twig/Attribute/Template.php index f094f42a4a6e2..e265e23951f6a 100644 --- a/src/Symfony/Bridge/Twig/Attribute/Template.php +++ b/src/Symfony/Bridge/Twig/Attribute/Template.php @@ -11,23 +11,20 @@ namespace Symfony\Bridge\Twig\Attribute; +/** + * Define the template to render in the controller. + */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION)] class Template { + /** + * @param string $template The name of the template to render + * @param string[]|null $vars The controller method arguments to pass to the template + * @param bool $stream Enables streaming the template + */ public function __construct( - /** - * The name of the template to render. - */ public string $template, - - /** - * The controller method arguments to pass to the template. - */ public ?array $vars = null, - - /** - * Enables streaming the template. - */ public bool $stream = false, ) { }