A command to clean directories based on directoryName => directoryPath mapping.
- php: ^8.2
- symfony/console: ^5.4.46|^6.4.14|^7.2
Through Composer as chubbyphp/chubbyphp-clean-directories.
composer require chubbyphp/chubbyphp-clean-directories "^1.4"
#!/usr/bin/env php
<?php
declare(strict_types=1);
namespace App;
use Chubbyphp\CleanDirectories\Command\CleanDirectoriesCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputOption;
require __DIR__.'/../vendor/autoload.php';
$input = new ArgvInput();
$console = new Application();
$console->addCommand(new CleanDirectoriesCommand(['directoryName' => 'directoryPath']));
$console->run($input);
console clean-directories directoryName
2024 Dominik Zogg