refactor: site and server CRUD improvements - #60
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughCentralizes formatted detail output in IOService and updates helpers/commands: SiteAdd now selects a single server, SiteDelete adds a typed-domain confirmation with a --force flag, SiteList uses ensureSitesAvailable and prints separators, and server/site detail renderers now call IOService::displayDeets; minor formatting added to ServerDelete output. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SiteAddCmd as SiteAddCommand
participant ServerHelpers as ServerHelpersTrait
participant IO as IOService
User->>SiteAddCmd: run site:add
SiteAddCmd->>ServerHelpers: selectServer()
ServerHelpers-->>SiteAddCmd: ServerDTO
SiteAddCmd->>IO: prompt for source & inputs
SiteAddCmd->>SiteAddCmd: build SiteDTO (servers: [server.name])
SiteAddCmd->>IO: displayDeets(site details)
IO-->>User: show aligned key/value details
sequenceDiagram
participant User
participant SiteDelCmd as SiteDeleteCommand
participant SiteHelpers as SiteHelpersTrait
participant IO as IOService
User->>SiteDelCmd: run site:delete
SiteDelCmd->>SiteHelpers: selectSite()
SiteHelpers-->>SiteDelCmd: SiteDTO or int(code)
alt returned int (error/early)
SiteDelCmd-->>User: exit with code
else SiteDTO
alt --force present
SiteDelCmd->>IO: delete and displayDeets(result)
IO-->>User: show result
else no --force
SiteDelCmd->>IO: prompt "Are you absolutely sure? Type domain:"
User-->>IO: typed domain
alt typed == domain
SiteDelCmd->>IO: delete and displayDeets(result)
IO-->>User: show result
else mismatch
IO-->>User: warning; SiteDelCmd-->>User: exit (no deletion)
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
app/Console/Site/SiteDeleteCommand.php (2)
53-55: ImportSiteDTOinstead of using the inline FQCNPer the PHP guidelines for this repo, classes should be pulled in via
usestatements (only core exceptions stay fully qualified). Please adduse Bigpixelrocket\DeployerPHP\DTOs\SiteDTO;at the top and useSiteDTOhere.As per coding guidelines
65-80: Route--forcethroughgetOptionOrPromptRetrieved command rules ask us to pair every option with
getOptionOrPromptso interactive sessions can supply values when the flag isn’t given up front. Please wrap theforceflag in that helper (with an appropriate confirm prompt) instead of calling$input->getOption()directly.Based on learnings
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
app/Console/Server/ServerDeleteCommand.php(1 hunks)app/Console/Site/SiteAddCommand.php(7 hunks)app/Console/Site/SiteDeleteCommand.php(3 hunks)app/Console/Site/SiteListCommand.php(2 hunks)app/Services/IOService.php(1 hunks)app/Traits/ServerHelpersTrait.php(3 hunks)app/Traits/SiteHelpersTrait.php(3 hunks)app/Traits/SiteValidationTrait.php(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.php
📄 CodeRabbit inference engine (.cursor/rules/00-main.mdc)
**/*.php: Eliminate single-use methods: inline if a method is called only once
Cache computed values: initialize expensive calculations in the constructor
Avoid method call overhead: prefer direct property access when appropriate
**/*.php: Adhere to PSR-12, enable strict_types, and leverage PHP 8.x features (union types, match, attributes, readonly)
Use explicit return types, including generic-like annotations where applicable (e.g., Collection<int, User>)
Prefer Symfony components (e.g., Filesystem, Process) over native PHP functions for testability
Always import classes via use statements; only use root FQDNs for core exceptions (e.g., \InvalidArgumentException, \RuntimeException). Do not use inline FQDNs for non-root namespaces
Create objects via $container->build(ClassName::class) everywhere except DTOs, value objects, and pure data structures
Use minimalist DocBlocks documenting description, parameters, and return types for classes and functions
Follow the specified comment structure with section headers/subheaders and spacing; remove obsolete comments with removed code
Files:
app/Services/IOService.phpapp/Console/Server/ServerDeleteCommand.phpapp/Console/Site/SiteListCommand.phpapp/Console/Site/SiteDeleteCommand.phpapp/Traits/SiteHelpersTrait.phpapp/Traits/SiteValidationTrait.phpapp/Traits/ServerHelpersTrait.phpapp/Console/Site/SiteAddCommand.php
**/*Service.php
📄 CodeRabbit inference engine (.cursor/rules/01-architecture.mdc)
**/*Service.php: Services must perform no console I/O and should accept/return plain PHP types
Services are dependency-injected via constructor and encapsulate business logic, external APIs, and file operations
Stateful services should use lazy loading and explicit initialization methods (e.g., load(), initialize()) and document requirements
Files:
app/Services/IOService.php
**/*{Command,Service}.php
📄 CodeRabbit inference engine (.cursor/rules/01-architecture.mdc)
All dependencies should be expressed in constructor signatures; avoid circular dependencies
Files:
app/Services/IOService.phpapp/Console/Server/ServerDeleteCommand.phpapp/Console/Site/SiteListCommand.phpapp/Console/Site/SiteDeleteCommand.phpapp/Console/Site/SiteAddCommand.php
**/*Command.php
📄 CodeRabbit inference engine (.cursor/rules/01-architecture.mdc)
**/*Command.php: Commands handle user interaction (I/O), orchestration, styling, error formatting, and prompts using SymfonyStyle
Commands must not contain business logic; delegate to Services
Commands must not invoke other commands (no proxy commands)
Files:
app/Console/Server/ServerDeleteCommand.phpapp/Console/Site/SiteListCommand.phpapp/Console/Site/SiteDeleteCommand.phpapp/Console/Site/SiteAddCommand.php
**/*ValidationTrait.php
📄 CodeRabbit inference engine (.cursor/rules/03-commands.mdc)
**/*ValidationTrait.php: Validation methods for prompts/options must accept mixed and return ?string error or null (do not throw exceptions).
Naming: use validateInput() for prompt/option validators returning ?string; use validate() to throw exceptions for heavy I/O validations.
Files:
app/Traits/SiteValidationTrait.php
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to src/Command/**/*Command.php : Option naming: --server/--site select existing resources; --name defines a new resource property; follow the provided table for common options.
📚 Learning: 2025-09-22T11:10:21.459Z
Learnt from: CR
Repo: deployer-plus/deployer-php PR: 0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-09-22T11:10:21.459Z
Learning: Applies to app/**/Command/**/*.php : Use SymfonyStyle consistently for all user-facing console output
Applied to files:
app/Console/Server/ServerDeleteCommand.php
📚 Learning: 2025-10-24T20:01:06.209Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to src/Command/**/*Command.php : Option naming: --server/--site select existing resources; --name defines a new resource property; follow the provided table for common options.
Applied to files:
app/Console/Site/SiteListCommand.phpapp/Console/Site/SiteDeleteCommand.phpapp/Traits/SiteHelpersTrait.phpapp/Traits/ServerHelpersTrait.phpapp/Console/Site/SiteAddCommand.php
📚 Learning: 2025-10-24T20:01:06.209Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to src/Command/**/*Command.php : Use only OPTIONS (no positional arguments) to enable getOptionOrPrompt across the board.
Applied to files:
app/Console/Site/SiteDeleteCommand.php
📚 Learning: 2025-10-24T20:01:06.209Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to src/Command/**/*Command.php : Pair all options with getOptionOrPrompt to support both non-interactive and interactive usage.
Applied to files:
app/Console/Site/SiteDeleteCommand.php
📚 Learning: 2025-10-24T20:01:06.210Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.210Z
Learning: Applies to src/Command/**/*Command.php : Boolean flags must use VALUE_NONE; data inputs must use VALUE_REQUIRED; only --yes has a short flag (-y).
Applied to files:
app/Console/Site/SiteDeleteCommand.php
📚 Learning: 2025-10-24T20:01:06.209Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to src/Command/**/*Command.php : Use getValidatedOptionOrPrompt to validate both CLI options and interactive prompts; return Command::FAILURE when validation returns null.
Applied to files:
app/Traits/SiteHelpersTrait.php
📚 Learning: 2025-09-22T11:10:21.459Z
Learnt from: CR
Repo: deployer-plus/deployer-php PR: 0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-09-22T11:10:21.459Z
Learning: Applies to app/**/Command/**/*.php : Commands must not duplicate orchestration logic—extract to shared Services
Applied to files:
app/Traits/ServerHelpersTrait.php
📚 Learning: 2025-09-22T11:10:21.459Z
Learnt from: CR
Repo: deployer-plus/deployer-php PR: 0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-09-22T11:10:21.459Z
Learning: Applies to app/**/Command/**/*.php : Commands receive Services via constructor injection
Applied to files:
app/Traits/ServerHelpersTrait.php
📚 Learning: 2025-10-24T20:01:06.209Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.209Z
Learning: Applies to **/BaseCommand.php : BaseCommand handles shared initialization/configuration/orchestration only; do not implement individual I/O operations here.
Applied to files:
app/Console/Site/SiteAddCommand.php
🧬 Code graph analysis (8)
app/Services/IOService.php (1)
app/Traits/KeyHelpersTrait.php (1)
displayKeyInfo(28-36)
app/Console/Server/ServerDeleteCommand.php (1)
app/Services/IOService.php (1)
writeln(463-469)
app/Console/Site/SiteListCommand.php (2)
app/Services/IOService.php (2)
h1(506-512)writeln(463-469)app/Traits/SiteHelpersTrait.php (2)
ensureSitesAvailable(29-47)displaySiteDeets(95-118)
app/Console/Site/SiteDeleteCommand.php (3)
app/Traits/SiteHelpersTrait.php (2)
selectSite(54-90)displaySiteDeets(95-118)app/DTOs/SiteDTO.php (1)
SiteDTO(7-32)app/Services/IOService.php (6)
hr(517-523)writeln(463-469)promptText(200-218)error(498-501)getOptionOrPrompt(84-132)promptConfirm(260-276)
app/Traits/SiteHelpersTrait.php (4)
app/Repositories/ServerRepository.php (1)
all(104-114)app/Repositories/SiteRepository.php (1)
all(93-103)app/DTOs/SiteDTO.php (2)
SiteDTO(7-32)isLocal(28-31)app/Services/IOService.php (2)
displayDeets(543-566)writeln(463-469)
app/Traits/SiteValidationTrait.php (3)
app/Repositories/ServerRepository.php (1)
ServerRepository(15-195)app/Repositories/SiteRepository.php (1)
SiteRepository(15-208)app/Services/ProcessService.php (1)
ProcessService(12-49)
app/Traits/ServerHelpersTrait.php (2)
app/DTOs/SiteDTO.php (1)
SiteDTO(7-32)app/Services/IOService.php (1)
displayDeets(543-566)
app/Console/Site/SiteAddCommand.php (3)
app/Traits/ServerHelpersTrait.php (1)
selectServer(54-90)app/Services/IOService.php (3)
writeln(463-469)getOptionOrPrompt(84-132)promptSelect(304-322)app/DTOs/SiteDTO.php (1)
isLocal(28-31)
🪛 GitHub Actions: Rector
app/Services/IOService.php
[error] 547-547: Rector dry-run would have changed the file: The diff shows a change to the max call for alignment using FunctionFirstClassCallableRector. Command 'vendor/bin/rector --dry-run' reported changes would be made (1 file would be changed) and exited with code 2.
🔇 Additional comments (3)
app/Console/Server/ServerDeleteCommand.php (1)
65-65: Approve formatting improvement for better output separation.Adding the blank line after server details improves readability by providing visual separation between the display section and subsequent messages. This aligns with the PR's consolidation of output formatting and follows the established spacing pattern in the command.
This change is consistent with the learnings about using SymfonyStyle consistently for user-facing console output, and fits the broader PR objective of "consolidating output formatting into IOService."
app/Traits/SiteValidationTrait.php (2)
7-10: LGTM: Clear dependency documentation through imports.The explicit imports improve IDE support and static analysis by making the trait's dependencies on ServerRepository, SiteRepository, and ProcessService discoverable. These align with the actual property access throughout the trait methods.
14-18: LGTM: Proper trait dependency documentation.The @Property annotations follow PHP best practices for documenting trait dependencies and enable IDE autocomplete and static analysis. The property names ($proc, $servers, $sites) are consistent with their usage throughout the trait methods, making the contract between trait and consuming classes explicit.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
app/Console/Site/SiteAddCommand.php (1)
40-40: Add legacy option aliases for backward compatibility.The option renames (--type→--source, --servers→--server) will break existing scripts and documentation. Add deprecated aliases to maintain compatibility while using new internal names.
Also applies to: 43-43
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/Console/Site/SiteAddCommand.php(7 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.php
📄 CodeRabbit inference engine (.cursor/rules/00-main.mdc)
**/*.php: Eliminate single-use methods: inline if a method is called only once
Cache computed values: initialize expensive calculations in the constructor
Avoid method call overhead: prefer direct property access when appropriate
**/*.php: Adhere to PSR-12, enable strict_types, and leverage PHP 8.x features (union types, match, attributes, readonly)
Use explicit return types, including generic-like annotations where applicable (e.g., Collection<int, User>)
Prefer Symfony components (e.g., Filesystem, Process) over native PHP functions for testability
Always import classes via use statements; only use root FQDNs for core exceptions (e.g., \InvalidArgumentException, \RuntimeException). Do not use inline FQDNs for non-root namespaces
Create objects via $container->build(ClassName::class) everywhere except DTOs, value objects, and pure data structures
Use minimalist DocBlocks documenting description, parameters, and return types for classes and functions
Follow the specified comment structure with section headers/subheaders and spacing; remove obsolete comments with removed code
Files:
app/Console/Site/SiteAddCommand.php
**/*Command.php
📄 CodeRabbit inference engine (.cursor/rules/01-architecture.mdc)
**/*Command.php: Commands handle user interaction (I/O), orchestration, styling, error formatting, and prompts using SymfonyStyle
Commands must not contain business logic; delegate to Services
Commands must not invoke other commands (no proxy commands)
Files:
app/Console/Site/SiteAddCommand.php
**/*{Command,Service}.php
📄 CodeRabbit inference engine (.cursor/rules/01-architecture.mdc)
All dependencies should be expressed in constructor signatures; avoid circular dependencies
Files:
app/Console/Site/SiteAddCommand.php
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.242Z
Learning: Applies to src/Command/**/*Command.php : Option naming: --server/--site select existing resources; --name defines a new resource property; follow the provided table for common options.
📚 Learning: 2025-10-24T20:01:06.242Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.242Z
Learning: Applies to src/Command/**/*Command.php : Option naming: --server/--site select existing resources; --name defines a new resource property; follow the provided table for common options.
Applied to files:
app/Console/Site/SiteAddCommand.php
📚 Learning: 2025-10-24T20:01:06.242Z
Learnt from: CR
Repo: bigpixelrocket/deployer-php PR: 0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-24T20:01:06.242Z
Learning: Applies to **/BaseCommand.php : BaseCommand handles shared initialization/configuration/orchestration only; do not implement individual I/O operations here.
Applied to files:
app/Console/Site/SiteAddCommand.php
🔇 Additional comments (3)
app/Console/Site/SiteAddCommand.php (3)
86-98: Clear naming improvement for site source selection.The rename from
siteTypetositeSourceimproves clarity, and the prompt label "Deploy from:" is more intuitive than the previous approach.
177-186: Command hint correctly reflects updated options.The hint options are properly updated to use the new option names (
source,server) and correctly pass the single server name, maintaining consistency with the command's new interface.
9-9: ServerHelpersTrait respects dependency injection—no action needed.The trait accesses
$this->serversand$this->io, both of which are properly injected inBaseCommand's constructor asprotected readonlyproperties (lines 47 and 51).SiteAddCommandextendsBaseCommandand inherits these dependencies, so all required dependencies are explicitly expressed in the constructor signature via the parent class. No hidden dependencies or circular references exist.
| $server = $this->selectServer(); | ||
|
|
||
| if (is_int($server)) { | ||
| return $server; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Verify selectServer() return values for proper error handling.
The current code correctly propagates the integer status from selectServer(). However, ensure that selectServer() returns Command::FAILURE (not Command::SUCCESS) when no servers are available, so the command doesn't exit successfully without adding a site.
🏁 Script executed:
#!/bin/bash
# Check selectServer() implementation to verify return values
ast-grep --pattern $'function selectServer($$$) {
$$$
}'Length of output: 0
🏁 Script executed:
#!/bin/bash
# Find ServerHelpersTrait file
fd -t f "ServerHelpersTrait" --type fLength of output: 33
🏁 Script executed:
#!/bin/bash
# Search for selectServer function definition
rg -n "function selectServer" --type php -A 20Length of output: 1437
🏁 Script executed:
#!/bin/bash
# Also search for selectServer calls to understand usage
rg -n "selectServer" --type php -B 2 -A 2Length of output: 1092
🏁 Script executed:
#!/bin/bash
# Find ensureServersAvailable() implementation
rg -n "function ensureServersAvailable" --type php -A 15Length of output: 1157
🏁 Script executed:
#!/bin/bash
# Look for any warnings or messages about "no servers" or "must add"
rg -n "must add\|no servers" --type php -i -B 2 -A 2Length of output: 0
Fix ensureServersAvailable() to return Command::FAILURE when no servers exist.
The verification confirms a critical issue: ensureServersAvailable() in app/Traits/ServerHelpersTrait.php:43 returns Command::SUCCESS when no servers are available. This causes the command to exit with status 0 (success) despite failing to add a site. The method should return Command::FAILURE instead. Update line 43 from return Command::SUCCESS; to return Command::FAILURE; and correct the docblock on line 52.
🤖 Prompt for AI Agents
In app/Traits/ServerHelpersTrait.php around line 43 (and docblock at line 52),
change the early return when no servers are available from Command::SUCCESS to
Command::FAILURE so the calling command exits with a failure status; also update
the docblock on line 52 to reflect that the method returns int
(Command::SUCCESS|Command::FAILURE) or clearly state it returns a Command exit
code instead of implying success.
| repo: $repo, | ||
| branch: $branch, | ||
| servers: $selectedServers | ||
| servers: [$server->name] |
There was a problem hiding this comment.
🧩 Analysis chain
Clarify single-server design decision.
The change from multi-server to single-server selection is significant. While this may simplify the UX, users who previously added a site to multiple servers in one command will now need multiple invocations.
Is this intentional? Will users be able to add the same site to multiple servers easily, or is this a breaking change that should be documented?
🌐 Web query:
Check if there's a follow-up command or feature planned for multi-server site management in deployer-php
💡 Result:
Do you mean the Deployer (deployer.org / deployerphp) project or the “Deployer for Git” WordPress plugin — or another "deployer-php" repo? If you tell me which repository or provide a link, I’ll search the project issues/roadmap and report any planned follow-up command/feature for multi‑server site management (with citations).
I need to search the repository more specifically. Let me explore the codebase to understand the design decision and look for any documentation or issues about multi-server support.
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for multi-server references and DTO definitions
rg -n "SiteDTO|servers" --type=php -A2 -B2 | head -50
Length of output: 3150
🏁 Script executed:
#!/bin/bash
# Check for any comments or TODOs about multi-server support
rg -n "TODO|FIXME|multi.*server|multi-server" --type=php | head -30Length of output: 0
🏁 Script executed:
#!/bin/bash
# Look for git history or comments explaining the change
git log -n 20 --oneline -- app/Console/Site/SiteAddCommand.php 2>/dev/null || echo "Git history not available"Length of output: 169
🏁 Script executed:
#!/bin/bash
# Search for issues or feature discussions in common locations
find . -type f \( -name "*.md" -o -name "CHANGELOG*" -o -name "TODO*" -o -name ".github" \) -exec grep -l "multi.*server\|SiteAdd" {} \; 2>/dev/null | head -10Length of output: 0
---
🏁 Script executed:
```shell
#!/bin/bash
# Find and inspect SiteDTO definition
fd "SiteDTO" --type=f | head -5
Length of output: 20
🏁 Script executed:
#!/bin/bash
# Get full SiteAddCommand.php to see complete context
cat app/Console/Site/SiteAddCommand.php | head -200Length of output: 5569
🏁 Script executed:
#!/bin/bash
# Search for other site commands to see if multi-server is handled elsewhere
fd "Site.*Command.php" --type=f | xargs ls -la 2>/dev/nullLength of output: 258
🏁 Script executed:
#!/bin/bash
# Look for Site management services that might handle multi-server
rg -n "class.*Service.*Site\|function.*addSite\|function.*createSite" --type=php -A3 | head -40Length of output: 0
---
🏁 Script executed:
```shell
#!/bin/bash
# Inspect SiteDTO structure
cat app/DTOs/SiteDTO.php
Length of output: 936
🏁 Script executed:
#!/bin/bash
# Find and inspect SiteRepository.create() method
rg -n "class SiteRepository\|function create\|public function create" --type=php -A15 app/Repositories/SiteRepository.php 2>/dev/null | head -60Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check SiteDeleteCommand to see if it handles multi-server deletes
cat app/Console/Site/SiteDeleteCommand.phpLength of output: 3215
🏁 Script executed:
#!/bin/bash
# Look at git diff for the refactor commit to understand what changed
git show 97b52bd --stat 2>/dev/null | head -30Length of output: 733
---
🏁 Script executed:
```shell
#!/bin/bash
# Get the actual diff of SiteAddCommand from the refactor to see what changed
git show 97b52bd -- app/Console/Site/SiteAddCommand.php 2>/dev/null | head -150
Length of output: 4894
🏁 Script executed:
#!/bin/bash
# Search for any edit/update site command or mechanism
fd "SiteUpdateCommand\|SiteEditCommand\|updateSite\|editSite" --type=fLength of output: 0
🏁 Script executed:
#!/bin/bash
# Search for any way to modify existing sites (add servers, etc.)
rg -n "class.*Site.*\|update.*site\|edit.*site\|add.*server.*site" --type=php -i | grep -v "test\|Test" | head -20Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check if there are any comments in code about multi-server or server list
rg -n "servers|multiple.*server" app/Console/Site/ --type=php -B2 -A2 | head -40Length of output: 302
Document the single-server limitation or provide a migration path.
The refactor intentionally changed --servers (plural, multi-select) to --server (singular), removing the ability to add a site to multiple servers in one command. While this simplifies the UX, it's a breaking change with no documented workaround.
Either document this limitation explicitly in help text or CHANGELOG, or add a site:update command to modify servers after creation.
Summary by CodeRabbit
New Features
--forceflag to skip domain-typing safety during site deletionImprovements
type→source,servers→serverand switched to single-server selectionRefactor