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.