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

Unknown option "employee" #255

Open
leup opened this issue Jul 6, 2022 · 4 comments · May be fixed by #256
Open

Unknown option "employee" #255

leup opened this issue Jul 6, 2022 · 4 comments · May be fixed by #256
Labels
bug Something isn't working

Comments

@leup
Copy link

leup commented Jul 6, 2022

PrestaShop version(s)

1.7.

Php version

7.2

Fop Console version

dev

Operating system

linux

command

No response

Describe the bug

Hello everyone,

I may have misused the cli command but I did not succeed to use the employee option as defined here:

$commandDefinition->addOption(new InputOption('employee', '-em', InputOption::VALUE_REQUIRED, 'Specify employee context (id).', null));

I tried -em, --em, --employee to no avail.

What I found was that the option seems to be configured too late in the process. The "option not found" was emitted before entering the initialize method.

So I had to move it to configure() as such:

    protected function configure()
    {
        $this->addOption('employee', null, InputOption::VALUE_REQUIRED, 'Specify employee context (id).', null);

        parent::configure();
    }

(I also removed the shortcut because at first I thought it was the issue)

Did I misused the option or is this a real bug ?

@leup leup added the bug Something isn't working label Jul 6, 2022
@leup leup linked a pull request Jul 6, 2022 that will close this issue
@leup
Copy link
Author

leup commented Jul 27, 2022

Anyone ? :)

@SebSept
Copy link
Contributor

SebSept commented Aug 1, 2022

@friends-of-presta/fop-console-contributors anyone ?

@tom-combet
Copy link
Contributor

Hi, I can check it next week, not before, sorry.

@tom-combet
Copy link
Contributor

tom-combet commented Sep 21, 2022

Very sorry for the late answer, I replied here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants