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

Remove LoggerAwareTrait #7

Open
hochleitner opened this issue Mar 29, 2024 · 0 comments
Open

Remove LoggerAwareTrait #7

hochleitner opened this issue Mar 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@hochleitner
Copy link
Member

After reading https://peakd.com/hive-168588/@crell/using-psr-3-placeholders-properly, it is clear that the Router class should not use LoggerAwareTrait to enable a setLogger() function. Instead, dependency injection should be used, and a LoggerInterface instance should be injectable by the constructor.

Usually, this kind of behavior would be handled by a DI container, but since fhooe/router will most likely always be used without one (to keep it simple), an optional parameter in the constructor should suffice.

@hochleitner hochleitner added this to the 2.0.0 milestone Mar 29, 2024
@hochleitner hochleitner added the enhancement New feature or request label Mar 29, 2024
@hochleitner hochleitner self-assigned this Mar 29, 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
None yet
Development

No branches or pull requests

1 participant