Closed ciaranmcnulty closed 3 years ago
I would vote for adding such API to consume the line only partially instead of the hack about #
@stof Yeah I will add something like consumeLineUntil($char)
or similar
@ciaranmcnulty I suggest confirming upstream whether comments are meant to be allowed at the end of any line. If the answer is yes, it might be a matter of changing consumeLine
instead.
It looks like they're only allowed at the end of tags lines, added in https://github.com/cucumber/cucumber/pull/880
TagFilter is quite happy to be constructed with, and filter by tags with whitespace so there's a chance there are people depending on this functionality.
trigger_error with a deprecation warning?
@ciaranmcnulty then a deprecation is indeed better (and probably also in TagFilter if the filter uses a tag with whitespace)
I think #220 is necessary to test the deprecations properly
@stof would appreciate feedback on how the deprecation is implemented
Hello ,
That trigger a deprecation notice when we use a filter likes "@tag1 && @tag2". Even if the tags haven't spaces.
When using that where ?
On suite configuration like here: https://github.com/Sylius/Sylius/blob/master/src/Sylius/Behat/Resources/config/suites/ui/account/address_book.yml
It's about src/Behat/Gherkin/Filter/TagFilter.php
on construct.
Maybe the trigger error can be moved into isTagsMatchCondition
.
I agree. The deprecation warning should allow for spaces around the operators.
However, I would not do that in isTagsMatchCondition
. We don't want to trigger the deprecation on each scenario
Closes #210 and #213
Not too happy with the implementation yet
For the tag whitespace we could optionally show a warning rather than an exception for backwards compatibility