Skip to content

Commit 063054e

Browse files
committed
Rename the installation command to 'sync' and implement the SyncCommand class to synchronize development scripts, GitHub workflows, and .editorconfig files.
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent b35ccc5 commit 063054e

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ composer dev-tools wiki
5353
composer dev-tools reports
5454

5555
# Installs and synchronizes dev-tools scripts, GitHub Actions workflows, .editorconfig, and ensures the repository wiki is present as a git submodule in .github/wiki
56-
composer dev-tools:install
56+
composer dev-tools:sync
5757
```
5858

5959
## 📄 License

docs/running/specialized-commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ Structurally consolidates distinct reporting commands, accurately aggregating te
7373
7474
composer dev-tools reports
7575
76-
8. Install (``install``)
76+
8. Sync (``dev-tools:sync``)
7777
------------------------
7878

7979
Adds or updates dev-tools scripts in your ``composer.json``, copies reusable GitHub Actions workflows, ensures the ``.editorconfig`` file is present and up to date, and guarantees the repository wiki is present as a git submodule in ``.github/wiki``. This command helps standardize your team's workflow and automation setup.
8080

8181
.. code-block:: bash
8282
83-
composer dev-tools:install
83+
composer dev-tools:sync
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Represents the command responsible for installing development scripts into `composer.json`.
3131
* This class MUST NOT be overridden and SHALL rely on the `ScriptsInstallerTrait`.
3232
*/
33-
final class InstallCommand extends AbstractCommand
33+
final class SyncCommand extends AbstractCommand
3434
{
3535
/**
3636
* Configures the current command.
@@ -43,7 +43,7 @@ final class InstallCommand extends AbstractCommand
4343
protected function configure(): void
4444
{
4545
$this
46-
->setName('dev-tools:install')
46+
->setName('dev-tools:sync')
4747
->setDescription(
4848
'Installs and synchronizes dev-tools scripts, GitHub Actions workflows, and .editorconfig in the root project.'
4949
)

src/Composer/Capability/DevToolsCommandProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
use FastForward\DevTools\Command\StandardsCommand;
2929
use FastForward\DevTools\Command\TestsCommand;
3030
use FastForward\DevTools\Command\WikiCommand;
31-
use FastForward\DevTools\Command\InstallCommand;
31+
use FastForward\DevTools\Command\SyncCommand;
3232

3333
/**
3434
* Provides a registry of custom dev-tools commands mapped for Composer integration.
@@ -55,7 +55,7 @@ public function getCommands()
5555
new StandardsCommand(),
5656
new ReportsCommand(),
5757
new WikiCommand(),
58-
new InstallCommand(),
58+
new SyncCommand(),
5959
];
6060
}
6161
}

src/Composer/Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function onPostInstall(Event $event): void
7979
{
8080
$event->getComposer()
8181
->getEventDispatcher()
82-
->dispatchScript('dev-tools:install', true);
82+
->dispatchScript('dev-tools:sync', true);
8383
}
8484

8585
/**
@@ -96,7 +96,7 @@ public function onPostUpdate(Event $event): void
9696
{
9797
$event->getComposer()
9898
->getEventDispatcher()
99-
->dispatchScript('dev-tools:install', true);
99+
->dispatchScript('dev-tools:sync', true);
100100
}
101101

102102
/**

tests/Composer/Capability/DevToolsCommandProviderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use FastForward\DevTools\Command\AbstractCommand;
2222
use FastForward\DevTools\Command\CodeStyleCommand;
2323
use FastForward\DevTools\Command\DocsCommand;
24-
use FastForward\DevTools\Command\InstallCommand;
24+
use FastForward\DevTools\Command\SyncCommand;
2525
use FastForward\DevTools\Command\PhpDocCommand;
2626
use FastForward\DevTools\Command\RefactorCommand;
2727
use FastForward\DevTools\Command\ReportsCommand;
@@ -43,7 +43,7 @@
4343
#[UsesClass(StandardsCommand::class)]
4444
#[UsesClass(ReportsCommand::class)]
4545
#[UsesClass(WikiCommand::class)]
46-
#[UsesClass(InstallCommand::class)]
46+
#[UsesClass(SyncCommand::class)]
4747
final class DevToolsCommandProviderTest extends TestCase
4848
{
4949
private DevToolsCommandProvider $commandProvider;
@@ -72,7 +72,7 @@ public function getCommandsWillReturnAllSupportedCommandsInExpectedOrder(): void
7272
new StandardsCommand(),
7373
new ReportsCommand(),
7474
new WikiCommand(),
75-
new InstallCommand(),
75+
new SyncCommand(),
7676
],
7777
$this->commandProvider->getCommands(),
7878
);

tests/Composer/PluginTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function onPostInstallWillInstallScripts(): void
138138

139139
// Mock EventDispatcher
140140
$eventDispatcher = $this->prophesize(EventDispatcher::class);
141-
$eventDispatcher->dispatchScript('dev-tools:install', true)
141+
$eventDispatcher->dispatchScript('dev-tools:sync', true)
142142
->willReturn(0);
143143
$this->composer->getEventDispatcher()
144144
->willReturn($eventDispatcher->reveal());
@@ -170,7 +170,7 @@ public function onPostUpdateWillInstallScripts(): void
170170

171171
// Mock EventDispatcher
172172
$eventDispatcher = $this->prophesize(EventDispatcher::class);
173-
$eventDispatcher->dispatchScript('dev-tools:install', true)
173+
$eventDispatcher->dispatchScript('dev-tools:sync', true)
174174
->willReturn(0);
175175
$this->composer->getEventDispatcher()
176176
->willReturn($eventDispatcher->reveal());

0 commit comments

Comments
 (0)