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

setVerbosityThreshold() breaks code completion #857

Open
danepowell opened this issue Apr 25, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@danepowell
Copy link
Contributor

commented Apr 25, 2019

Steps to reproduce

Create a command like:

$this->taskExecStack()
  ->stopOnFail()
  ->dir('whatever')
  ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
  ->run();

Expected behavior

Code completion (specifically in PhpStorm, but probably any IDE) should work on each of the methods on the command stack. For instance, as I start typing "ru", it should suggest "run()", and if I inspect it should take me to the method declaration.

Actual behavior

Code completion fails on the method immediately following setVerbosityThreshold(). In this case it's run(), but if you reordered it to have dir() after setVerbosityThreshold() then dir() would fail code completion but run() would work.

Something about the return value for setVerbosityThreshold() causes PhpStorm to fail to find the definition of the subsequent method.

System Configuration

Ubuntu 19.04, PHP 7.2

My guess is that this has something to do with the (lack of?) doc comments on setVerbosityThreshold. Adding this to VerbosityThresholdInterface::setVerbosityThreshold() fixes it but I'm pretty sure it's a hack. I'm not familiar enough with Robo internals to make it better but I'm happy to take a crack if you point me in the right direction.

/**
 * @return CommandStack
 */
@danepowell

This comment has been minimized.

Copy link
Contributor Author

commented Apr 25, 2019

If I can get enough info to fix this, I'll take care of #703 at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.