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(5mo ago)1933PHPPHP &gt;=8.4CI passing

Since Jan 29Pushed 5mo 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 1w 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

45

—

FairBetter than 91% of packages

Maintenance73

Regular maintenance activity

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

152d 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://avatars.githubusercontent.com/u/659868?v=4)[Antonio del Olmo](/maintainers/delolmo)[@delolmo](https://github.com/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.9k556.2M21.5k](/packages/laravel-framework)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

2414.4k](/packages/perplorm-perpl)[civicrm/civicrm-core

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

762297.9k53](/packages/civicrm-civicrm-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k199.6M3.4k](/packages/composer-composer)

PHPackages © 2026

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