Closed GCth closed 1 year ago
Marking many classes as final caused the phpunit to be unable to mock them - which makes some of our tests to fail.
final
With 1.x bundle version, it was possible to mock UploadHandler
PHPUnit\Framework\MockObject\ClassIsFinalException: Class "Vich\UploaderBundle\Handler\UploadHandler" is declared "final" and cannot be doubled
$uh = $this->createMock(UploadHandler::class);
It doesn't matter what mappings I use.
You can use https://packagist.org/packages/dg/bypass-finals
BC Break Report
Summary
Marking many classes as
final
caused the phpunit to be unable to mock them - which makes some of our tests to fail.Previous behavior
With 1.x bundle version, it was possible to mock UploadHandler
Current behavior
How to reproduce
It doesn't matter what mappings I use.