diff --git a/framework/core/src/Extend/Compat.php b/framework/core/src/Extend/Compat.php index a50d89191..3f1b0b88e 100644 --- a/framework/core/src/Extend/Compat.php +++ b/framework/core/src/Extend/Compat.php @@ -32,7 +32,7 @@ class Compat implements ExtenderInterface $this->callback = $callback; } - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { $container->call($this->callback); } diff --git a/framework/core/src/Extend/ExtenderInterface.php b/framework/core/src/Extend/ExtenderInterface.php index 6f9bfc7c9..26c58fa92 100644 --- a/framework/core/src/Extend/ExtenderInterface.php +++ b/framework/core/src/Extend/ExtenderInterface.php @@ -16,5 +16,5 @@ use Illuminate\Contracts\Container\Container; interface ExtenderInterface { - public function __invoke(Container $container, Extension $extension = null); + public function extend(Container $container, Extension $extension = null); } diff --git a/framework/core/src/Extend/Formatter.php b/framework/core/src/Extend/Formatter.php index 13245db4a..243f54d81 100644 --- a/framework/core/src/Extend/Formatter.php +++ b/framework/core/src/Extend/Formatter.php @@ -30,7 +30,7 @@ class Formatter implements ExtenderInterface return $this; } - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { $events = $container->make(Dispatcher::class); diff --git a/framework/core/src/Extend/Frontend.php b/framework/core/src/Extend/Frontend.php index 45282316a..1b77d541b 100644 --- a/framework/core/src/Extend/Frontend.php +++ b/framework/core/src/Extend/Frontend.php @@ -51,7 +51,7 @@ class Frontend implements ExtenderInterface return $this; } - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { $this->registerAssets($container, $this->getModuleName($extension)); $this->registerRoutes($container); diff --git a/framework/core/src/Extend/LanguagePack.php b/framework/core/src/Extend/LanguagePack.php index c8a7f0c09..e579bfaee 100644 --- a/framework/core/src/Extend/LanguagePack.php +++ b/framework/core/src/Extend/LanguagePack.php @@ -20,7 +20,7 @@ use RuntimeException; class LanguagePack implements ExtenderInterface { - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { if (is_null($extension)) { throw new InvalidArgumentException( diff --git a/framework/core/src/Extend/Locales.php b/framework/core/src/Extend/Locales.php index 8b2b83e97..02a3d52a9 100644 --- a/framework/core/src/Extend/Locales.php +++ b/framework/core/src/Extend/Locales.php @@ -25,7 +25,7 @@ class Locales implements ExtenderInterface $this->directory = $directory; } - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { /** @var LocaleManager $locales */ $locales = $container->make(LocaleManager::class); diff --git a/framework/core/src/Extend/Routes.php b/framework/core/src/Extend/Routes.php index c84cde797..2d3cc71ab 100644 --- a/framework/core/src/Extend/Routes.php +++ b/framework/core/src/Extend/Routes.php @@ -63,7 +63,7 @@ class Routes implements ExtenderInterface return $this; } - public function __invoke(Container $container, Extension $extension = null) + public function extend(Container $container, Extension $extension = null) { if (empty($this->routes)) { return; diff --git a/framework/core/src/Extension/Extension.php b/framework/core/src/Extension/Extension.php index 74038eae8..89b0a90a4 100644 --- a/framework/core/src/Extension/Extension.php +++ b/framework/core/src/Extension/Extension.php @@ -121,7 +121,7 @@ class Extension implements Arrayable $extender = new Compat($extender); } - $extender($app, $this); + $extender->extend($app, $this); } } diff --git a/framework/core/src/Foundation/InstalledSite.php b/framework/core/src/Foundation/InstalledSite.php index 3aa8ca415..2362fa11f 100644 --- a/framework/core/src/Foundation/InstalledSite.php +++ b/framework/core/src/Foundation/InstalledSite.php @@ -173,7 +173,7 @@ class InstalledSite implements SiteInterface $laravel->boot(); foreach ($this->extenders as $extension) { - $extension($laravel); + $extension->extend($laravel); } return $laravel;