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

Improve tag handling; update test #289

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Feb 23, 2025

This isn't a new feature, but rather a small improvement on tag handling.

Here's what changed:

  1. hasTag/hasTags code is always the same, so I moved it into a trait (that depends on abstract method getTags).
  2. I removed the somewhat redundant PHPDoc comments, in favour of the one provided by the interface
  3. ExampleTableNode now implements TaggedNodeInterface and the new trait - I couldn't see why it wouldn't have that in the first place
  4. I've updated a test to cover point 3.

It would have been nice to move getTags to the trait too, but at this PHP level we can't define abstract properties or property requirements, so I think this is the safest and cleanest approach at the moment.

@uuf6429 uuf6429 requested a review from stof February 24, 2025 18:53
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.

Thanks @uuf6429

Copy link
Contributor

@carlos-granados carlos-granados 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, thanks @uuf6429

@acoulton acoulton merged commit d899102 into Behat:master Feb 26, 2025
8 checks passed
@uuf6429 uuf6429 deleted the feature/improve-tags-handling branch February 26, 2025 19:56
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.

4 participants