NOW MANAGED ON CODEBERG
Moved models to folder, renamed managers to tools
Dan Brownc7a2d568bf69
diff --git a/app/Actions/Tag.php b/app/Actions/Tag.phpindex 80a911508..709b1ddeb 100644--- a/app/Actions/Tag.php+++ b/app/Actions/Tag.php@@ -2,10 +2,6 @@use BookStack\Model;-/**- * Class Attribute- * @package BookStack- */class Tag extends Model{protected $fillable = ['name', 'value', 'order'];diff --git a/app/Api/ApiToken.php b/app/Api/ApiToken.phpindex 91c407fd8..defaa7e95 100644--- a/app/Api/ApiToken.php+++ b/app/Api/ApiToken.php@@ -14,7 +14,6 @@ use Illuminate\Support\Carbon;* @property string $name* @property Carbon $expires_at* @property User $user- * @package BookStack\Api*/class ApiToken extends Model implements Loggable{diff --git a/app/Auth/Access/Guards/ExternalBaseSessionGuard.php b/app/Auth/Access/Guards/ExternalBaseSessionGuard.phpindex f3d05366d..9a0c691c8 100644--- a/app/Auth/Access/Guards/ExternalBaseSessionGuard.php+++ b/app/Auth/Access/Guards/ExternalBaseSessionGuard.php@@ -15,8 +15,6 @@ use Illuminate\Contracts\Session\Session;* guard with 'remember' functionality removed. Basic auth and event emission* has also been removed to keep this simple. Designed to be extended by external* Auth Guards.- *- * @package Illuminate\Auth*/class ExternalBaseSessionGuard implements StatefulGuard{diff --git a/app/Auth/Access/Guards/Saml2SessionGuard.php b/app/Auth/Access/Guards/Saml2SessionGuard.phpindex 4023913ed..68683bb43 100644--- a/app/Auth/Access/Guards/Saml2SessionGuard.php+++ b/app/Auth/Access/Guards/Saml2SessionGuard.php@@ -9,8 +9,6 @@ namespace BookStack\Auth\Access\Guards;* into the default laravel 'Guard' auth flow. Instead most of the logic is done* via the Saml2 controller & Saml2Service. This class provides a safer, thin* version of SessionGuard.- *- * @package BookStack\Auth\Access\Guards*/class Saml2SessionGuard extends ExternalBaseSessionGuard{diff --git a/app/Auth/Access/Ldap.php b/app/Auth/Access/Ldap.phpindex 843a2f204..6b7bd9b9b 100644--- a/app/Auth/Access/Ldap.php+++ b/app/Auth/Access/Ldap.php@@ -4,7 +4,6 @@* Class Ldap* An object-orientated thin abstraction wrapper for common PHP LDAP functions.* Allows the standard LDAP functions to be mocked for testing.- * @package BookStack\Services*/class Ldap{diff --git a/app/Auth/SocialAccount.php b/app/Auth/SocialAccount.phpindex 1c83980cb..116cdc854 100644--- a/app/Auth/SocialAccount.php+++ b/app/Auth/SocialAccount.php@@ -7,7 +7,6 @@ use BookStack\Model;* Class SocialAccount* @property string $driver* @property User $user- * @package BookStack\Auth*/class SocialAccount extends Model implements Loggable{diff --git a/app/Auth/User.php b/app/Auth/User.phpindex 5feb269e2..32179a1fb 100644--- a/app/Auth/User.php+++ b/app/Auth/User.php@@ -18,7 +18,6 @@ use Illuminate\Notifications\Notifiable;/*** Class User- * @package BookStack\Auth* @property string $id* @property string $name* @property string $emaildiff --git a/app/Entities/BreadcrumbsViewComposer.php b/app/Entities/BreadcrumbsViewComposer.phpindex 43d63d026..fd0152a7b 100644--- a/app/Entities/BreadcrumbsViewComposer.php+++ b/app/Entities/BreadcrumbsViewComposer.php@@ -1,6 +1,6 @@<?php namespace BookStack\Entities;-use BookStack\Entities\Managers\EntityContext;+use BookStack\Entities\Tools\ShelfContext;use Illuminate\View\View;class BreadcrumbsViewComposer@@ -10,9 +10,9 @@ class BreadcrumbsViewComposer/*** BreadcrumbsViewComposer constructor.- * @param EntityContext $entityContextManager+ * @param ShelfContext $entityContextManager*/- public function __construct(EntityContext $entityContextManager)+ public function __construct(ShelfContext $entityContextManager){$this->entityContextManager = $entityContextManager;}diff --git a/app/Entities/EntityProvider.php b/app/Entities/EntityProvider.phpindex d28afe6f2..2246f11f7 100644--- a/app/Entities/EntityProvider.php+++ b/app/Entities/EntityProvider.php@@ -6,8 +6,6 @@* Provides access to the core entity models.* Wrapped up in this provider since they are often used together* so this is a neater alternative to injecting all in individually.- *- * @package BookStack\Entities*/class EntityProvider{diff --git a/app/Entities/ExportService.php b/app/Entities/ExportService.phpindex f945dfbe4..c2057481b 100644--- a/app/Entities/ExportService.php+++ b/app/Entities/ExportService.php@@ -1,7 +1,7 @@<?php namespace BookStack\Entities;-use BookStack\Entities\Managers\BookContents;-use BookStack\Entities\Managers\PageContent;+use BookStack\Entities\Tools\BookContents;+use BookStack\Entities\Tools\PageContent;use BookStack\Uploads\ImageService;use DomPDF;use Exception;diff --git a/app/Entities/Book.php b/app/Entities/Models/Book.phpsimilarity index 99%rename from app/Entities/Book.phprename to app/Entities/Models/Book.phpindex af8344b88..a5503730b 100644--- a/app/Entities/Book.php+++ b/app/Entities/Models/Book.php@@ -12,7 +12,6 @@ use Illuminate\Support\Collection;* @property string $description* @property int $image_id* @property Image|null $cover- * @package BookStack\Entities*/class Book extends Entity implements HasCoverImage{diff --git a/app/Entities/BookChild.php b/app/Entities/Models/BookChild.phpsimilarity index 97%rename from app/Entities/BookChild.phprename to app/Entities/Models/BookChild.phpindex 042b56e28..f05a25499 100644--- a/app/Entities/BookChild.php+++ b/app/Entities/Models/BookChild.php@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;* @property Book $book* @method Builder whereSlugs(string $bookSlug, string $childSlug)*/-class BookChild extends Entity+abstract class BookChild extends Entity{/**diff --git a/app/Entities/Bookshelf.php b/app/Entities/Models/Bookshelf.phpsimilarity index 100%rename from app/Entities/Bookshelf.phprename to app/Entities/Models/Bookshelf.phpdiff --git a/app/Entities/Chapter.php b/app/Entities/Models/Chapter.phpsimilarity index 98%rename from app/Entities/Chapter.phprename to app/Entities/Models/Chapter.phpindex 3290afcfa..69dafe8ac 100644--- a/app/Entities/Chapter.php+++ b/app/Entities/Models/Chapter.php@@ -5,7 +5,6 @@ use Illuminate\Support\Collection;/*** Class Chapter* @property Collection<Page> $pages- * @package BookStack\Entities*/class Chapter extends BookChild{diff --git a/app/Entities/Deletion.php b/app/Entities/Models/Deletion.phpsimilarity index 100%rename from app/Entities/Deletion.phprename to app/Entities/Models/Deletion.phpdiff --git a/app/Entities/Entity.php b/app/Entities/Models/Entity.phpsimilarity index 98%rename from app/Entities/Entity.phprename to app/Entities/Models/Entity.phpindex 99922bceb..29853fe30 100644--- a/app/Entities/Entity.php+++ b/app/Entities/Models/Entity.php@@ -32,8 +32,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;* @method static Entity|Builder hasPermission(string $permission)* @method static Builder withLastView()* @method static Builder withViewCount()- *- * @package BookStack\Entities*/class Entity extends Ownable{@@ -326,8 +324,7 @@ class Entity extends Ownable*/public function refreshSlug(): string{- $generator = new SlugGenerator($this);- $this->slug = $generator->generate();+ $this->slug = (new SlugGenerator)->generate($this);return $this->slug;}}diff --git a/app/Entities/HasCoverImage.php b/app/Entities/Models/HasCoverImage.phpsimilarity index 100%rename from app/Entities/HasCoverImage.phprename to app/Entities/Models/HasCoverImage.phpdiff --git a/app/Entities/Page.php b/app/Entities/Models/Page.phpsimilarity index 100%rename from app/Entities/Page.phprename to app/Entities/Models/Page.phpdiff --git a/app/Entities/PageRevision.php b/app/Entities/Models/PageRevision.phpsimilarity index 100%rename from app/Entities/PageRevision.phprename to app/Entities/Models/PageRevision.phpdiff --git a/app/Entities/SearchTerm.php b/app/Entities/Models/SearchTerm.phpsimilarity index 100%rename from app/Entities/SearchTerm.phprename to app/Entities/Models/SearchTerm.phpdiff --git a/app/Entities/Repos/BookRepo.php b/app/Entities/Repos/BookRepo.phpindex f32dd8582..3fb924a89 100644--- a/app/Entities/Repos/BookRepo.php+++ b/app/Entities/Repos/BookRepo.php@@ -3,7 +3,7 @@use BookStack\Actions\ActivityType;use BookStack\Actions\TagRepo;use BookStack\Entities\Book;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;use BookStack\Exceptions\ImageUploadException;use BookStack\Exceptions\NotFoundException;use BookStack\Facades\Activity;diff --git a/app/Entities/Repos/BookshelfRepo.php b/app/Entities/Repos/BookshelfRepo.phpindex 039278228..8f12e9dc0 100644--- a/app/Entities/Repos/BookshelfRepo.php+++ b/app/Entities/Repos/BookshelfRepo.php@@ -3,7 +3,7 @@use BookStack\Actions\ActivityType;use BookStack\Entities\Book;use BookStack\Entities\Bookshelf;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;use BookStack\Exceptions\ImageUploadException;use BookStack\Exceptions\NotFoundException;use BookStack\Facades\Activity;diff --git a/app/Entities/Repos/ChapterRepo.php b/app/Entities/Repos/ChapterRepo.phpindex 312cb69e5..aa9784c2d 100644--- a/app/Entities/Repos/ChapterRepo.php+++ b/app/Entities/Repos/ChapterRepo.php@@ -3,8 +3,8 @@use BookStack\Actions\ActivityType;use BookStack\Entities\Book;use BookStack\Entities\Chapter;-use BookStack\Entities\Managers\BookContents;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\BookContents;+use BookStack\Entities\Tools\TrashCan;use BookStack\Exceptions\MoveOperationException;use BookStack\Exceptions\NotFoundException;use BookStack\Facades\Activity;diff --git a/app/Entities/Repos/PageRepo.php b/app/Entities/Repos/PageRepo.phpindex 0e5b48482..7ea79efe6 100644--- a/app/Entities/Repos/PageRepo.php+++ b/app/Entities/Repos/PageRepo.php@@ -4,9 +4,9 @@ use BookStack\Actions\ActivityType;use BookStack\Entities\Book;use BookStack\Entities\Chapter;use BookStack\Entities\Entity;-use BookStack\Entities\Managers\BookContents;-use BookStack\Entities\Managers\PageContent;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\BookContents;+use BookStack\Entities\Tools\PageContent;+use BookStack\Entities\Tools\TrashCan;use BookStack\Entities\Page;use BookStack\Entities\PageRevision;use BookStack\Exceptions\MoveOperationException;diff --git a/app/Entities/Managers/BookContents.php b/app/Entities/Tools/BookContents.phpsimilarity index 99%rename from app/Entities/Managers/BookContents.phprename to app/Entities/Tools/BookContents.phpindex 52447e43b..ae9a95f46 100644--- a/app/Entities/Managers/BookContents.php+++ b/app/Entities/Tools/BookContents.php@@ -1,4 +1,4 @@-<?php namespace BookStack\Entities\Managers;+<?php namespace BookStack\Entities\Tools;use BookStack\Entities\Book;use BookStack\Entities\BookChild;@@ -18,7 +18,6 @@ class BookContents/*** BookContents constructor.- * @param $book*/public function __construct(Book $book){diff --git a/app/Entities/Managers/PageContent.php b/app/Entities/Tools/PageContent.phpsimilarity index 99%rename from app/Entities/Managers/PageContent.phprename to app/Entities/Tools/PageContent.phpindex 7338a36b3..2d3b324a1 100644--- a/app/Entities/Managers/PageContent.php+++ b/app/Entities/Tools/PageContent.php@@ -1,4 +1,4 @@-<?php namespace BookStack\Entities\Managers;+<?php namespace BookStack\Entities\Tools;use BookStack\Entities\Page;use DOMDocument;diff --git a/app/Entities/Managers/PageEditActivity.php b/app/Entities/Tools/PageEditActivity.phpsimilarity index 98%rename from app/Entities/Managers/PageEditActivity.phprename to app/Entities/Tools/PageEditActivity.phpindex cebbf8720..5fb7128b7 100644--- a/app/Entities/Managers/PageEditActivity.php+++ b/app/Entities/Tools/PageEditActivity.php@@ -1,4 +1,4 @@-<?php namespace BookStack\Entities\Managers;+<?php namespace BookStack\Entities\Tools;use BookStack\Entities\Page;use BookStack\Entities\PageRevision;diff --git a/app/Entities/SearchOptions.php b/app/Entities/Tools/SearchOptions.phpsimilarity index 100%rename from app/Entities/SearchOptions.phprename to app/Entities/Tools/SearchOptions.phpdiff --git a/app/Entities/Managers/EntityContext.php b/app/Entities/Tools/ShelfContext.phpsimilarity index 60%rename from app/Entities/Managers/EntityContext.phprename to app/Entities/Tools/ShelfContext.phpindex 551cd1a10..0635bce1c 100644--- a/app/Entities/Managers/EntityContext.php+++ b/app/Entities/Tools/ShelfContext.php@@ -1,29 +1,18 @@-<?php namespace BookStack\Entities\Managers;+<?php namespace BookStack\Entities\Tools;use BookStack\Entities\Book;use BookStack\Entities\Bookshelf;-use Illuminate\Session\Store;-class EntityContext+class ShelfContext{- protected $session;-protected $KEY_SHELF_CONTEXT_ID = 'context_bookshelf_id';- /**- * EntityContextManager constructor.- */- public function __construct(Store $session)- {- $this->session = $session;- }-/*** Get the current bookshelf context for the given book.*/public function getContextualShelfForBook(Book $book): ?Bookshelf{- $contextBookshelfId = $this->session->get($this->KEY_SHELF_CONTEXT_ID, null);+ $contextBookshelfId = session()->get($this->KEY_SHELF_CONTEXT_ID, null);if (!is_int($contextBookshelfId)) {return null;@@ -37,11 +26,10 @@ class EntityContext/*** Store the current contextual shelf ID.- * @param int $shelfId*/public function setShelfContext(int $shelfId){- $this->session->put($this->KEY_SHELF_CONTEXT_ID, $shelfId);+ session()->put($this->KEY_SHELF_CONTEXT_ID, $shelfId);}/**@@ -49,6 +37,6 @@ class EntityContext*/public function clearShelfContext(){- $this->session->forget($this->KEY_SHELF_CONTEXT_ID);+ session()->forget($this->KEY_SHELF_CONTEXT_ID);}}diff --git a/app/Entities/SlugGenerator.php b/app/Entities/Tools/SlugGenerator.phpsimilarity index 54%rename from app/Entities/SlugGenerator.phprename to app/Entities/Tools/SlugGenerator.phpindex e8bc556ab..884f126e8 100644--- a/app/Entities/SlugGenerator.php+++ b/app/Entities/Tools/SlugGenerator.php@@ -5,25 +5,14 @@ use Illuminate\Support\Str;class SlugGenerator{- protected $entity;-- /**- * SlugGenerator constructor.- * @param $entity- */- public function __construct(Entity $entity)- {- $this->entity = $entity;- }-/*** Generate a fresh slug for the given entity.* The slug will generated so it does not conflict within the same parent item.*/- public function generate(): string+ public function generate(Entity $entity): string{- $slug = $this->formatNameAsSlug($this->entity->name);- while ($this->slugInUse($slug)) {+ $slug = $this->formatNameAsSlug($entity->name);+ while ($this->slugInUse($slug, $entity)) {$slug .= '-' . substr(md5(rand(1, 500)), 0, 3);}return $slug;@@ -45,16 +34,16 @@ class SlugGenerator* Check if a slug is already in-use for this* type of model within the same parent.*/- protected function slugInUse(string $slug): bool+ protected function slugInUse(string $slug, Entity $entity): bool{- $query = $this->entity->newQuery()->where('slug', '=', $slug);+ $query = $entity->newQuery()->where('slug', '=', $slug);- if ($this->entity instanceof BookChild) {- $query->where('book_id', '=', $this->entity->book_id);+ if ($entity instanceof BookChild) {+ $query->where('book_id', '=', $entity->book_id);}- if ($this->entity->id) {- $query->where('id', '!=', $this->entity->id);+ if ($entity->id) {+ $query->where('id', '!=', $entity->id);}return $query->count() > 0;diff --git a/app/Entities/Managers/TrashCan.php b/app/Entities/Tools/TrashCan.phpsimilarity index 99%rename from app/Entities/Managers/TrashCan.phprename to app/Entities/Tools/TrashCan.phpindex 48768ab93..62d373e97 100644--- a/app/Entities/Managers/TrashCan.php+++ b/app/Entities/Tools/TrashCan.php@@ -1,4 +1,4 @@-<?php namespace BookStack\Entities\Managers;+<?php namespace BookStack\Entities\Tools;use BookStack\Entities\Book;use BookStack\Entities\Bookshelf;diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.phpindex 07a30996e..0fadc0f4d 100644--- a/app/Http/Controllers/BookController.php+++ b/app/Http/Controllers/BookController.php@@ -2,9 +2,9 @@use Activity;use BookStack\Actions\ActivityType;-use BookStack\Entities\Managers\BookContents;+use BookStack\Entities\Tools\BookContents;use BookStack\Entities\Bookshelf;-use BookStack\Entities\Managers\EntityContext;+use BookStack\Entities\Tools\ShelfContext;use BookStack\Entities\Repos\BookRepo;use BookStack\Exceptions\ImageUploadException;use Illuminate\Http\Request;@@ -18,7 +18,7 @@ class BookController extends Controllerprotected $bookRepo;protected $entityContextManager;- public function __construct(EntityContext $entityContextManager, BookRepo $bookRepo)+ public function __construct(ShelfContext $entityContextManager, BookRepo $bookRepo){$this->bookRepo = $bookRepo;$this->entityContextManager = $entityContextManager;diff --git a/app/Http/Controllers/BookSortController.php b/app/Http/Controllers/BookSortController.phpindex 6d561cfce..7ba11aded 100644--- a/app/Http/Controllers/BookSortController.php+++ b/app/Http/Controllers/BookSortController.php@@ -4,7 +4,7 @@ namespace BookStack\Http\Controllers;use BookStack\Actions\ActivityType;use BookStack\Entities\Book;-use BookStack\Entities\Managers\BookContents;+use BookStack\Entities\Tools\BookContents;use BookStack\Entities\Repos\BookRepo;use BookStack\Exceptions\SortOperationException;use BookStack\Facades\Activity;diff --git a/app/Http/Controllers/BookshelfController.php b/app/Http/Controllers/BookshelfController.phpindex 3001a93f4..52de74b66 100644--- a/app/Http/Controllers/BookshelfController.php+++ b/app/Http/Controllers/BookshelfController.php@@ -2,7 +2,7 @@use Activity;use BookStack\Entities\Book;-use BookStack\Entities\Managers\EntityContext;+use BookStack\Entities\Tools\ShelfContext;use BookStack\Entities\Repos\BookshelfRepo;use BookStack\Exceptions\ImageUploadException;use BookStack\Exceptions\NotFoundException;@@ -22,7 +22,7 @@ class BookshelfController extends Controller/*** BookController constructor.*/- public function __construct(BookshelfRepo $bookshelfRepo, EntityContext $entityContextManager, ImageRepo $imageRepo)+ public function __construct(BookshelfRepo $bookshelfRepo, ShelfContext $entityContextManager, ImageRepo $imageRepo){$this->bookshelfRepo = $bookshelfRepo;$this->entityContextManager = $entityContextManager;diff --git a/app/Http/Controllers/ChapterController.php b/app/Http/Controllers/ChapterController.phpindex e085a0dc7..7fc92a8cf 100644--- a/app/Http/Controllers/ChapterController.php+++ b/app/Http/Controllers/ChapterController.php@@ -1,7 +1,7 @@<?php namespace BookStack\Http\Controllers;use BookStack\Entities\Book;-use BookStack\Entities\Managers\BookContents;+use BookStack\Entities\Tools\BookContents;use BookStack\Entities\Repos\ChapterRepo;use BookStack\Exceptions\MoveOperationException;use BookStack\Exceptions\NotFoundException;diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.phpindex 3b8b7c6e2..fb3ba8e85 100644--- a/app/Http/Controllers/HomeController.php+++ b/app/Http/Controllers/HomeController.php@@ -2,7 +2,7 @@use Activity;use BookStack\Entities\Book;-use BookStack\Entities\Managers\PageContent;+use BookStack\Entities\Tools\PageContent;use BookStack\Entities\Page;use BookStack\Entities\Repos\BookRepo;use BookStack\Entities\Repos\BookshelfRepo;diff --git a/app/Http/Controllers/MaintenanceController.php b/app/Http/Controllers/MaintenanceController.phpindex a638b69cd..3354a148c 100644--- a/app/Http/Controllers/MaintenanceController.php+++ b/app/Http/Controllers/MaintenanceController.php@@ -3,7 +3,7 @@namespace BookStack\Http\Controllers;use BookStack\Actions\ActivityType;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;use BookStack\Notifications\TestEmail;use BookStack\Uploads\ImageService;use Illuminate\Http\Request;diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.phpindex 4d79a5e2f..016aa2f90 100644--- a/app/Http/Controllers/PageController.php+++ b/app/Http/Controllers/PageController.php@@ -1,8 +1,8 @@<?php namespace BookStack\Http\Controllers;-use BookStack\Entities\Managers\BookContents;-use BookStack\Entities\Managers\PageContent;-use BookStack\Entities\Managers\PageEditActivity;+use BookStack\Entities\Tools\BookContents;+use BookStack\Entities\Tools\PageContent;+use BookStack\Entities\Tools\PageEditActivity;use BookStack\Entities\Page;use BookStack\Entities\Repos\PageRepo;use BookStack\Exceptions\NotFoundException;diff --git a/app/Http/Controllers/PageExportController.php b/app/Http/Controllers/PageExportController.phpindex 97ce6ea85..92898dc61 100644--- a/app/Http/Controllers/PageExportController.php+++ b/app/Http/Controllers/PageExportController.php@@ -3,7 +3,7 @@namespace BookStack\Http\Controllers;use BookStack\Entities\ExportService;-use BookStack\Entities\Managers\PageContent;+use BookStack\Entities\Tools\PageContent;use BookStack\Entities\Repos\PageRepo;use BookStack\Exceptions\NotFoundException;use Throwable;diff --git a/app/Http/Controllers/PageRevisionController.php b/app/Http/Controllers/PageRevisionController.phpindex 7163e3d5e..d5520166d 100644--- a/app/Http/Controllers/PageRevisionController.php+++ b/app/Http/Controllers/PageRevisionController.php@@ -1,6 +1,6 @@<?php namespace BookStack\Http\Controllers;-use BookStack\Entities\Managers\PageContent;+use BookStack\Entities\Tools\PageContent;use BookStack\Entities\Repos\PageRepo;use BookStack\Exceptions\NotFoundException;use GatherContent\Htmldiff\Htmldiff;diff --git a/app/Http/Controllers/RecycleBinController.php b/app/Http/Controllers/RecycleBinController.phpindex 1a02caba0..ebf9bd16c 100644--- a/app/Http/Controllers/RecycleBinController.php+++ b/app/Http/Controllers/RecycleBinController.php@@ -2,7 +2,7 @@use BookStack\Actions\ActivityType;use BookStack\Entities\Deletion;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;class RecycleBinController extends Controller{diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.phpindex 4bc466e16..3a7ca62ba 100644--- a/app/Http/Controllers/SearchController.php+++ b/app/Http/Controllers/SearchController.php@@ -4,7 +4,7 @@ use BookStack\Actions\ViewService;use BookStack\Entities\Book;use BookStack\Entities\Bookshelf;use BookStack\Entities\Entity;-use BookStack\Entities\Managers\EntityContext;+use BookStack\Entities\Tools\ShelfContext;use BookStack\Entities\SearchService;use BookStack\Entities\SearchOptions;use Illuminate\Http\Request;@@ -21,7 +21,7 @@ class SearchController extends Controllerpublic function __construct(ViewService $viewService,SearchService $searchService,- EntityContext $entityContextManager+ ShelfContext $entityContextManager) {$this->viewService = $viewService;$this->searchService = $searchService;diff --git a/tests/AuditLogTest.php b/tests/AuditLogTest.phpindex efe842aa1..fa3ee52aa 100644--- a/tests/AuditLogTest.php+++ b/tests/AuditLogTest.php@@ -4,7 +4,7 @@ use BookStack\Actions\Activity;use BookStack\Actions\ActivityService;use BookStack\Actions\ActivityType;use BookStack\Auth\UserRepo;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;use BookStack\Entities\Page;use BookStack\Entities\Repos\PageRepo;use Carbon\Carbon;diff --git a/tests/Entity/PageContentTest.php b/tests/Entity/PageContentTest.phpindex e97df2c7e..6a7b58ffb 100644--- a/tests/Entity/PageContentTest.php+++ b/tests/Entity/PageContentTest.php@@ -1,6 +1,6 @@<?php namespace Tests\Entity;-use BookStack\Entities\Managers\PageContent;+use BookStack\Entities\Tools\PageContent;use BookStack\Entities\Page;use Tests\TestCase;diff --git a/tests/Uploads/AttachmentTest.php b/tests/Uploads/AttachmentTest.phpindex 5b73aa6ae..9662c075b 100644--- a/tests/Uploads/AttachmentTest.php+++ b/tests/Uploads/AttachmentTest.php@@ -1,6 +1,6 @@<?php namespace Tests\Uploads;-use BookStack\Entities\Managers\TrashCan;+use BookStack\Entities\Tools\TrashCan;use BookStack\Entities\Repos\PageRepo;use BookStack\Uploads\Attachment;use BookStack\Entities\Page;