Skip to content
PHP Ecosystem
Explore

ReapplyCommand

API reference › Scaffold › Console › Command › ReapplyCommand

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

Reapplies provider stubs to tracked files; --force also overwrites ejected, adopted, user-modified, preserve, append and prepend files.

MethodDescriptionDefined by
configure() protectedDeclares the optional file argument and the --force, --provider, --dry-run and --exit-code options.ReapplyCommand
execute() protected finalValidates the input, resolves the project root and runs AbstractScaffoldCommand::handle().AbstractScaffoldCommand
handle() protectedReapplies the matching tracked files.ReapplyCommand
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 optional file argument and the --force, --provider, --dry-run and --exit-code options.

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

Reapplies the matching tracked files.

Parameters

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

Returns

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