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

[質問] reflect コマンド実行時, 怒られの回避はありますか #48

Closed
somen440 opened this issue Jan 16, 2020 · 2 comments

Comments

@somen440
Copy link
Contributor

somen440 commented Jan 16, 2020

reflect 実行時, なんか怒られました。( reflect コマンド自体は成功しているようです。)
回避策はありますか??

/var/www # vendor/bin/conv reflect -d migrations/schema/user/ -- user:password@mysql user_db

Save generated queries to 'migrations/'
 1/1 [============================] 100% < 1 sec/< 1 sec 4.0 MiB
Finish

Fatal error: Uncaught TypeError: Return value of "Howyi\Conv\Command\ReflectCommand::execute()" must be of the type int, NULL returned. in /var/www/vendor/symfony/console/Command/Command.php:258
Stack trace:
#0 /var/www/vendor/symfony/console/Application.php(924): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/vendor/symfony/console/Application.php(265): Symfony\Component\Console\Application->doRunCommand(Object(Howyi\Conv\Command\ReflectCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/vendor/symfony/console/Application.php(141): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/vendor/howyi/conv/bin/conv(17): Symfony\Component\Console\Application->run()
#4 {main}
  thrown in /var/www/vendor/symfony/console/Command/Command.php on line 258

Command を見ると, run の時, code がなかったら int チェックしてるみたいですが ......
https://github.com/symfony/console/blob/master/Command/Command.php#L252

@howyi
Copy link
Owner

howyi commented Jan 16, 2020

symfony/console がv5以降からexecuteにintの返り値を強制するようになったみたいです 😣
symfony/symfony#33808
ドキュメントも同様に修正されていたため、各executeに return 0; を追加して対応します。
#49

@howyi
Copy link
Owner

howyi commented Jan 16, 2020

修正を行い、v2.1.1としてリリースしました、報告ありがとうございます! 🎉
https://github.com/howyi/conv/releases/tag/v2.1.1

@howyi howyi closed this as completed Jan 16, 2020
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

No branches or pull requests

2 participants