From 7040ad134441067b00be9626660563be67c6790b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 13 Aug 2015 12:56:26 +0930 Subject: [PATCH] Remove old files --- framework/core/codeception.yml | 17 --------- framework/core/src/Api/ApiServiceProvider.php | 20 ----------- .../core/src/Events/RegisterActivityTypes.php | 35 ------------------- 3 files changed, 72 deletions(-) delete mode 100644 framework/core/codeception.yml delete mode 100644 framework/core/src/Events/RegisterActivityTypes.php diff --git a/framework/core/codeception.yml b/framework/core/codeception.yml deleted file mode 100644 index 306e73969..000000000 --- a/framework/core/codeception.yml +++ /dev/null @@ -1,17 +0,0 @@ -actor: Tester -paths: - tests: tests - log: tests/_output - data: tests/_data - helpers: tests/_support -settings: - bootstrap: _bootstrap.php - colors: true - memory_limit: 1024M -modules: - config: - Db: - dsn: '' - user: '' - password: '' - dump: tests/_data/dump.sql diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index de8f2886b..911f32948 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -43,29 +43,9 @@ class ApiServiceProvider extends ServiceProvider { $this->routes(); - $this->registerActivitySerializers(); $this->registerNotificationSerializers(); } - /** - * Register activity serializers. - */ - protected function registerActivitySerializers() - { - $blueprints = []; - $serializers = [ - 'posted' => 'Flarum\Api\Serializers\PostBasicSerializer', - 'startedDiscussion' => 'Flarum\Api\Serializers\PostBasicSerializer', - 'joined' => 'Flarum\Api\Serializers\UserSerializer' - ]; - - event(new RegisterActivityTypes($blueprints, $serializers)); - - foreach ($serializers as $type => $serializer) { - ActivitySerializer::setSubjectSerializer($type, $serializer); - } - } - /** * Register notification serializers. */ diff --git a/framework/core/src/Events/RegisterActivityTypes.php b/framework/core/src/Events/RegisterActivityTypes.php deleted file mode 100644 index 845777044..000000000 --- a/framework/core/src/Events/RegisterActivityTypes.php +++ /dev/null @@ -1,35 +0,0 @@ -blueprints = &$blueprints; - $this->serializers = &$serializers; - } - - public function register($blueprint, $serializer) - { - if (! (new ReflectionClass($blueprint))->implementsInterface('Flarum\Core\Activity\Blueprint')) { - throw new InvalidArgumentException('Activity blueprint ' . $blueprint - . ' must implement Flarum\Core\Activity\Blueprint'); - } - - $this->blueprints[] = $blueprint; - - $this->serializers[$blueprint::getType()] = $serializer; - } -}