Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[console] Add 'suggestedValues' Parameter #348

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

jjjb03
Copy link
Contributor

@jjjb03 jjjb03 commented Jun 18, 2024

I was facing the issue described in #232.

In my case the given Argument Names are not in the Console Handler, after adding them, plugin runs fine.

    protected function configure(): void {
        $this
            ->addArgument(
                'report_id',
                InputArgument::REQUIRED,
                'The Report id to invoke.'
            )
            ->addArgument(
                'query',
                InputArgument::OPTIONAL,
                'The url encoded values for the report.'
            )
            ->addArgument(
                'format',
                InputArgument::OPTIONAL,
                'The format to use',
                default: FileFormatEnum::EXCEL->name,
                suggestedValues: [
                    FileFormatEnum::PDF->name,
                    FileFormatEnum::EXCEL->name,
                    FileFormatEnum::CSV->name,
                ],
            )
            ->addArgument(
                'country',
                InputArgument::OPTIONAL,
                'The country id',
                default: 'DEFAULT',
                suggestedValues: self::COUNTRIES,
            );
    }

@jjjb03 jjjb03 changed the title fix: Exception in ConsoleHandler - Missing Parameters Add Missing 'suggestedValues' Parameter Jun 18, 2024
@jjjb03 jjjb03 changed the title Add Missing 'suggestedValues' Parameter Add 'suggestedValues' Parameter Jun 18, 2024
Copy link
Member

@seferov seferov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjjb03 thank you!

@seferov seferov changed the title Add 'suggestedValues' Parameter [console] Add 'suggestedValues' Parameter Jun 19, 2024
@seferov seferov merged commit 0f128f9 into psalm:5.x Jun 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants