Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Mandatory Value Parameters can not be parsed #27

Open
@zf2timo

Description

@zf2timo

I tried to create a route where a group of Value Parameters is mandatory like this example:

<?php
return [
// ....
        'console-export-prepared-products' => [
            'options' => [
                'route' => 'export prepared products (--from-file=|--model=)',
                'defaults' => [
                    'controller' => \Controller\PreparedProductsController::class,
                    'action' => 'export',
                    'verbose' => false,
                ]
            ]
        ],
        //...
  ];

But this results into a InvalidArgumentException:

Fatal error: Uncaught exception 'Zend\Console\Exception\InvalidArgumentException' with message 'Cannot understand Console route at "(--from-file=|--model=)"' in /var/www/mw/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 946
Zend\Console\Exception\InvalidArgumentException: Cannot understand Console route at "(--from-file=|--model=|--recent)" in /var/www/mw/vendor/zendframework/zendframework/library/Zend/Console/RouteMatcher/DefaultRouteMatcher.php on line 432

I expected that the route is only matched if either the parameter --from-file or --model is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions