Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via composer

consolidation/annotated-command 5.0.0-beta1

Initialize Symfony Console commands from annotated command class methods.
Package summary
Share
0
issues
1
license
17
MIT
Package created
12 Apr 2016
Version published
28 Feb 2023
Maintainers
1
Total deps
17
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
17 Packages, Including:
consolidation/annotated-command@5.0.0-beta1
consolidation/output-formatters@4.5.0
dflydev/dot-access-data@v3.0.2
psr/container@2.0.2
psr/event-dispatcher@1.0.0
psr/log@3.0.0
symfony/console@v6.4.6
symfony/deprecation-contracts@v3.4.0
symfony/event-dispatcher@v6.4.3
symfony/event-dispatcher-contracts@v3.4.2
symfony/finder@v6.4.0
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/service-contracts@v3.4.2
symfony/string@v7.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of consolidation/annotated-command 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
consolidation/output-formatters4.5.091.97 kBMIT
prod
psr/log3.0.06.77 kBMIT
prod dev
symfony/consolev6.4.6182.96 kBMIT
prod
symfony/event-dispatcherv6.4.3-MIT
prod dev
symfony/finderv6.4.029.28 kBMIT
prod

Visualizations

Frequently Asked Questions

What does consolidation/annotated-command do?

The Consolidation Annotated Command is a powerful package that simplifies the creation of Symfony Console commands. It uses annotations or PHP 8 attributes to define the properties of your command such as its arguments, options, and so forth. This package is currently being used in notable projects such as Robo, Drush, and Terminus.

How do you use consolidation/annotated-command?

To use the consolidation/annotated-command, you first have to pull the package's latest version into your project using composer. Add the following line to your composer.json file:

"require": {
    "consolidation/annotated-command": "^4"
}

Then run composer update to download and integrate the library into your project. Once done, you can start creating annotated command classes.

Here is a code example of how you can use the package:

class MyCommandClass
{
    /**
     * This is the my:echo command
     *
     * This command will concatenate two parameters. If the --flip flag
     * is provided, then the result is the concatenation of two and one.
     *
     * @command my:echo
     * @param string $one The first parameter.
     * @param string $two The other parameter.
     * @param bool $flip The "flip" option
     * @option flip Whether or not the second parameter should come first in the result.
     * @aliases c
     * @usage bet alpha --flip
     *   Concatenate "alpha" and "bet".
     */
    public function myEcho($one, $two, $flip = false)
    {
        if ($flip) {
            return "{$two}{$one}";
        }
        return "{$one}{$two}";
    }
}

This example code shows how consolidation/annotated-command does its magic. By just simply defining and decorating your command method with relevant annotations, you can specify the command, its arguments, options, aliases, and even usage examples.

Where are the consolidation/annotated-command docs?

The official documentation for the consolidation/annotated-command library can be found on its GitHub repository at the following URL: https://github.com/consolidation/annotated-command. The documentation provides a comprehensive guide on the API usage, a rundown of the hooks available, and how you can handle standard input and output for your commands. It also contains example usages that'll help you understand how to effectively use the library.