-
-
Notifications
You must be signed in to change notification settings - Fork 0
GitIgnoreCommand
github-actions edited this page Apr 19, 2026
·
1 revision
Provides functionality to merge and synchronize .gitignore files.
This command merges the canonical .gitignore from dev-tools with the project's existing .gitignore, removing duplicates and sorting entries.
The command accepts two options: --source and --target to specify the paths to the canonical and project .gitignore files respectively.
- Full name:
\FastForward\DevTools\Console\Command\GitIgnoreCommand - Parent class:
BaseCommand - This class is marked as final and can't be subclassed
- This class is a Final class
| Constant | Visibility | Type | Value |
|---|---|---|---|
FILENAME |
public | string | '.gitignore' |
Creates a new GitIgnoreCommand instance.
public __construct(\FastForward\DevTools\GitIgnore\MergerInterface $merger, \FastForward\DevTools\GitIgnore\ReaderInterface $reader, \FastForward\DevTools\GitIgnore\WriterInterface|null $writer, \Symfony\Component\Config\FileLocatorInterface $fileLocator, \FastForward\DevTools\Resource\FileDiffer $fileDiffer): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$merger |
\FastForward\DevTools\GitIgnore\MergerInterface | the merger component |
$reader |
\FastForward\DevTools\GitIgnore\ReaderInterface | the reader component |
$writer |
\FastForward\DevTools\GitIgnore\WriterInterface|null | the writer component |
$fileLocator |
\Symfony\Component\Config\FileLocatorInterface | the file locator |
$fileDiffer |
\FastForward\DevTools\Resource\FileDiffer |
Configures the current command.
protected configure(): voidThis method MUST define the name, description, and help text for the command. It SHALL identify the tool as the mechanism for script synchronization.
Executes the gitignore merge process.
protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): intParameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\InputInterface | the input interface |
$output |
\Symfony\Component\Console\Output\OutputInterface | the output interface |
Return Value:
the status code