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

Add ability to set classes when resolving which an exception should be thrown #323

Open
vjik opened this issue Jan 29, 2023 · 5 comments
Open

Comments

@vjik
Copy link
Member

vjik commented Jan 29, 2023

Goal: DTO and entities should not be resolved by container.

It can be implemented by using a callable. Will be good add option to disable this check.

@samdark
Copy link
Member

samdark commented Jan 30, 2023

Could be done with:

  1. Using annotations to mark each individual class.
  2. Using annotations to mark parent interface.
  3. Using a configuration to mark a namespace and its sub-namespaces.

@samdark
Copy link
Member

samdark commented Jan 30, 2023

Performance may drop because of these additional checks so:

  1. Benchmark is needed.
  2. If performace drop is significant, there should be an option to turn it off. It will likely be used in production.

@samdark
Copy link
Member

samdark commented Jan 30, 2023

Overall the idea looks like https://github.com/qossmic/deptrac but different.

@xepozz
Copy link
Member

xepozz commented Jan 30, 2023

It's better to have it as a static analyser extension imho

@samdark
Copy link
Member

samdark commented Jan 30, 2023

Yes, maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants