PHPackages                             delolmo/valinor-console - 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. delolmo/valinor-console

ActiveLibrary[CLI &amp; Console](/categories/cli)

delolmo/valinor-console
=======================

Use symfony/console as a Valinor source

2.3(2mo ago)1527PHPPHP &gt;=8.4CI passing

Since Jan 29Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/delolmo/valinor-console)[ Packagist](https://packagist.org/packages/delolmo/valinor-console)[ RSS](/packages/delolmo-valinor-console/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (39)Versions (8)Used By (0)

The following library allows using `InputInterface` objects of the [symfony/console](https://github.com/symfony/console) component as a source for the [cuyz/valinor](https://github.com/cuyz/valinor) library.

Installation
------------

[](#installation)

```
composer require delolmo/valinor-console
```

Example
-------

[](#example)

```
use App\DTO\CustomObject;
use CuyZ\Valinor\Mapper\Source\Source;
use CuyZ\Valinor\MapperBuilder;
use DelOlmo\Valinor\Mapping\Source\InputSource;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

final class CustomCommand extends Command
{
    public function execute(InputInterface $input, OutputInterface $output): int
    {
        // Create the Source using the new InputSource
        $source = Source::iterable(new InputSource($input));

        // Create the Mapper, using the desired configuration
        $mapper = new MapperBuilder())
            ->allowSuperfluousKeys()
            ->enableFlexibleCasting()
            ->mapper();

        // Map the source to whatever object makes sense
        $mapped = $mapper->map(CustomObject::class, $source);

        // Apply whatever business logic makes sense from here
        // ...
    }
}
```

Final notes
-----------

[](#final-notes)

- Versioning of `delolmo/valinor-console` will always match `cuyz/valinor` versions. Same goes for PHP versions.
- When creating the Mapper object, it should always be taken into account that, by default, Symfony adds several options to the InputInterface object (i.e., help or verbosity levels). If `allowSuperfluousKeys` is not used, the mapping process will throw an exception - unless you consider these parameters in the object you are trying to map (`App\DTO\CustomObject` in the above example). See [Allow superflous keys](https://valinor.cuyz.io/latest/mapping/type-strictness/#allowing-superfluous-keys) for more information.
- Although options and arguments cannot share the same name within the same Symfony command, it should be noted that, from an InputSource standpoint, arguments always take precedence over options. That is, if there is an argument and an option sharing the same name, InputSource will only use the argument's value for mapping purposes.
- Considering that Symfony command applications convert most of the fields to either strings or arrays, it is interesting to note that `enableFlexibleCasting` should also be configured in the Mapper. See [Enabling flexible casting](https://valinor.cuyz.io/latest/mapping/type-strictness/#enabling-flexible-casting) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~191 days

Recently: every ~205 days

Total

7

Last Release

60d ago

Major Versions

1.7.2 → 2.02025-07-28

PHP version history (4 changes)1.2PHP ~8.0.0 || ~8.1.0 || ~8.2.0

1.7PHP ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

2.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

2.3PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6806724b59a16500dcebc673a2c9dbe0df7d1716a3329e3471bd700f3e14bb43?d=identicon)[delolmo](/maintainers/delolmo)

---

Top Contributors

[![delolmo](https://avatars.githubusercontent.com/u/659868?v=4)](https://github.com/delolmo "delolmo (18 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/delolmo-valinor-console/health.svg)

```
[![Health](https://phpackages.com/badges/delolmo-valinor-console/health.svg)](https://phpackages.com/packages/delolmo-valinor-console)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[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)

PHPackages © 2026

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