fidry/console
Lightweight, robust wrapper around symfony/console. Uses a single IO object (SymfonyStyle-like, with access to Input/Output) plus typed, validated args/options. Prefer explicit interfaces over inheritance; works with Symfony or standalone CLI apps.
psr/log dependency (#205)AppTester which is a variant of the Symfony ApplicationTester// Before
function (\Fidry\Console\IO $io): bool {
return $io->getBooleanArgument('my-arg');
}
// After
function (\Fidry\Console\Input\IO $io): bool {
return $io->getArgument('my-arg')->asBoolean();
}
IO from the Fidry\Console namespace to Fidry\Console\Input. The old class is still available for BC. (#37) [Soft BC break]ConsoleAssert into InputAssert (#29) and enrich InputAssert [Soft BC Break] (the class was marked as [@private](https://github.com/private))Note: support for PHP7.4 and 8.0 is planned to be dropped for the next release.
From 0.3.x to 0.4.x, there is no hard BC break. In other words, unless you were relying on classes marked as [@private](https://github.com/private) or [@internal](https://github.com/internal), nothing should break.
Nonetheless deprecations have been introduced. The following guide is about taking care of those:
Fidry\Console\IO to Fidry\Console\Input\IO$io->get*Argument('arg-name') to $io->getArgument('arg-name')->as*()$io->get*Option('option-name') to $io->getOption('option-name')->as*()LazyCommand::getDescription() static methodIO::getXArrayArgument() methods into IO::getXListArgument()Various doc improvements (#5, #6, 25d29e4, 81bdefd, #11, #13, #16).
How can I help you explore Laravel packages today?