Skip to content

Allow functional API to define an Attribute implementation #377

@cspray

Description

@cspray

In 2.x the functional API does not allow defining an Attribute on a Definition. Intuitively, this might make sense; after all, you aren't adding the Definition with an Attribute so there's nothing to supply. However, this does not take into consideration the possibility of custom Attributes. If these Attributes hold metadata, for example in the PSR-15 microframework demo the #[Controller('GET', '/path')] has routing data associated with it. If you were to use the functional API there'd be no way to provide this information.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions