refactor: rename namespace to deployer - #110
Conversation
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughThis pull request renames the project's top-level PHP namespace from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧬 Code graph analysis (1)app/Traits/ServersTrait.php (7)
🔇 Additional comments (3)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
composer.json (1)
2-3: Composer package rename and PSR-4 root look correct
"name": "loadinglucian/deployer"and"Deployer\\": "app"align with the new namespaces used in app/*. This will be a breaking change for users depending on the oldPHPDeployer\\namespace or package name, so it’s worth treating the next release as a major and documenting the migration path.Also applies to: 38-38
app/Traits/ServersTrait.php (2)
5-25: Add missingSiteRepositoryimport for accurate docblocksThe docblock advertises
@property SiteRepository $sites, but there’s nouse Deployer\Repositories\SiteRepository;in this file, so tools will resolve it asDeployer\Traits\SiteRepository.Consider adding the import so the documented type matches the actual repository class:
namespace Deployer\Traits; use Deployer\DTOs\ServerDTO; use Deployer\DTOs\SiteDTO; use Deployer\Enums\Distribution; use Deployer\Repositories\ServerRepository; +use Deployer\Repositories\SiteRepository; use Deployer\Services\IOService; use Deployer\Services\SSHService;
95-116: Consider aligning user-facing messages with new project nameThe messages:
"DeployerPHP only supports Debian and Ubuntu.""DeployerPHP requires root or passwordless sudo permissions:"still reference “DeployerPHP” while the namespace/CLI have been renamed to
Deployer. If the product name has changed as well, consider updating these strings to avoid confusion; if not, no change is required.app/SymfonyApp.php (1)
117-118: Remove leftover commented code.These commented lines appear to be remnants from the previous banner implementation and serve no purpose.
- // <fg=cyan>▒</> - // ━━━━━━━━━━━━━━━ - /**
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (55)
README.md(1 hunks)app/Console/HelloCommand.php(1 hunks)app/Console/Key/KeyAddDigitalOceanCommand.php(1 hunks)app/Console/Key/KeyDeleteDigitalOceanCommand.php(1 hunks)app/Console/Key/KeyListDigitalOceanCommand.php(1 hunks)app/Console/ScaffoldHooksCommand.php(1 hunks)app/Console/Server/ServerAddCommand.php(1 hunks)app/Console/Server/ServerDeleteCommand.php(1 hunks)app/Console/Server/ServerInfoCommand.php(1 hunks)app/Console/Server/ServerInstallCommand.php(1 hunks)app/Console/Server/ServerListCommand.php(1 hunks)app/Console/Server/ServerLogsCommand.php(1 hunks)app/Console/Server/ServerProvisionDigitalOceanCommand.php(1 hunks)app/Console/Server/ServerRunCommand.php(1 hunks)app/Console/Site/SiteAddCommand.php(1 hunks)app/Console/Site/SiteDeleteCommand.php(1 hunks)app/Console/Site/SiteDeployCommand.php(1 hunks)app/Console/Site/SiteHttpsCommand.php(1 hunks)app/Console/Site/SiteListCommand.php(1 hunks)app/Console/Site/SiteSharedPullCommand.php(1 hunks)app/Console/Site/SiteSharedPushCommand.php(1 hunks)app/Container.php(1 hunks)app/Contracts/BaseCommand.php(3 hunks)app/DTOs/ServerDTO.php(1 hunks)app/DTOs/SiteDTO.php(1 hunks)app/Enums/Distribution.php(1 hunks)app/Enums/DistributionFamily.php(1 hunks)app/Exceptions/SSHTimeoutException.php(1 hunks)app/Repositories/ServerRepository.php(1 hunks)app/Repositories/SiteRepository.php(1 hunks)app/Services/DigitalOcean/BaseDigitalOceanService.php(1 hunks)app/Services/DigitalOcean/DigitalOceanAccountService.php(1 hunks)app/Services/DigitalOcean/DigitalOceanDropletService.php(1 hunks)app/Services/DigitalOcean/DigitalOceanKeyService.php(1 hunks)app/Services/DigitalOceanService.php(1 hunks)app/Services/EnvService.php(1 hunks)app/Services/FilesystemService.php(1 hunks)app/Services/GitService.php(1 hunks)app/Services/HttpService.php(1 hunks)app/Services/IOService.php(1 hunks)app/Services/InventoryService.php(1 hunks)app/Services/ProcessService.php(1 hunks)app/Services/SSHService.php(1 hunks)app/Services/VersionService.php(2 hunks)app/SymfonyApp.php(3 hunks)app/Traits/DigitalOceanTrait.php(1 hunks)app/Traits/KeysTrait.php(1 hunks)app/Traits/PlaybooksTrait.php(1 hunks)app/Traits/ServersTrait.php(1 hunks)app/Traits/SiteSharedPathsTrait.php(1 hunks)app/Traits/SitesTrait.php(1 hunks)bin/deployer(1 hunks)composer.json(2 hunks)tests/Integration/ArchitectureTest.php(3 hunks)tests/TestCase.php(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (26)
app/Console/Server/ServerProvisionDigitalOceanCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)
app/Traits/SitesTrait.php (2)
app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)app/DTOs/SiteDTO.php (1)
SiteDTO(7-24)
app/Console/Server/ServerRunCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Repositories/SiteRepository.php (2)
app/DTOs/SiteDTO.php (1)
SiteDTO(7-24)app/Services/InventoryService.php (1)
InventoryService(33-264)
app/Console/Site/SiteSharedPushCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)
tests/Integration/ArchitectureTest.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Site/SiteDeleteCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Repositories/ServerRepository.php (2)
app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)app/Services/InventoryService.php (1)
InventoryService(33-264)
app/Services/DigitalOcean/DigitalOceanKeyService.php (1)
app/Services/FilesystemService.php (1)
FilesystemService(28-179)
app/Console/Site/SiteListCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Key/KeyAddDigitalOceanCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Key/KeyListDigitalOceanCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Server/ServerAddCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)
app/Services/SSHService.php (2)
app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)app/Exceptions/SSHTimeoutException.php (1)
SSHTimeoutException(10-19)
app/Traits/ServersTrait.php (5)
app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)app/DTOs/SiteDTO.php (1)
SiteDTO(7-24)app/Repositories/ServerRepository.php (1)
ServerRepository(15-195)app/Services/IOService.php (1)
IOService(30-489)app/Services/SSHService.php (1)
SSHService(37-333)
app/Console/Server/ServerInstallCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)
app/Console/Site/SiteDeployCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/SiteDTO.php (1)
SiteDTO(7-24)
app/Console/ScaffoldHooksCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Services/DigitalOceanService.php (3)
app/Services/DigitalOcean/DigitalOceanAccountService.php (1)
DigitalOceanAccountService(17-186)app/Services/DigitalOcean/DigitalOceanDropletService.php (1)
DigitalOceanDropletService(14-186)app/Services/DigitalOcean/DigitalOceanKeyService.php (1)
DigitalOceanKeyService(14-75)
app/Traits/SiteSharedPathsTrait.php (1)
app/DTOs/SiteDTO.php (1)
SiteDTO(7-24)
app/Console/Site/SiteHttpsCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Server/ServerListCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Server/ServerDeleteCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/Console/Server/ServerLogsCommand.php (2)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)app/DTOs/ServerDTO.php (1)
ServerDTO(7-40)
app/Console/Server/ServerInfoCommand.php (1)
app/Contracts/BaseCommand.php (1)
BaseCommand(30-355)
app/SymfonyApp.php (1)
app/Services/VersionService.php (1)
VersionService(12-39)
🔇 Additional comments (55)
app/Services/FilesystemService.php (1)
5-5: Namespace rename is consistent with the new structure
Deployer\Servicesmatches the directory and the PR-wide namespace refactor; no functional impact here.app/Services/HttpService.php (1)
5-5: HTTP service namespace updated correctlyNamespace switched to
Deployer\Servicesin line with the rest of the refactor; no code behavior changes.app/Container.php (1)
5-5: Root Container moved underDeployernamespaceTop-level namespace
Deployerfits the project-wide rename and container role; no other changes required here.app/Services/IOService.php (1)
5-5: IOService namespace aligned with services
Deployer\Servicescorrectly reflects the service layer namespace and matches related trait imports.app/DTOs/SiteDTO.php (1)
5-5: SiteDTO now underDeployer\DTOsNamespace
Deployer\DTOsis consistent with the DTO folder and the rest of the refactor.app/Enums/Distribution.php (1)
5-5: Distribution enum namespace updated appropriatelyPlacing
DistributioninDeployer\Enumsis consistent with enum usage and the parallelDistributionFamilyenum.app/Services/GitService.php (1)
5-5: GitService correctly moved toDeployer\ServicesNamespace matches its collaborating services (ProcessService, FilesystemService) and the services directory layout.
app/Services/ProcessService.php (1)
5-5: ProcessService namespace matches service layer refactor
Deployer\Servicesis consistent with FilesystemService and other services; type-hints remain valid.app/Enums/DistributionFamily.php (1)
5-5: Namespace rename inDistributionFamilyis consistent and non-breaking internallyNamespace
Deployer\Enumsmatches the file path and PSR-4"Deployer\\": "app"; enum behavior is unchanged.app/Services/DigitalOcean/BaseDigitalOceanService.php (1)
5-5: DigitalOcean base service namespace updated correctlyNamespace now aligns with
Deployer\Services\DigitalOceanand PSR-4 mapping; API client handling is unchanged.README.md (1)
2-9: README branding and badge target align with new package identityProject title, tests badge URL, and tagline now consistently use
Deployer/loadinglucian/deployer; no technical issues here.app/Services/InventoryService.php (1)
5-5: InventoryService namespace realigned with PSR-4 mappingMoving to
Deployer\Serviceskeeps type hints valid and matches"Deployer\\": "app"; inventory behavior is unchanged.app/Services/VersionService.php (1)
5-5: VersionService default package name correctly updatedNamespace now
Deployer\Services, and the default$packageName = 'loadinglucian/deployer'matches composer.json, keeping version resolution consistent after the rename.Also applies to: 19-21
app/DTOs/ServerDTO.php (1)
5-5: ServerDTO namespace now matches directory and autoload config
Deployer\DTOsis consistent with the file path and PSR-4 setup; DTO semantics remain unchanged.app/Traits/KeysTrait.php (1)
5-7: KeysTrait namespace and FilesystemService import updated coherentlyTrait now lives under
Deployer\Traitsand importsDeployer\Services\FilesystemService, keeping the$this->fscontract intact with the new namespace scheme.tests/TestCase.php (1)
5-12: Test namespace rename looks correct
namespace Deployer\Tests;aligns this base test class with the new root namespace; no behavioral changes introduced.app/Console/Server/ServerInfoCommand.php (1)
5-10: Console command namespace/import refactor is consistentNamespace and imports now target
Deployer\Console\ServerandDeployer\*symbols; the command’s behavior remains unchanged.app/Traits/SiteSharedPathsTrait.php (1)
5-8: Trait namespace and DTO import update look good
SiteSharedPathsTraitnow lives underDeployer\Traitsand correctly importsDeployer\DTOs\SiteDTO; path helper behavior is unchanged.app/Exceptions/SSHTimeoutException.php (1)
5-18: Exception namespace migration is safe
SSHTimeoutExceptionnow lives underDeployer\Exceptions; constructor and behavior remain identical, so dependent code just needs updated imports.app/Console/Server/ServerAddCommand.php (1)
5-11: ServerAddCommand namespace/import updates look correctThe command is now under
Deployer\Console\Serverand importsDeployer\Contracts\BaseCommandplus the relevant traits/DTOs; functionality ofexecute()and helpers is preserved.app/Console/Server/ServerProvisionDigitalOceanCommand.php (1)
5-11: DigitalOcean provision command refactor maintains behaviorNamespace and imports now reference
Deployer\Console\ServerandDeployer\*symbols; droplet provisioning, rollback, and inventory registration logic are unchanged.app/Services/EnvService.php (1)
5-25: EnvService namespace move is isolated
EnvServicenow resides inDeployer\Serviceswith the same constructor and methods; env loading and lookup behavior are unaffected.app/Console/Server/ServerDeleteCommand.php (1)
5-9: Namespace and imports correctly migrated toDeployer\The namespace and related
usestatements now consistently referenceDeployer\ContractsandDeployer\Traits, matching the rest of the file’s usage without altering behavior.bin/deployer (1)
6-7: Entry-point imports aligned with new root namespaceThe CLI bootstrap now imports
Deployer\ContainerandDeployer\SymfonyApp, which matches the renamed application namespace and should keep runtime wiring intact.app/Services/DigitalOcean/DigitalOceanKeyService.php (1)
5-8: DigitalOceanKeyService namespace/import update is consistentMoving the class under
Deployer\Services\DigitalOceanand importingDeployer\Services\FilesystemServicematches the rest of the DigitalOcean service suite with no behavioral changes.app/Services/DigitalOceanService.php (1)
5-9: Facade service now correctly targetsDeployer\Services\DigitalOcean\*The service’s namespace and its injected collaborators are updated to the
Deployer\tree, keeping constructor typing and API wiring coherent with the refactor.app/Services/DigitalOcean/DigitalOceanDropletService.php (1)
5-5: Droplet service namespace migrated without functional impactThe class now lives under
Deployer\Services\DigitalOcean; all internal usage remains the same, so only the exposed FQCN changes.app/Console/ScaffoldHooksCommand.php (1)
5-8: Console command correctly moved underDeployer\ConsoleThe namespace and
BaseCommandimport now referenceDeployer\*, aligning this command with the rest of the console layer without altering its logic.app/Traits/DigitalOceanTrait.php (1)
5-9: Trait imports aligned with new services namespaceThe trait now lives under
Deployer\Traitsand imports the correspondingDeployer\Services\*types, keeping both the runtime expectations and docblocks in sync with the namespace rename.app/Traits/SitesTrait.php (1)
5-13: SitesTrait now references DTOs, repositories, and services underDeployer\The namespace and all related
usestatements are updated toDeployer\DTOs,Deployer\Repositories, andDeployer\Services, matching the trait’s type hints and docblocks without changing its behavior.app/Console/HelloCommand.php (1)
5-7: Namespace refactor looks correct.The namespace declaration and import statement are properly updated from
PHPDeployertoDeployer, maintaining consistency with the PSR-4 autoloading structure.app/Console/Key/KeyListDigitalOceanCommand.php (1)
5-8: Namespace and imports correctly updated.The namespace and both trait/contract imports are properly migrated to the
Deployernamespace, consistent with the codebase-wide refactoring.app/Console/Key/KeyDeleteDigitalOceanCommand.php (1)
5-9: Namespace and imports correctly updated.All internal namespace references (
BaseCommand,DigitalOceanTrait,KeysTrait) are properly migrated to theDeployernamespace.app/Services/DigitalOcean/DigitalOceanAccountService.php (1)
5-7: Namespace and import correctly updated.The namespace declaration and
Distributionenum import are properly migrated to theDeployernamespace. External library imports (DigitalOceanV2) remain correctly unchanged.app/Console/Server/ServerListCommand.php (1)
5-9: Namespace and imports correctly updated.All internal references (
BaseCommand,ServersTrait,SitesTrait) are properly migrated to theDeployernamespace.app/Services/SSHService.php (1)
5-8: Namespace and imports correctly updated.The namespace declaration and internal imports (
ServerDTO,SSHTimeoutException) are properly migrated to theDeployernamespace. Externalphpseclib3imports remain correctly unchanged.app/Console/Server/ServerRunCommand.php (1)
5-8: Namespace and imports correctly updated.The namespace declaration and internal imports (
BaseCommand,ServersTrait) are properly migrated to theDeployernamespace.app/Console/Server/ServerInstallCommand.php (1)
5-11: Namespace and imports correctly updated.All internal references (
BaseCommand,ServerDTO,KeysTrait,PlaybooksTrait,ServersTrait) are properly migrated to theDeployernamespace, consistent with the codebase-wide refactoring.tests/Integration/ArchitectureTest.php (1)
5-5: LGTM! Namespace refactoring applied correctly.The import and test expectations have been updated consistently to reflect the new
Deployernamespace.Also applies to: 14-14, 28-28
app/Repositories/SiteRepository.php (1)
5-8: LGTM! Namespace and imports updated correctly.The namespace declaration and use statements have been consistently updated to the
Deployernamespace.app/Console/Site/SiteSharedPullCommand.php (1)
5-12: LGTM! Namespace and imports updated correctly.All namespace and import declarations have been consistently updated from
PHPDeployertoDeployer.app/Repositories/ServerRepository.php (1)
5-8: LGTM! Namespace and imports updated correctly.The namespace declaration and use statements have been consistently updated to the
Deployernamespace.app/Console/Key/KeyAddDigitalOceanCommand.php (1)
5-9: LGTM! Namespace and imports updated correctly.All namespace and import declarations have been consistently updated from
PHPDeployertoDeployer.app/Console/Site/SiteListCommand.php (1)
5-8: LGTM! Namespace and imports updated correctly.The namespace declaration and use statements have been consistently updated to the
Deployernamespace.app/Console/Site/SiteDeleteCommand.php (1)
5-10: LGTM! Namespace and imports updated correctly.All namespace and import declarations have been consistently updated from
PHPDeployertoDeployer.app/Console/Server/ServerLogsCommand.php (1)
5-10: LGTM! Namespace and imports updated correctly.All namespace and import declarations have been consistently updated from
PHPDeployertoDeployer. Verification confirms no remainingPHPDeployerreferences exist anywhere in the codebase—neither in namespace declarations, use statements, string literals, nor documentation. The composer.json autoload configuration correctly mapsDeployer\\to theappdirectory. The refactoring across all files is clean and complete.app/SymfonyApp.php (3)
5-27: Namespace and import updates look correct.The namespace declaration and all import statements have been consistently updated from
PHPDeployertoDeployer, aligning with the refactor objective.
48-48: Application name simplification is appropriate.The name change from "Deployer PHP" to "Deployer" is consistent with the namespace rename and provides cleaner branding.
110-114: Banner update looks good.The simplified banner with colored output and explicit version line is a clean improvement over the previous format.
app/Traits/PlaybooksTrait.php (1)
5-12: Namespace and import updates are consistent.The namespace and all internal imports have been correctly updated to use the new
Deployernamespace.app/Console/Site/SiteAddCommand.php (1)
5-11: Namespace and import updates are correct.The namespace declaration and all trait/DTO imports have been properly migrated to the
Deployernamespace.app/Console/Site/SiteHttpsCommand.php (1)
5-10: Namespace and import updates are consistent.The namespace and trait imports have been correctly updated to use the new
Deployernamespace.app/Console/Site/SiteSharedPushCommand.php (1)
5-12: Namespace and import updates are correct.The namespace declaration and all imports (BaseCommand, ServerDTO, and traits) have been properly migrated to the
Deployernamespace.app/Contracts/BaseCommand.php (1)
5-18: Namespace and import updates are consistent.The namespace declaration and all 12 use statements are correctly updated from
PHPDeployertoDeployer. The imported types match the constructor parameter types throughout the class.app/Console/Site/SiteDeployCommand.php (1)
5-11: Namespace refactoring is correct and complete.No stale
PHPDeployerreferences remain in the codebase. The namespace declaration and all use statements are consistently updated toDeployer, and the PSR-4 autoload mapping in composer.json ("Deployer\\" => "app") properly supports this structure.
- Remove unused decorative comment lines in SymfonyApp - Update error messages to use 'Deployer' instead of 'DeployerPHP'
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.