phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Add warning to MockBuilder::setMethods() about deprecated method

Open adrmrn opened this issue 4 years ago • 1 comments

It's my very first PR to the PHPUnit project, so any suggestions are welcomed.

These changes are referring to the #4775 issue. Until now, there is no warning about the deprecated setMethods() method.

Problem I had was that TestCase::createPartialMock() still using MockBuilder::setMethods() and I'm not sure if it's possible to refactor code to use onlyMethods() & addMethods() instead. I decided to exclude warning for this specific use case.

adrmrn avatar Oct 16 '21 22:10 adrmrn

Codecov Report

Merging #4803 (5d4feca) into 9.5 (c9da1dc) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##                9.5    #4803   +/-   ##
=========================================
  Coverage     83.79%   83.79%           
  Complexity     4596     4596           
=========================================
  Files           273      273           
  Lines         11435    11435           
=========================================
  Hits           9582     9582           
  Misses         1853     1853           
Impacted Files Coverage Δ
src/Framework/MockObject/MockBuilder.php 70.68% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 17 '21 05:10 codecov[bot]

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

sebastianbergmann avatar Jan 14 '23 12:01 sebastianbergmann