Releases: Lendable/phpunit-extensions
Releases · Lendable/phpunit-extensions
v0.5.0
v0.4.0
v0.3.2
0.3.1
What's Changed
- Relax
phpunit/phpunitrequirement to^11.1by Ben Challis (@ben-challis) in #77
What's Fixed
- Don't add
DisableReturnValueGenerationForTestDoublesto abstract classes via Rector by Ben Challis (@ben-challis) in #78
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
Updated for PHPUnit 11. This is has required a major shift away from overriding createMock and requiring extension or trait usage via static analysis. This is due to (understandably) PHPUnit making their internal methods final.
To enforce not using return value generation for test doubles, and error out instead, you have 3 options:
- Use the
StrictMockingtrait, and callcreateStrictMock()explicitly. The PHPStan rules bundled will enforce this usage if the trait is used. - Extend the
TestCaseabstract class provided, and callcreateStrictMock()explicitly. The PHPStan rules bundled will enforce this usage if this class is extended from. - Add
#[DisableReturnValueGenerationForTestDoubles]to your test cases. The Rector ruleEnforceDisableReturnValueGenerationForTestDoublesRectorshipped will enforce/automate adding this to be added to all test cases.
Full Changelog: 0.2.0...0.3.0
0.2.0
What's Changed
- Add PHPStan rule enforcing strict mocking by Marcin Michalski (@marmichalski) in #11
Full Changelog: 0.1.0...0.2.0
0.1.0
What's Changed
- Add stricter mocking by Ben Challis (@ben-challis), Marcin Michalski (@marmichalski) in #2
New Contributors
- Ben Challis (@ben-challis) made their first contribution in #2
- Marcin Michalski (@marmichalski) made their first contribution in #2
Full Changelog: https://github.com/Lendable/phpunit-extensions/commits/0.1.0