rectorphp / swiss-knife

Swiss knife in pocket of every upgrade architect!
https://getrector.com
MIT License
72 stars 8 forks source link

Finalized a class that was mocked by mockery #24

Closed RedsCoyote closed 2 months ago

RedsCoyote commented 2 months ago

If you use Mockery (https://github.com/mockery/mockery) library for mocking, command vendor/bin/swiss-knife finalize-classes [folder] --skip-mocked will finalize mocked classes

TomasVotruba commented 2 months ago

Mocked classes should not be unfinalized just for the tools' sake.

There is a better way: https://tomasvotruba.com/blog/2019/03/28/how-to-mock-final-classes-in-phpunit

RedsCoyote commented 2 months ago

A Swiss knife with a single blade for phpunuit mocks looks weird. Throwing away a popular testing framework like Mockery is your right. OK