PHP Config - Add Profile filters#1556
Conversation
3f7b9c3 to
8d174d6
Compare
|
@acoulton @carlos-granados |
| { | ||
| public function name(): string; | ||
|
|
||
| public function value(): mixed; |
There was a problem hiding this comment.
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.
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
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Behat\Config\Gherkin\Filter; |
There was a problem hiding this comment.
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
| { | ||
| public function name(): string; | ||
|
|
||
| public function value(): mixed; |
There was a problem hiding this comment.
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.
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.
Unless perhaps all previous filters extend this SimpleFilter with most of the functionality delegated to it
There was a problem hiding this comment.
Yes, I forgot to remove it. I think we can start simple without it at all.
There was a problem hiding this comment.
I've just removed it.
carlos-granados
left a comment
There was a problem hiding this comment.
LGTM, thanks @loic425
Referenced issue #1539