Skip to content
PHP Ecosystem
Explore

SyncCommand

API reference › Scaffold › Console › Command › SyncCommand

final classPHPForge\Scaffold\Console\Command\SyncCommand
ExtendsAbstractScaffoldCommand » Symfony\Component\Console\Command\Command
Sourcesrc/Console/Command/SyncCommand.php

Applies the allowed and installed providers to the project outside Composer, as composer install would.

MethodDescriptionDefined by
configure() protectedDeclares the --dry-run, --exit-code and --force options.SyncCommand
execute() protected finalValidates the input, resolves the project root and runs AbstractScaffoldCommand::handle().AbstractScaffoldCommand
handle() protectedSynchronizes the project.SyncCommand
validate() protectedReturns whether the input is valid, writing the error to the error output when it is not.AbstractScaffoldCommand
protected function configure(): void

Declares the --dry-run, --exit-code and --force options.

protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): int

Synchronizes the project.

Parameters

ParameterTypeDescription
$inputSymfony\Component\Console\Input\InputInterfaceInput with the --dry-run, --exit-code and --force options.
$outPHPForge\Scaffold\Console\SymfonyOutputWriterOutput sink that receives the sync report and the error messages.
$projectRootstringAbsolute path of the project root.

Returns

int: Exit code of SyncService::run().