PruneCommand
API reference › Scaffold › Console › Command › PruneCommand
Lists the files that no allowed provider ships anymore and, with --force, removes them from the lock and deletes
the ones that hold only provider content.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
configure() protected | Declares the --force, --delete-modified and --exit-code options. | PruneCommand |
execute() protected final | Validates the input, resolves the project root and runs AbstractScaffoldCommand::handle(). | AbstractScaffoldCommand |
handle() protected | Previews or prunes the orphaned entries. | PruneCommand |
validate() protected | Returns whether the input is valid, writing the error to the error output when it is not. | AbstractScaffoldCommand |
Method details
Section titled “Method details”configure()
Section titled “configure() ”protected function configure(): voidDeclares the --force, --delete-modified and --exit-code options.
handle()
Section titled “handle() ”protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): intPreviews or prunes the orphaned entries.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Symfony\ | Input with the --force, --delete-modified and --exit-code options. |
$out | PHPForge\ | Output sink that receives the orphan report and the error messages. |
$projectRoot | string | Absolute path of the project root. |
Returns
int: Exit code of PruneService::run().