Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Console Laravel Package

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.

View on GitHub
Deep Wiki
Context7
0.6.11

Features

  • Bump min Symfony7 supported version to 7.2 (#248)
  • Allow thecodingmachine/safe 3.0 (#250)
  • Allow psr/log 1.x and 2.x (#251)
0.6.10

Fixes

  • Fix missing symfony/deprecation-contracts dependency (#227)
0.6.9

Features

  • Bump minimum supported Symfony version to 6.4 (#208)
  • Add support for Symfony 7 (#215)
0.6.8

Fixes

  • Add missing psr/log dependency (#205)
0.6.7

Fixes

  • Revert "fix: Remove the deprecation layer (#187)" (#204)
0.6.6

Features

  • Add support for using native Symfony commands (#201)
0.6.5

Features

  • Support hidden commands (#202)

Fixes

  • Allow to use the ReversedSymfonyCommand to be registered (#199)
0.6.4

Features

  • Add support for testing separate outputs (#190)

Fixes

  • Fix BC (#193)

Misc

  • Drop support for psr/log v1 (#188)
0.6.3

Fixes

  • Bump minimum required version of Symfony Flex (#185)

Misc

  • Drop support for PHP 8.1 (#184)
  • Drop support for Symfony5 (#186)
0.6.2

Fixes

  • Restore the previous IO::getArgument() and ::getOption() (#183)
0.6.1

Fixes

  • Add an deprecated alias for IO to avoid a hard BC break (#181)
0.6.0

Features

  • Add StyledOutput interface (#122)
  • Make the IO object as all around utility class (#129)
  • Add a symfony command factory extension point (#171)
  • Introduce a command loader factory and improve laziness (#174)
  • Add support for backed enum input types (#179)

Misc

  • Remove Symfony4 support (#120)
  • Bump the min PHP version required to PHP 8.1 (#148)
  • Move InputAssert to the Internal namespace (#160)
  • Drop support for Symfony 6.1 & 6.2 (#176)
0.5.5

Bugfixes

  • Fix invalid package path (#109)
0.5.4

Bugfixes

  • Add keywords to composer.json (#103)
  • Fix usage in a Symfony application (#107)
0.5.3

Bugfixes

  • Lower min dependencies range required (#98)
0.5.2

Features

  • Provide a factory to get an error IO (#81)
  • Add unofficial Symfony 4 support (#94)

Misc

  • Various doc fixes and improvements (#82, 83, #84)
  • Fix CS (#86, #93)
  • Adjust Bamarni configuration (#87, #90)
  • Add sponsoring link
  • Exclude the bin directory in the artifacts (#91)
  • Remove unused constant (#92)
  • Minor Makefile improvements (#97)
0.5.1

Features

  • Remove deprecated API (#77)
  • Bump dependencies (#80)

Misc

  • Normalize CI config (#74)
  • Do no export unnecessary directories (#78)
  • Speed up infection by running threads (#79)
0.5.0

Features

  • Make DisplayNormalizer::removeTrailingSpaces() allow multiple extra normalizers (#63)
  • Add CommandTester (#58)
  • Add support for Symfony AppTester & CommandTester (#64)
  • Add argument/option name to the error message (#66)
  • Allow to coerce a type with a custom error message (#67)
  • Add IO::createDefault() (#69)
  • Add IO::hasOption() (#70)
  • Make ApplicationRunner::runApplication() IO optional (#72)
0.4.0

Features

  • Add support for Composer 2.2 (#20)
  • Add support for Symfony 6 (#21)
  • Add AppTester which is a variant of the Symfony ApplicationTester
  • 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 IO from the Fidry\Console namespace to Fidry\Console\Input. The old class is still available for BC. (#37) [Soft BC break]
  • Rename 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.

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](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:

  • Replace imports of Fidry\Console\IO to Fidry\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*()
0.3.0

Features

  • Bump to Symfony 5.3 (#8)
  • Add support for Symfony 5.3 lazy commands (#9, #15)
  • Add PHP 8.1 support (#10)

Bugfixes

  • Return lists instead of arrays (#14)

BC Breaks

  • Add LazyCommand::getDescription() static method
  • Renamed IO::getXArrayArgument() methods into IO::getXListArgument()

Misc

Various doc improvements (#5, #6, 25d29e4, 81bdefd, #11, #13, #16).

0.2.0

Features

  • Add support for Command awareness (#3)

Misc

  • Migrate to PHP-CS-Fixer 3.0 (#1)
0.1.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor