During our journey to upgrade our app to Symfony 7, we have to install the dev-master branch of both Auditor & its bundle, and encounter this issue with classes that we can't mock anymore.
If these classes were implementing an interface, we could create a mock of these, but currently this is unfortunately not an option.
Would it be an option to remove the final keyword to classes that was added in #168?
Or maybe add an interface that would be implemented by these classes?
Current behavior
Can't mock some classes like Reader or Query like this:
auditor
versionSummary
Hi, in #168 some classes were marked as
final
.In our PHPUnit test suite, we create mocks of some of these classes; in our case:
DH\Auditor\Provider\Doctrine\Persistence\Reader\Reader
DH\Auditor\Provider\Doctrine\Persistence\Reader\Query
During our journey to upgrade our app to Symfony 7, we have to install the
dev-master
branch of both Auditor & its bundle, and encounter this issue with classes that we can't mock anymore.If these classes were implementing an interface, we could create a mock of these, but currently this is unfortunately not an option.
Would it be an option to remove the
final
keyword to classes that was added in #168?Or maybe add an interface that would be implemented by these classes?
Current behavior
Can't mock some classes like
Reader
orQuery
like this:How to reproduce
Expected behavior
I'd expect the mock to actually be creatable