API Platform version(s) affected: 3.0.1
Description
I have been unable to get the GroupSequence validation to work in my code 3.0.7
How to reproduce
Using the API-Platform demo I modified MySequencedGroup.php such that it triggered the Default group for Book as 'first' and 'second' are not defined on Book.
public function __invoke()
{
// return new GroupSequence(['first', 'second']); // now, no matter which is first in the class declaration, it will be tested in this order.
return new GroupSequence(['Book']);
}
I invoked a POST for Book and the Default validation is not triggered
The documentation for services.yml is also incorrect
api/config/services.yaml
services:
App\Validator\MySequencedGroup: ~
public: true
I believe it should be
api/config/services.yaml
services:
App\Validator\MySequencedGroup:
public: true
API Platform version(s) affected: 3.0.1
Description
I have been unable to get the GroupSequence validation to work in my code 3.0.7
How to reproduce
Using the API-Platform demo I modified MySequencedGroup.php such that it triggered the Default group for Book as 'first' and 'second' are not defined on Book.
public function __invoke()
{
// return new GroupSequence(['first', 'second']); // now, no matter which is first in the class declaration, it will be tested in this order.
return new GroupSequence(['Book']);
}
I invoked a POST for Book and the Default validation is not triggered
The documentation for services.yml is also incorrect
api/config/services.yaml
services:
App\Validator\MySequencedGroup: ~
public: true
I believe it should be
api/config/services.yaml
services:
App\Validator\MySequencedGroup:
public: true