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

Error showing in commands #128

Closed
pushpendra07 opened this issue Jul 19, 2019 · 4 comments
Closed

Error showing in commands #128

pushpendra07 opened this issue Jul 19, 2019 · 4 comments

Comments

@pushpendra07
Copy link

Describe the bug
Showing error in Magento CLI commands
To Reproduce
Steps to reproduce the behavior:

  1. Installed plugin by composer and run Magento2 upgrade command

Expected behavior
Commands should run without error
Screenshots
AwesomeScreenshot-Screenshot-from-2019-07-19-16-32-04-2019-07-19-16-07-76

Environment (please complete the following information):

  • OS: Centos
  • Browser: chrome
  • Cron Job Manager Version [1.8.0]
  • Magento Version [2.2.4]
  • PHP Version [7.1.0]
@Ethan3600
Copy link
Owner

@pushpendra07 Thanks for submitting this issue! I can't reproduce this on the latest version of the Cron Job Manager. Can you try upgrading to the latest version (v1.9.0).

@simonrl
Copy link

simonrl commented Jul 23, 2019

I can reproduce this on PHP 7.1, Magento 2.2.6, Cronjobmanager 1.9.0

I had a short look at the code, and it actually seems ok to me... so no idea where this error comes from.

To reproduce:

  1. composer u --no-dev
  2. php bin/magento setup:upgrade
    -> does not work, runs into mentioned error
  3. rm -r generated/*
  4. php bin/magento setup:upgrade
    -> still the same error.

All running in developer mode.

@pushpendra07
Copy link
Author

@Ethan3600, It's showing same error for latest version

@Ethan3600
Copy link
Owner

Ok, I was on Magento version 2.3.1. That's why I didn't see it. Sorry for the mistake.

Good News: I was able to reproduce on Magento version 2.2.6

Bad News: This seems to be a bug in some versions of Magento 2.2.x: magento/magento2#6106

There were more issues opened up for this, and I can't tell which release the fix was merged into.

Anyway, the problem was this:

The CJM's code had a method signature with a return type-hint like this:
public function execute(int $scheduleId): bool

But, the generated code was spitting out something like this:
public function execute(int $scheduleId)

Which causes php to throw an error because the signature doesn't match.

I can confirm that this is fixed in the latest 2.2.x release (at the time of writing, it's v2.2.9).

I'm going to close this due to it being a Magento bug.

Feel free to comment to discuss further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants