diff --git a/framework/core/src/Api/ExceptionHandler/ValidationExceptionHandler.php b/framework/core/src/Api/ExceptionHandler/ValidationExceptionHandler.php index 9a1f77ec1..f36b253fd 100644 --- a/framework/core/src/Api/ExceptionHandler/ValidationExceptionHandler.php +++ b/framework/core/src/Api/ExceptionHandler/ValidationExceptionHandler.php @@ -12,7 +12,7 @@ namespace Flarum\Api\ExceptionHandler; use Exception; -use Flarum\Core\Exception\ValidationException; +use Flarum\Foundation\ValidationException; use Tobscure\JsonApi\Exception\Handler\ExceptionHandlerInterface; use Tobscure\JsonApi\Exception\Handler\ResponseBag; diff --git a/framework/core/src/Core/Command/ConfirmEmailHandler.php b/framework/core/src/Core/Command/ConfirmEmailHandler.php index f8415792d..b657f1972 100644 --- a/framework/core/src/Core/Command/ConfirmEmailHandler.php +++ b/framework/core/src/Core/Command/ConfirmEmailHandler.php @@ -13,12 +13,12 @@ namespace Flarum\Core\Command; use Flarum\User\EmailToken; use Flarum\User\UserRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Illuminate\Contracts\Events\Dispatcher; class ConfirmEmailHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; /** * @var \Flarum\User\UserRepository diff --git a/framework/core/src/Core/Command/CreateGroupHandler.php b/framework/core/src/Core/Command/CreateGroupHandler.php index 54d8c3d8c..6c3be8830 100644 --- a/framework/core/src/Core/Command/CreateGroupHandler.php +++ b/framework/core/src/Core/Command/CreateGroupHandler.php @@ -14,14 +14,14 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Group; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\GroupValidator; use Flarum\Event\GroupWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class CreateGroupHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/DeleteAvatarHandler.php b/framework/core/src/Core/Command/DeleteAvatarHandler.php index aabbe4ddc..00961f741 100644 --- a/framework/core/src/Core/Command/DeleteAvatarHandler.php +++ b/framework/core/src/Core/Command/DeleteAvatarHandler.php @@ -14,14 +14,14 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\UserRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Event\AvatarWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; use League\Flysystem\FilesystemInterface; class DeleteAvatarHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/DeleteDiscussionHandler.php b/framework/core/src/Core/Command/DeleteDiscussionHandler.php index a02e4609b..459432041 100644 --- a/framework/core/src/Core/Command/DeleteDiscussionHandler.php +++ b/framework/core/src/Core/Command/DeleteDiscussionHandler.php @@ -14,13 +14,13 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Repository\DiscussionRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Event\DiscussionWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeleteDiscussionHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/DeleteGroupHandler.php b/framework/core/src/Core/Command/DeleteGroupHandler.php index ed849a5be..e3ee47543 100644 --- a/framework/core/src/Core/Command/DeleteGroupHandler.php +++ b/framework/core/src/Core/Command/DeleteGroupHandler.php @@ -14,13 +14,13 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Repository\GroupRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Event\GroupWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeleteGroupHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/DeletePostHandler.php b/framework/core/src/Core/Command/DeletePostHandler.php index e7697e622..a616dbcc5 100644 --- a/framework/core/src/Core/Command/DeletePostHandler.php +++ b/framework/core/src/Core/Command/DeletePostHandler.php @@ -14,13 +14,13 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Repository\PostRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Event\PostWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeletePostHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/DeleteUserHandler.php b/framework/core/src/Core/Command/DeleteUserHandler.php index e4503a53d..d5ed6c15f 100644 --- a/framework/core/src/Core/Command/DeleteUserHandler.php +++ b/framework/core/src/Core/Command/DeleteUserHandler.php @@ -14,13 +14,13 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\UserRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\User\Event\Deleting; use Illuminate\Contracts\Events\Dispatcher; class DeleteUserHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/EditDiscussionHandler.php b/framework/core/src/Core/Command/EditDiscussionHandler.php index b8866bf1f..6f8e7bada 100644 --- a/framework/core/src/Core/Command/EditDiscussionHandler.php +++ b/framework/core/src/Core/Command/EditDiscussionHandler.php @@ -14,14 +14,14 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Repository\DiscussionRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\DiscussionValidator; use Flarum\Event\DiscussionWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class EditDiscussionHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/EditGroupHandler.php b/framework/core/src/Core/Command/EditGroupHandler.php index 6d1d8ad4f..42fe0e0a7 100644 --- a/framework/core/src/Core/Command/EditGroupHandler.php +++ b/framework/core/src/Core/Command/EditGroupHandler.php @@ -15,14 +15,14 @@ use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\Exception\PermissionDeniedException; use Flarum\Core\Group; use Flarum\Core\Repository\GroupRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\GroupValidator; use Flarum\Event\GroupWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class EditGroupHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/EditPostHandler.php b/framework/core/src/Core/Command/EditPostHandler.php index 32e607b5b..65707e301 100644 --- a/framework/core/src/Core/Command/EditPostHandler.php +++ b/framework/core/src/Core/Command/EditPostHandler.php @@ -14,14 +14,14 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Post\CommentPost; use Flarum\Core\Repository\PostRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\PostValidator; use Flarum\Event\PostWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class EditPostHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/EditUserHandler.php b/framework/core/src/Core/Command/EditUserHandler.php index 4ba4a4bff..6071fa1ad 100644 --- a/framework/core/src/Core/Command/EditUserHandler.php +++ b/framework/core/src/Core/Command/EditUserHandler.php @@ -13,7 +13,7 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\UserRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\User\User; use Flarum\User\UserValidator; use Flarum\User\Event\GroupsChanged; @@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher; class EditUserHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/PostReplyHandler.php b/framework/core/src/Core/Command/PostReplyHandler.php index 06837011b..260116bca 100644 --- a/framework/core/src/Core/Command/PostReplyHandler.php +++ b/framework/core/src/Core/Command/PostReplyHandler.php @@ -16,14 +16,14 @@ use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Notification\NotificationSyncer; use Flarum\Core\Post\CommentPost; use Flarum\Core\Repository\DiscussionRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\PostValidator; use Flarum\Event\PostWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class PostReplyHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/ReadDiscussionHandler.php b/framework/core/src/Core/Command/ReadDiscussionHandler.php index 9630100a1..0166b1439 100644 --- a/framework/core/src/Core/Command/ReadDiscussionHandler.php +++ b/framework/core/src/Core/Command/ReadDiscussionHandler.php @@ -13,13 +13,13 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Repository\DiscussionRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Event\DiscussionStateWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class ReadDiscussionHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/RegisterUserHandler.php b/framework/core/src/Core/Command/RegisterUserHandler.php index 2e3a1b158..2c3bdb931 100644 --- a/framework/core/src/Core/Command/RegisterUserHandler.php +++ b/framework/core/src/Core/Command/RegisterUserHandler.php @@ -15,7 +15,7 @@ use Exception; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AuthToken; use Flarum\User\Exception\PermissionDeniedException; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\User\User; use Flarum\User\UserValidator; use Flarum\User\Event\Saving; @@ -33,7 +33,7 @@ use League\Flysystem\MountManager; class RegisterUserHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/StartDiscussionHandler.php b/framework/core/src/Core/Command/StartDiscussionHandler.php index fa1950259..e3f916f61 100644 --- a/framework/core/src/Core/Command/StartDiscussionHandler.php +++ b/framework/core/src/Core/Command/StartDiscussionHandler.php @@ -14,7 +14,7 @@ namespace Flarum\Core\Command; use Exception; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Discussion; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\Core\Validator\DiscussionValidator; use Flarum\Event\DiscussionWillBeSaved; use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher; @@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher as EventDispatcher; class StartDiscussionHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Command/UploadAvatarHandler.php b/framework/core/src/Core/Command/UploadAvatarHandler.php index 61fa05601..791090e58 100644 --- a/framework/core/src/Core/Command/UploadAvatarHandler.php +++ b/framework/core/src/Core/Command/UploadAvatarHandler.php @@ -14,7 +14,7 @@ namespace Flarum\Core\Command; use Exception; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\UserRepository; -use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Foundation\DispatchEventsTrait; use Flarum\User\AvatarValidator; use Flarum\Event\AvatarWillBeSaved; use Flarum\Foundation\Application; @@ -29,7 +29,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; class UploadAvatarHandler { - use DispatchEventsTrait; + use Flarum\Foundation\DispatchEventsTrait; use AssertPermissionTrait; /** diff --git a/framework/core/src/Core/Discussion.php b/framework/core/src/Core/Discussion.php index 39c97bf6d..d22910469 100644 --- a/framework/core/src/Core/Discussion.php +++ b/framework/core/src/Core/Discussion.php @@ -12,7 +12,7 @@ namespace Flarum\Core; use Flarum\Core\Post\MergeableInterface; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; use Flarum\Event\DiscussionWasDeleted; @@ -55,7 +55,7 @@ use Flarum\Util\Str; */ class Discussion extends AbstractModel { - use EventGeneratorTrait; + use Flarum\Foundation\EventGeneratorTrait; use ScopeVisibilityTrait; /** diff --git a/framework/core/src/Core/DiscussionState.php b/framework/core/src/Core/DiscussionState.php index e32e120b4..39ea0e974 100644 --- a/framework/core/src/Core/DiscussionState.php +++ b/framework/core/src/Core/DiscussionState.php @@ -11,7 +11,7 @@ namespace Flarum\Core; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\AbstractModel; use Flarum\Event\DiscussionWasRead; use Illuminate\Database\Eloquent\Builder; @@ -32,7 +32,7 @@ use Illuminate\Database\Eloquent\Builder; */ class DiscussionState extends AbstractModel { - use EventGeneratorTrait; + use Flarum\Foundation\EventGeneratorTrait; /** * {@inheritdoc} diff --git a/framework/core/src/Core/Group.php b/framework/core/src/Core/Group.php index eb05daa5c..f25459f12 100755 --- a/framework/core/src/Core/Group.php +++ b/framework/core/src/Core/Group.php @@ -11,7 +11,7 @@ namespace Flarum\Core; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; use Flarum\Event\GroupWasCreated; @@ -29,7 +29,7 @@ use Flarum\Event\GroupWasRenamed; */ class Group extends AbstractModel { - use EventGeneratorTrait; + use Flarum\Foundation\EventGeneratorTrait; use ScopeVisibilityTrait; /** diff --git a/framework/core/src/Core/Post.php b/framework/core/src/Core/Post.php index f85563965..36d7c5124 100755 --- a/framework/core/src/Core/Post.php +++ b/framework/core/src/Core/Post.php @@ -12,7 +12,7 @@ namespace Flarum\Core; use Flarum\Core\Post\RegisteredTypesScope; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; use Flarum\Event\PostWasDeleted; @@ -39,7 +39,7 @@ use Illuminate\Database\Eloquent\Builder; */ class Post extends AbstractModel { - use EventGeneratorTrait; + use Flarum\Foundation\EventGeneratorTrait; use ScopeVisibilityTrait; /** diff --git a/framework/core/src/Core/Validator/DiscussionValidator.php b/framework/core/src/Core/Validator/DiscussionValidator.php index 7d67fd0a4..2c2a90818 100644 --- a/framework/core/src/Core/Validator/DiscussionValidator.php +++ b/framework/core/src/Core/Validator/DiscussionValidator.php @@ -11,6 +11,8 @@ namespace Flarum\Core\Validator; +use Flarum\Foundation\AbstractValidator; + class DiscussionValidator extends AbstractValidator { protected $rules = [ diff --git a/framework/core/src/Core/Validator/GroupValidator.php b/framework/core/src/Core/Validator/GroupValidator.php index a66f52dd4..506163f6f 100644 --- a/framework/core/src/Core/Validator/GroupValidator.php +++ b/framework/core/src/Core/Validator/GroupValidator.php @@ -11,6 +11,8 @@ namespace Flarum\Core\Validator; +use Flarum\Foundation\AbstractValidator; + class GroupValidator extends AbstractValidator { protected $rules = [ diff --git a/framework/core/src/Core/Validator/PostValidator.php b/framework/core/src/Core/Validator/PostValidator.php index 3fe573845..87142c9fd 100644 --- a/framework/core/src/Core/Validator/PostValidator.php +++ b/framework/core/src/Core/Validator/PostValidator.php @@ -11,6 +11,8 @@ namespace Flarum\Core\Validator; +use Flarum\Foundation\AbstractValidator; + class PostValidator extends AbstractValidator { protected $rules = [ diff --git a/framework/core/src/Core/Validator/AbstractValidator.php b/framework/core/src/Foundation/AbstractValidator.php similarity index 94% rename from framework/core/src/Core/Validator/AbstractValidator.php rename to framework/core/src/Foundation/AbstractValidator.php index e1c138ecb..ee1062af5 100644 --- a/framework/core/src/Core/Validator/AbstractValidator.php +++ b/framework/core/src/Foundation/AbstractValidator.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Flarum\Core\Validator; +namespace Flarum\Foundation; -use Flarum\Event\ConfigureValidator; +use Flarum\Foundation\Event\Validating; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Validation\ValidationException; use Illuminate\Validation\Factory; @@ -94,7 +94,7 @@ abstract class AbstractValidator $validator = $this->validator->make($attributes, $rules, $this->getMessages()); $this->events->fire( - new ConfigureValidator($this, $validator) + new Validating($this, $validator) ); return $validator; diff --git a/framework/core/src/Core/Support/DispatchEventsTrait.php b/framework/core/src/Foundation/DispatchEventsTrait.php similarity index 95% rename from framework/core/src/Core/Support/DispatchEventsTrait.php rename to framework/core/src/Foundation/DispatchEventsTrait.php index c145a8c3d..081bfc64b 100644 --- a/framework/core/src/Core/Support/DispatchEventsTrait.php +++ b/framework/core/src/Foundation/DispatchEventsTrait.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Flarum\Core\Support; +namespace Flarum\Foundation; use Flarum\User\User; use Illuminate\Contracts\Events\Dispatcher; diff --git a/framework/core/src/Event/ConfigureValidator.php b/framework/core/src/Foundation/Event/Validating.php similarity index 78% rename from framework/core/src/Event/ConfigureValidator.php rename to framework/core/src/Foundation/Event/Validating.php index c9343f761..fc231abc9 100644 --- a/framework/core/src/Event/ConfigureValidator.php +++ b/framework/core/src/Foundation/Event/Validating.php @@ -9,20 +9,20 @@ * file that was distributed with this source code. */ -namespace Flarum\Event; +namespace Flarum\Foundation\Event; -use Flarum\Core\Validator\AbstractValidator; +use Flarum\Foundation\AbstractValidator; use Illuminate\Validation\Validator; /** - * The `ConfigureModelValidator` event is called when a validator instance for a + * The `Validating` event is called when a validator instance for a * model is being built. This event can be used to add custom rules/extensions * to the validator for when validation takes place. */ -class ConfigureValidator +class Validating { /** - * @var AbstractValidator + * @var \Flarum\Foundation\AbstractValidator */ public $type; diff --git a/framework/core/src/Core/Support/EventGeneratorTrait.php b/framework/core/src/Foundation/EventGeneratorTrait.php similarity index 95% rename from framework/core/src/Core/Support/EventGeneratorTrait.php rename to framework/core/src/Foundation/EventGeneratorTrait.php index c12402ba5..e24ceda13 100644 --- a/framework/core/src/Core/Support/EventGeneratorTrait.php +++ b/framework/core/src/Foundation/EventGeneratorTrait.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Flarum\Core\Support; +namespace Flarum\Foundation; trait EventGeneratorTrait { diff --git a/framework/core/src/Core/Exception/ValidationException.php b/framework/core/src/Foundation/ValidationException.php similarity index 96% rename from framework/core/src/Core/Exception/ValidationException.php rename to framework/core/src/Foundation/ValidationException.php index 51c33f653..84cf53084 100644 --- a/framework/core/src/Core/Exception/ValidationException.php +++ b/framework/core/src/Foundation/ValidationException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Flarum\Core\Exception; +namespace Flarum\Foundation; use Exception; diff --git a/framework/core/src/User/AvatarValidator.php b/framework/core/src/User/AvatarValidator.php index b4adcb321..e40ca45f1 100644 --- a/framework/core/src/User/AvatarValidator.php +++ b/framework/core/src/User/AvatarValidator.php @@ -11,7 +11,7 @@ namespace Flarum\User; -use Flarum\Core\Validator\AbstractValidator; +use Flarum\Foundation\AbstractValidator; class AvatarValidator extends AbstractValidator { diff --git a/framework/core/src/User/User.php b/framework/core/src/User/User.php index 9e4917fc5..80792e0c8 100755 --- a/framework/core/src/User/User.php +++ b/framework/core/src/User/User.php @@ -16,7 +16,7 @@ use Flarum\User\Gate; use Flarum\Core\Group; use Flarum\Core\Notification; use Flarum\Core\Permission; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; use Flarum\Event\CheckUserPassword; @@ -56,7 +56,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface; */ class User extends AbstractModel { - use EventGeneratorTrait; + use Flarum\Foundation\EventGeneratorTrait; use ScopeVisibilityTrait; /** diff --git a/framework/core/src/User/UserValidator.php b/framework/core/src/User/UserValidator.php index 79d0a08c1..a994a999f 100644 --- a/framework/core/src/User/UserValidator.php +++ b/framework/core/src/User/UserValidator.php @@ -11,7 +11,7 @@ namespace Flarum\User; -use Flarum\Core\Validator\AbstractValidator; +use Flarum\Foundation\AbstractValidator; class UserValidator extends AbstractValidator { diff --git a/framework/core/tests/Flarum/Api/Handler/ValidationExceptionHandlerTest.php b/framework/core/tests/Flarum/Api/Handler/ValidationExceptionHandlerTest.php index 2d2130cf1..d3440f52f 100644 --- a/framework/core/tests/Flarum/Api/Handler/ValidationExceptionHandlerTest.php +++ b/framework/core/tests/Flarum/Api/Handler/ValidationExceptionHandlerTest.php @@ -13,7 +13,7 @@ namespace Tests\Flarum\Api\Handler; use Exception; use Flarum\Api\ExceptionHandler\ValidationExceptionHandler; -use Flarum\Core\Exception\ValidationException; +use Flarum\Foundation\ValidationException; use Tests\Test\TestCase; class ValidationExceptionHandlerTest extends TestCase