diff --git a/framework/core/src/Foundation/InstalledApp.php b/framework/core/src/Foundation/InstalledApp.php index 9cf4f0265..bc1e18601 100644 --- a/framework/core/src/Foundation/InstalledApp.php +++ b/framework/core/src/Foundation/InstalledApp.php @@ -70,12 +70,12 @@ class InstalledApp implements AppInterface return $pipe; } - private function inMaintenanceMode(): bool + protected function inMaintenanceMode(): bool { return $this->config['offline'] ?? false; } - private function needsUpdate(): bool + protected function needsUpdate(): bool { $settings = $this->container->make(SettingsRepositoryInterface::class); $version = $settings->get('version'); @@ -86,7 +86,7 @@ class InstalledApp implements AppInterface /** * @return \Psr\Http\Server\RequestHandlerInterface */ - private function getUpdaterHandler() + protected function getUpdaterHandler() { $pipe = new MiddlewarePipe; $pipe->pipe(new BasePath($this->basePath())); @@ -97,12 +97,12 @@ class InstalledApp implements AppInterface return $pipe; } - private function basePath(): string + protected function basePath(): string { return parse_url($this->config['url'], PHP_URL_PATH) ?: '/'; } - private function subPath($pathName): string + protected function subPath($pathName): string { return '/'.($this->config['paths'][$pathName] ?? $pathName); } diff --git a/framework/core/src/Foundation/InstalledSite.php b/framework/core/src/Foundation/InstalledSite.php index 3008def05..4f9fbb265 100644 --- a/framework/core/src/Foundation/InstalledSite.php +++ b/framework/core/src/Foundation/InstalledSite.php @@ -52,17 +52,17 @@ class InstalledSite implements SiteInterface /** * @var Paths */ - private $paths; + protected $paths; /** * @var array */ - private $config; + protected $config; /** * @var \Flarum\Extend\ExtenderInterface[] */ - private $extenders = []; + protected $extenders = []; public function __construct(Paths $paths, array $config) { @@ -94,7 +94,7 @@ class InstalledSite implements SiteInterface return $this; } - private function bootLaravel(): Container + protected function bootLaravel(): Container { $container = new \Illuminate\Container\Container; $laravel = new Application($container, $this->paths); @@ -153,7 +153,7 @@ class InstalledSite implements SiteInterface * @param Application $app * @return ConfigRepository */ - private function getIlluminateConfig(Application $app) + protected function getIlluminateConfig(Application $app) { return new ConfigRepository([ 'view' => [ @@ -186,7 +186,7 @@ class InstalledSite implements SiteInterface ]); } - private function registerLogger(Container $container) + protected function registerLogger(Container $container) { $logPath = $this->paths->storage.'/logs/flarum.log'; $handler = new RotatingFileHandler($logPath, Logger::INFO); @@ -196,7 +196,7 @@ class InstalledSite implements SiteInterface $container->alias('log', LoggerInterface::class); } - private function registerCache(Container $container) + protected function registerCache(Container $container) { $container->singleton('cache.store', function ($container) { return new CacheRepository($container->make('cache.filestore')); diff --git a/framework/core/src/Foundation/Site.php b/framework/core/src/Foundation/Site.php index 54dfcb7e1..8c118196d 100644 --- a/framework/core/src/Foundation/Site.php +++ b/framework/core/src/Foundation/Site.php @@ -33,12 +33,12 @@ class Site } } - private static function hasConfigFile($basePath) + protected static function hasConfigFile($basePath) { return file_exists("$basePath/config.php"); } - private static function loadConfig($basePath): array + protected static function loadConfig($basePath): array { $config = include "$basePath/config.php"; @@ -49,7 +49,7 @@ class Site return $config; } - private static function loadExtenders($basePath): array + protected static function loadExtenders($basePath): array { $extenderFile = "$basePath/extend.php"; diff --git a/framework/core/src/Foundation/UninstalledSite.php b/framework/core/src/Foundation/UninstalledSite.php index 0f78e22bf..ac1ed279b 100644 --- a/framework/core/src/Foundation/UninstalledSite.php +++ b/framework/core/src/Foundation/UninstalledSite.php @@ -33,7 +33,7 @@ class UninstalledSite implements SiteInterface /** * @var Paths */ - private $paths; + protected $paths; public function __construct(Paths $paths) { @@ -52,7 +52,7 @@ class UninstalledSite implements SiteInterface ); } - private function bootLaravel(): Container + protected function bootLaravel(): Container { $container = new \Illuminate\Container\Container; $laravel = new Application($container, $this->paths); @@ -100,7 +100,7 @@ class UninstalledSite implements SiteInterface /** * @return ConfigRepository */ - private function getIlluminateConfig() + protected function getIlluminateConfig() { return new ConfigRepository([ 'session' => [ @@ -114,7 +114,7 @@ class UninstalledSite implements SiteInterface ]); } - private function registerLogger(Container $container) + protected function registerLogger(Container $container) { $logPath = $this->paths->storage.'/logs/flarum-installer.log'; $handler = new StreamHandler($logPath, Logger::DEBUG);