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

Adding clickable editorUrl from codeception.yml #6261

Merged
merged 13 commits into from
Dec 21, 2021

Conversation

ThomasLandauer
Copy link
Member

@ThomasLandauer ThomasLandauer commented Oct 8, 2021

Closes #6259

  • I followed the syntax of https://phpstan.org/user-guide/output-format#opening-file-in-an-editor even though we wouldn't need the second % here. (This is due to some phpstan internals, the code ultimately reads \str_replace(['%file%', '%line%'], ...).
    But I'd say having an identical editorUrl syntax between Codeception and phpstan by far outweighs the "cost" of some unneeded % characters... ;-)

  • $line = 0; is a fallback in case the trace iteration doesn't work out. I'm guessing that putting 1 for the line is better than leaving it empty.

Closes Codeception#6259

I followed the syntax of https://phpstan.org/user-guide/output-format#opening-file-in-an-editor even though we would need the second `%` here. (This is due to some phpstan internals, the code ultimately reads `\str_replace(['%file%', '%line%'], ...`
But I'd say having an *identical* `editorUrl` syntax between Codeception and phpstan by far outweighs the "cost" of some unneeded `%` characters... ;-)
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Subscriber/Console.php Outdated Show resolved Hide resolved
src/Codeception/Step.php Show resolved Hide resolved
@Naktibalda Naktibalda merged commit 8d0c45e into Codeception:4.1 Dec 21, 2021
@Naktibalda
Copy link
Member

@ThomasLandauer ThomasLandauer deleted the patch-11 branch December 21, 2021 19:36
@ThomasLandauer
Copy link
Member Author

@Naktibalda Just noticed that all other config options are snake_case. I just copied editorUrl from PHPStan. Should we change it to editor_url before it gets released?

@Naktibalda
Copy link
Member

I released it yesterday, but nobody will notice if we rename it quickly, right?

@Naktibalda
Copy link
Member

I raised #6303

@Naktibalda
Copy link
Member

Renamed and released as 4.1.27

@ThomasLandauer
Copy link
Member Author

Could you document it

Sure :-) Codeception/codeception.github.com#582

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

Successfully merging this pull request may close these issues.

Add links to runner output that open the file directly in my IDE
3 participants