You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
After reading https://peakd.com/hive-168588/@crell/using-psr-3-placeholders-properly, it is clear that the
Router
class should not useLoggerAwareTrait
to enable asetLogger()
function. Instead, dependency injection should be used, and aLoggerInterface
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.The text was updated successfully, but these errors were encountered: