I'm working on a vscode extension to have an alternative to PHPStorm to work with behat.
On the first release it marks the non implemented steps. Now I'm working on go to declaration feature, witch is working, but I didn't like the way I did.
Today I use the behat -di to get all available steps with classes and methods. Then I use PHP CLI to get the file path and lines of those methods using reflection. If the behat -di also outputs the filename and line numbers, would be easier.
I did an experiment and that's the result:

It's a great tool. Just sent it to my QA.
about getting the source for a class and method, can't you use the features of the IDE ? It probably already have a way to navigate to a given method if it supports PHP.
Thanks, @spolischook :)
@stof I didn't find any way to do that. It doesn't have a good support for PHP out of the box, is necessary another extension to get the symbols recognized and I can't communicate with it.
I also thought about trying to create an extension for behat to help me with this, if it's not possible to add this to the definitions list.
I made a small change to get this feature working on this commit.
Can I make a PR?
Thanks!
I suggest adding the file path only when running the command in verbose mode, so that we don't bother users running this command with this extra file path while you need it only for VSCode. You would just have to turn on the verbose mode when running the command in your extension.
And yes, please open a PR. It is easier to discuss the implementation that way.
What @stof said :)
Ops! Sorry for the delay.
Didn't know that behat had verbose mode lol
I'll take a look and make the PR. Thanks @stof and @everzet
Most helpful comment
I made a small change to get this feature working on this commit.
Can I make a PR?
Thanks!