PHPackages                             wjzijderveld/console-option-resolver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wjzijderveld/console-option-resolver

Abandoned → [wjzijderveld/console-input-resolver](/?search=wjzijderveld%2Fconsole-input-resolver)Library[CLI &amp; Console](/categories/cli)

wjzijderveld/console-option-resolver
====================================

Library to ask questions for missing options and arguments

0.2.0(11y ago)8172MITPHP

Since Nov 30Pushed 11y ago2 watchersCompare

[ Source](https://github.com/wjzijderveld/console-input-resolver)[ Packagist](https://packagist.org/packages/wjzijderveld/console-option-resolver)[ RSS](/packages/wjzijderveld-console-option-resolver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Console options resolver
========================

[](#console-options-resolver)

[![Build Status](https://camo.githubusercontent.com/65e0c8955776151db1063b25c5e28cadfb24b8d4a2e806023184426d1ef5a781/68747470733a2f2f7472617669732d63692e6f72672f776a7a696a64657276656c642f636f6e736f6c652d696e7075742d7265736f6c7665722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wjzijderveld/console-input-resolver)

A simple library for [Symfony Console](https://github.com/symfony/Console).

It allows to ask the user for options if not provided, this way you can use a command both interactive as in a bash oneliner.

### Installation

[](#installation)

```
composer require wjzijderveld/console-input-resolver 1.*@dev
```

### Usage

[](#usage)

```
class GenerateCommand extends Command
{
    private $inputResolver;

    public function __construct(Resolver $inputResolver)
    {
        parent::__construct();

        $this->inputResolver = $inputResolver;
    }

    public function configure()
    {
        $this->setName('generate');

        $this
            ->addArgument('class', InputArgument::OPTIONAL, 'The name of the class to generate')
            ->addOption('namespace', null, InputOption::VALUE_REQUIRED, 'The namespace to generate the class in');
    }

    public function execut(InputInterface $input, OutputInterface $output)
    {
        // values will now contain values for namespace and class
        // for each option or argument that is not given when running this command
        // it will interactivily ask for a value
        $values = $this->inputResolver->resolveInputDefinition($this->getDefinition(), array('namespace', 'class'));

        var_dump($values);
    }
}
```

Example output:

```
$ ./console generate --namespace Acme
> The name of the class to generate: Foo
> array(2) {
  'namespace' =>
  string(4) "Acme"
  'class' =>
  string(3) "Foo"
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7574666ab99bc2faa687ea957c2d12e24f26017140a53eaf369095415679b98?d=identicon)[wjzijderveld](/maintainers/wjzijderveld)

---

Top Contributors

[![wjzijderveld](https://avatars.githubusercontent.com/u/450201?v=4)](https://github.com/wjzijderveld "wjzijderveld (11 commits)")

### Embed Badge

![Health badge](/badges/wjzijderveld-console-option-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/wjzijderveld-console-option-resolver/health.svg)](https://phpackages.com/packages/wjzijderveld-console-option-resolver)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
