PHP code example of phil / console-bundle
1. Go to this page and download the library: Download phil/console-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phil / console-bundle example snippets
// config/bundles.php
Phil\ConsoleBundle\PhilConsoleBundle::class => ['all' => true],
use Phil\ConsoleBundle\Domain\Attribute\ConfirmEnvironment;
use Phil\ConsoleBundle\Domain\Attribute\ForbidEnvironment;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand('app:database:reset')]
#[ForbidEnvironment('prod', 'staging')]
final class ResetDatabase
{
public function __invoke(): int
}
#[AsCommand('app:customers:anonymize')]
final class AnonymizeCustomers
{
#[ConfirmEnvironment('prod')]
public function __invoke(): int
}