[PR #4262] [MERGED] Command cleanup & alignment #6332

Closed
opened 2026-02-05 10:29:33 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4262
Author: @ssddanbrown
Created: 5/24/2023
Status: Merged
Merged: 5/24/2023
Merged by: @ssddanbrown

Base: developmentHead: command_cleanup


📝 Commits (3)

  • 0704f1b Covered untested commands with testing
  • c0620da Aligned command class code
  • 431aeef Updated command classes to include "Command" in name

📊 Changes

22 files changed (+267 additions, -292 deletions)

View changed files

📝 app/Activity/Models/View.php (+0 -8)
📝 app/Console/Commands/CleanupImagesCommand.php (+14 -25)
📝 app/Console/Commands/ClearActivityCommand.php (+4 -18)
📝 app/Console/Commands/ClearRevisionsCommand.php (+4 -18)
📝 app/Console/Commands/ClearViewsCommand.php (+4 -13)
📝 app/Console/Commands/CopyShelfPermissionsCommand.php (+6 -20)
📝 app/Console/Commands/CreateAdminCommand.php (+5 -22)
app/Console/Commands/DeleteUsers.php (+0 -53)
app/Console/Commands/DeleteUsersCommand.php (+53 -0)
📝 app/Console/Commands/RegenerateCommentContentCommand.php (+6 -21)
📝 app/Console/Commands/RegeneratePermissionsCommand.php (+5 -17)
📝 app/Console/Commands/RegenerateReferencesCommand.php (+5 -19)
📝 app/Console/Commands/RegenerateSearchCommand.php (+5 -20)
📝 app/Console/Commands/ResetMfaCommand.php (+8 -20)
📝 app/Console/Commands/UpdateUrlCommand.php (+2 -4)
📝 app/Console/Commands/UpgradeDatabaseEncodingCommand.php (+7 -13)
📝 app/Uploads/ImageService.php (+1 -0)
tests/Commands/CleanupImagesCommandTest.php (+49 -0)
📝 tests/Commands/CopyShelfPermissionsCommandTest.php (+1 -1)
tests/Commands/DeleteUsersCommandTest.php (+44 -0)

...and 2 more files

📄 Description

Cleanup and alignment of command classes and testing.
Closes #4225.

Todo

  • Added testing coverage to all tests
  • Align/update command class code
  • Align naming (Add Commmand to their name?)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4262 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 5/24/2023 **Status:** ✅ Merged **Merged:** 5/24/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `command_cleanup` --- ### 📝 Commits (3) - [`0704f1b`](https://github.com/BookStackApp/BookStack/commit/0704f1bd0dad9d21278a635c0d9c4eaacbb6a077) Covered untested commands with testing - [`c0620da`](https://github.com/BookStackApp/BookStack/commit/c0620da9f8cb934ffab862ba420be2951d0f86d1) Aligned command class code - [`431aeef`](https://github.com/BookStackApp/BookStack/commit/431aeefdda5a253459465dd15f9801b33897c2fe) Updated command classes to include "Command" in name ### 📊 Changes **22 files changed** (+267 additions, -292 deletions) <details> <summary>View changed files</summary> 📝 `app/Activity/Models/View.php` (+0 -8) 📝 `app/Console/Commands/CleanupImagesCommand.php` (+14 -25) 📝 `app/Console/Commands/ClearActivityCommand.php` (+4 -18) 📝 `app/Console/Commands/ClearRevisionsCommand.php` (+4 -18) 📝 `app/Console/Commands/ClearViewsCommand.php` (+4 -13) 📝 `app/Console/Commands/CopyShelfPermissionsCommand.php` (+6 -20) 📝 `app/Console/Commands/CreateAdminCommand.php` (+5 -22) ➖ `app/Console/Commands/DeleteUsers.php` (+0 -53) ➕ `app/Console/Commands/DeleteUsersCommand.php` (+53 -0) 📝 `app/Console/Commands/RegenerateCommentContentCommand.php` (+6 -21) 📝 `app/Console/Commands/RegeneratePermissionsCommand.php` (+5 -17) 📝 `app/Console/Commands/RegenerateReferencesCommand.php` (+5 -19) 📝 `app/Console/Commands/RegenerateSearchCommand.php` (+5 -20) 📝 `app/Console/Commands/ResetMfaCommand.php` (+8 -20) 📝 `app/Console/Commands/UpdateUrlCommand.php` (+2 -4) 📝 `app/Console/Commands/UpgradeDatabaseEncodingCommand.php` (+7 -13) 📝 `app/Uploads/ImageService.php` (+1 -0) ➕ `tests/Commands/CleanupImagesCommandTest.php` (+49 -0) 📝 `tests/Commands/CopyShelfPermissionsCommandTest.php` (+1 -1) ➕ `tests/Commands/DeleteUsersCommandTest.php` (+44 -0) _...and 2 more files_ </details> ### 📄 Description Cleanup and alignment of command classes and testing. Closes #4225. ### Todo - [x] Added testing coverage to all tests - [x] Align/update command class code - [x] Align naming (Add `Commmand` to their name?) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:29:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6332