diff --git a/framework/core/src/BusServiceProvider.php b/framework/core/src/BusServiceProvider.php deleted file mode 100644 index 4406460f6..000000000 --- a/framework/core/src/BusServiceProvider.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Flarum; - -use Flarum\Foundation\AbstractServiceProvider; - -/** - * @deprecated - */ -class BusServiceProvider extends AbstractServiceProvider -{ - /** - * {@inheritdoc} - */ - public function boot() - { - $this->app->make('Illuminate\Contracts\Bus\Dispatcher')->mapUsing(function ($command) { - return get_class($command).'Handler@handle'; - }); - } -} diff --git a/framework/core/src/Database/DatabaseServiceProvider.php b/framework/core/src/Database/DatabaseServiceProvider.php index c4b349074..e54fb3e8e 100644 --- a/framework/core/src/Database/DatabaseServiceProvider.php +++ b/framework/core/src/Database/DatabaseServiceProvider.php @@ -28,7 +28,6 @@ class DatabaseServiceProvider extends AbstractServiceProvider $connection = $factory->make($this->app->config('database')); $connection->setEventDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher')); - $connection->setFetchMode(PDO::FETCH_CLASS); return $connection; }); diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php index 85533ffd9..3e9a5c7df 100644 --- a/framework/core/src/Foundation/Application.php +++ b/framework/core/src/Foundation/Application.php @@ -737,4 +737,22 @@ class Application extends Container implements ApplicationContract $this->loadedProviders = []; } + + /** + * Get the path to the cached packages.php file. + * + * @return string + */ + public function getCachedPackagesPath() + { + return storage_path('app/cache/packages.php'); + } + + /** + * @return string + */ + public function resourcePath() + { + return storage_path('resources'); + } } diff --git a/framework/core/src/Foundation/Site.php b/framework/core/src/Foundation/Site.php index d59b6f056..cd1484dab 100644 --- a/framework/core/src/Foundation/Site.php +++ b/framework/core/src/Foundation/Site.php @@ -178,8 +178,6 @@ class Site $config->set('mail.username', $settings->get('mail_username')); $config->set('mail.password', $settings->get('mail_password')); - $app->register(\Flarum\BusServiceProvider::class); - $app->register(DiscussionServiceProvider::class); $app->register(FormatterServiceProvider::class); $app->register(GroupServiceProvider::class); diff --git a/framework/core/src/User/Gate.php b/framework/core/src/User/Gate.php index 9a9e91a27..7d9ac895c 100644 --- a/framework/core/src/User/Gate.php +++ b/framework/core/src/User/Gate.php @@ -353,4 +353,51 @@ class Gate implements GateContract { return call_user_func($this->userResolver); } + + /** + * Register a callback to run after all Gate checks. + * + * @param callable $callback + * @return GateContract + */ + public function after(callable $callback) + { + // TODO: Implement after() method. + } + + /** + * Determine if any one of the given abilities should be granted for the current user. + * + * @param iterable|string $abilities + * @param array|mixed $arguments + * @return bool + */ + public function any($abilities, $arguments = []) + { + // TODO: Implement any() method. + } + + /** + * Determine if the given ability should be granted for the current user. + * + * @param string $ability + * @param array|mixed $arguments + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function authorize($ability, $arguments = []) + { + // TODO: Implement authorize() method. + } + + /** + * Get all of the defined abilities. + * + * @return array + */ + public function abilities() + { + // TODO: Implement abilities() method. + } }