Review main Merged

70849[FEATURE] Support PHP 8 style Channel attribute for logger injection

Benjamin Franzke CR +2 V +2 Normal +178 −2 updated 09/03/21, 15:50

Commit message

Services are now able to control the component name that an
injected logger is created with.
This allows to group logs of related classes and is basically
a channel system as often used in monolog.

Therefore and as preparation for future monolog logging,
the attribute is named Channel.

The Channel attribute is supported for constructor argument
injection as a class and parameter specific attribute and for
LoggerAwareInterface dependency injection services as a class attribute.

This feature is only available with PHP 8.
The channel attribute will be gracefully ignored in PHP 7,
and the classic component name will be used instead.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 4