Skip to content

Conversation

@carlos-granados
Copy link
Contributor

Yesterday I tried to use the new "editor url" functionality in my main project, only to find that it does not really work as expected 😞 . Since our project uses the Symfony console component, the same that Rector and PHPStan use, I had assumed that <href= links would be transformed by the console component in the same way as in those tools, so that this would be converted to the proper escape codes that actually show a link in the console. But our project uses a custom console formatter which is much simpler than the standard Symfony formatter and this conversion is not done. So our href links end up being printed verbatim to the console instead of being converted to proper links.

I feel a bit stupid about this because I would have sworn that I had actually tested this output in the console, but obviously I didn't. And the tests themselves should have told me that this was not OK, as the test output that we checked included these links being printed verbatim without being converted 😬

This PR adds this conversion from href links to escape characters to our console formatter. And this time I did properly check that this works as expected in the console

Copy link
Contributor

@acoulton acoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @carlos-granados, sorry that I didn't spot this at the time either

@carlos-granados carlos-granados merged commit 1269205 into Behat:master Sep 15, 2025
19 checks passed
@carlos-granados
Copy link
Contributor Author

@acoulton should we do a patch release with this fix?

@acoulton
Copy link
Contributor

Good plan - #1662

@carlos-granados carlos-granados deleted the fix-editor-url branch September 18, 2025 12:35
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.

2 participants