2121use Illuminate \Container \Container ;
2222use Illuminate \Contracts \Container \BindingResolutionException ;
2323use Illuminate \Contracts \Debug \ExceptionHandler ;
24+ use Illuminate \Contracts \Support \DeferrableProvider ;
2425use Illuminate \Foundation \Exceptions \Handler ;
2526use Illuminate \Http \Request ;
2627use Illuminate \Support \ServiceProvider ;
2728use Illuminate \Support \Str ;
2829use Illuminate \Support \Stringable ;
2930
30- class ExceptionNotifyServiceProvider extends ServiceProvider
31+ class ExceptionNotifyServiceProvider extends ServiceProvider implements DeferrableProvider
3132{
3233 public array $ singletons = [
3334 RequestMacro::class => RequestMacro::class,
3435 StringableMacro::class => StringableMacro::class,
3536 StrMacro::class => StrMacro::class,
3637 ];
37- protected bool $ defer = false ;
3838
3939 /**
4040 * @throws \ReflectionException
@@ -67,7 +67,7 @@ public function provides(): array
6767 ];
6868 }
6969
70- protected function setupConfig (): self
70+ private function setupConfig (): self
7171 {
7272 /** @noinspection RealpathInStreamContextInspection */
7373 $ source = realpath ($ raw = __DIR__ .'/../config/exception-notify.php ' ) ?: $ raw ;
@@ -85,7 +85,7 @@ protected function setupConfig(): self
8585 * @throws \ReflectionException
8686 * @throws BindingResolutionException
8787 */
88- protected function registerMacros (): self
88+ private function registerMacros (): self
8989 {
9090 Request::mixin ($ this ->app ->make (RequestMacro::class));
9191 Str::mixin ($ this ->app ->make (StrMacro::class));
@@ -94,7 +94,7 @@ protected function registerMacros(): self
9494 return $ this ;
9595 }
9696
97- protected function registerExceptionNotifyManager (): self
97+ private function registerExceptionNotifyManager (): self
9898 {
9999 $ this ->app ->singleton (
100100 ExceptionNotifyManager::class,
@@ -106,7 +106,7 @@ protected function registerExceptionNotifyManager(): self
106106 return $ this ;
107107 }
108108
109- protected function registerCollectorManager (): self
109+ private function registerCollectorManager (): self
110110 {
111111 $ this ->app ->singleton (
112112 CollectorManager::class,
@@ -128,15 +128,15 @@ protected function registerCollectorManager(): self
128128 return $ this ;
129129 }
130130
131- protected function registerTestCommand (): self
131+ private function registerTestCommand (): self
132132 {
133133 $ this ->app ->singleton (TestCommand::class);
134134 $ this ->alias (TestCommand::class);
135135
136136 return $ this ;
137137 }
138138
139- protected function extendExceptionHandler (): self
139+ private function extendExceptionHandler (): self
140140 {
141141 $ this ->app ->extend (ExceptionHandler::class, function (ExceptionHandler $ exceptionHandler ): ExceptionHandler {
142142 if ($ reportUsingCreator = config ('exception-notify.report_using_creator ' )) {
@@ -162,7 +162,7 @@ protected function extendExceptionHandler(): self
162162 return $ this ;
163163 }
164164
165- protected function registerCommands (): self
165+ private function registerCommands (): self
166166 {
167167 if ($ this ->app ->runningInConsole ()) {
168168 $ this ->commands ([
@@ -176,7 +176,7 @@ protected function registerCommands(): self
176176 /**
177177 * @param class-string $class
178178 */
179- protected function alias (string $ class ): self
179+ private function alias (string $ class ): self
180180 {
181181 $ this ->app ->alias ($ class , $ this ->toAlias ($ class ));
182182
@@ -186,7 +186,7 @@ protected function alias(string $class): self
186186 /**
187187 * @param class-string $class
188188 */
189- protected function toAlias (string $ class ): string
189+ private function toAlias (string $ class ): string
190190 {
191191 return str ($ class )
192192 ->replaceFirst (__NAMESPACE__ , '' )
0 commit comments