-
-
Notifications
You must be signed in to change notification settings - Fork 616
PHP Config - Add Profile filters #1556
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
Conversation
3f7b9c3 to
8d174d6
Compare
|
@acoulton @carlos-granados |
| { | ||
| public function name(): string; | ||
|
|
||
| public function value(): mixed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the interface value returns a mixed but the other current filters return a string.
I'm not aware if some other filters can have other value types. So, I've specified mixed on the interface but tell me if I am wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the types of filters is limited and there is no way to add new filters, so I would say this can be a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
carlos-granados
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Behat\Config\Gherkin\Filter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filters can also be applied on the suite level, so perhaps it would be better to remove the Gherkin part of the namespace? I know that the files that implement the filtering are in this Gherkin namespace but I don't think that forces us to use the same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| { | ||
| public function name(): string; | ||
|
|
||
| public function value(): mixed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the types of filters is limited and there is no way to add new filters, so I would say this can be a string
| @@ -0,0 +1,26 @@ | |||
| <?php | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed. If you want to create one of the existing filters just use the corresponding class. And any new filters that you add will not be handled, Behat will throw an exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless perhaps all previous filters extend this SimpleFilter with most of the functionality delegated to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I forgot to remove it. I think we can start simple without it at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just removed it.
carlos-granados
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @loic425
acoulton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @loic425
Referenced issue #1539