Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow functional API to define an Attribute implementation #377

Open
cspray opened this issue Jun 4, 2024 · 1 comment
Open

Allow functional API to define an Attribute implementation #377

cspray opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@cspray
Copy link
Owner

cspray commented Jun 4, 2024

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.

@cspray cspray added the enhancement New feature or request label Jun 4, 2024
@cspray cspray added this to the v3.0.0 Release milestone Jun 4, 2024
@cspray cspray self-assigned this Jun 4, 2024
@cspray
Copy link
Owner Author

cspray commented Jun 18, 2024

We need to give this much more thought. While the provided use case may be valid there are repercussions to how the functional API work. It would be better to wait for this feature until somebody has actually used a DefinitionProvider centric approach to wiring their Container while not making some use of custom attributes.

@cspray cspray removed this from the v3.0.0 Release milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant