@@ -12,9 +12,7 @@ class Bref
1212{
1313 private static ?Closure $ containerProvider = null ;
1414 private static ?ContainerInterface $ container = null ;
15- /**
16- * TODO deprecate hooks when the event dispatcher is stable.
17- */
15+ /** @deprecated Use Bref::events()->subscribe() instead */
1816 private static array $ hooks = [
1917 'beforeStartup ' => [],
2018 'beforeInvoke ' => [],
@@ -31,9 +29,6 @@ public static function setContainer(Closure $containerProvider): void
3129 self ::$ containerProvider = $ containerProvider ;
3230 }
3331
34- /**
35- * @internal This API is experimental and may change at any time.
36- */
3732 public static function events (): EventDispatcher
3833 {
3934 if (! isset (self ::$ eventDispatcher )) {
@@ -48,6 +43,8 @@ public static function events(): EventDispatcher
4843 * Warning: hooks are low-level extension points to be used by framework
4944 * integrations. For user code, it is not recommended to use them. Use your
5045 * framework's extension points instead.
46+ *
47+ * @deprecated Use Bref::events()->subscribe() instead.
5148 */
5249 public static function beforeStartup (Closure $ hook ): void
5350 {
@@ -60,6 +57,8 @@ public static function beforeStartup(Closure $hook): void
6057 * Warning: hooks are low-level extension points to be used by framework
6158 * integrations. For user code, it is not recommended to use them. Use your
6259 * framework's extension points instead.
60+ *
61+ * @deprecated Use Bref::events()->subscribe() instead.
6362 */
6463 public static function beforeInvoke (Closure $ hook ): void
6564 {
0 commit comments