[commits] [Wiki] changed: Doc/Dev/HordeLog

Wiki Guest wikiguest at horde.org
Sun Nov 21 09:51:52 UTC 2021


guest [31.16.249.142]  Sun, 21 Nov 2021 09:51:52 +0000

Modified page: https://wiki.horde.org/Doc/Dev/HordeLog
New Revision:  2
Change log:  PSR-3 related upgrading hints

@@ -24,8 +24,16 @@

  ++ UPGRADING

  +++ 3.x (H6)
+++++ Type hinting
+* Users should Type hint against either Horde\Log\LoggerInterface or  
Psr\Log\LoggerInterface
+  * Use Psr if you only want to emit logs
+  * Use Horde if you want to call into horde specific extensions
+  While both technically work, more specific typing improves static  
analysis and IDE hints.

+++++ Awareness
+* Use Psr/Log/LoggerAwareInterface for classes consuming loggers via  
setter injection
+* If you use setter injection and depend on horde-specific  
functionality, rather use the Horde\Log\LoggerAwareInterface. As both  
conflict and have different use cases, choose wisely.

  ----
  Back to the ((Project|Project List))



More information about the commits mailing list