Open
Description
Description
We are using a lot of MapQueryParameter in our project and a lot of them are following some common patterns. For example, we use pagination and we use a query param to define what page was selected in the url. So in order to correctly define it we use
#[MapQueryParameter(options: ['min_range' => 1])]
in many places.
We think it would be quite an improvement to be able to extends MapQueryParameter to allow to define specific options only once but also to name the attribute.
Example
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapQueryPagination extends MapQueryParameter
{
public function __construct() {
parent::__construct(options: ['min_range' => 1]);
}
}
#[MapQueryPagination] int $page = 1,