When using property promotion, particularly with input types, you're required to define the generic type details for lists (array, collection, etc) using a variable docblock. Not only is this ugly, it requires duplicate docblock definitions for internal docblock usage and is entirely unnecessary.
This PR adds support for constructor docblock generic type definitions with property promotion.
Example:
/**
* Constructor
*
* @param array<string> $array
*/
#[Input]
public function __construct(
#[Field]
public array $array
) {}
As opposed to:
#[Input]
public function __construct(
/** @var array<string> */
#[Field]
public array $array
) {}
When using property promotion, particularly with input types, you're required to define the generic type details for lists (array, collection, etc) using a variable docblock. Not only is this ugly, it requires duplicate docblock definitions for internal docblock usage and is entirely unnecessary.
This PR adds support for constructor docblock generic type definitions with property promotion.
Example:
As opposed to:
The additional support is fully BC.