fix: do not use ValidationInterface
Description Fixes #6224
BaseModel uses the 3rd param of $this->validation->run($data, null, $this->DBGroup).
So it depends on Validation, not ValidationInterface.
Ref: https://github.com/codeigniter4/CodeIgniter4/pull/5909#issuecomment-1179518692
Checklist:
- [x] Securely signed commits
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [x] Conforms to style guide
Let's see where the big PR takes this conversation. I'm fine with this one following from that - I do think that this is pretty likely to break some projects and libraries since Model constructors are likely to be extended.
If we can change the ValidationInterface, we have an option to change it instead.
You know that's not a bad idea. If I had to guess I would say there are probably more developers extending Model::__construct() than making their own Validation driver (since the driver can be "extended" via rules already).
there are probably more developers extending Model::__construct() than making their own Validation driver
I agree. I guess so. It seems changing ValidationInterface makes less apps break.
I sent another PR #6253
#6253 was merged.