Repository navigation
0.4.0
Pre-release
Pre-release
Features
- Add support for Composer 2.2 (#20)
- Add support for Symfony 6 (#21)
- Add
AppTesterwhich is a variant of the SymfonyApplicationTester - Add various Psalm support improvements (#23, #28, #44)
- Switch to a more elaborate and type-safe system (#25, #27, #30, #33, #34, #35, #36, #41, #42, #45, #46, #47, #48, #49, #50). The old API is still available but deprecated [Soft BC Break]:
// 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();
}- Move
IOfrom theFidry\Consolenamespace toFidry\Console\Input. The old class is still available for BC. (#37) [Soft BC break] - Rename
ConsoleAssertintoInputAssert(#29) and enrichInputAssert[Soft BC Break] (the class was marked as@private)
Note: support for PHP7.4 and 8.0 is planned to be dropped for the next release.
Migration
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 or @internal, nothing should break.
Nonetheless deprecations have been introduced. The following guide is about taking care of those:
- Replace imports of
Fidry\Console\IOtoFidry\Console\Input\IO - Replace usages of
$io->get*Argument('arg-name')to$io->getArgument('arg-name')->as*() - Replace usages of
$io->get*Option('option-name')to$io->getOption('option-name')->as*()