Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

adrmrn
Copy link

@adrmrn adrmrn commented Oct 16, 2021

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 adrmrn marked this pull request as ready for review October 16, 2021 22:13
@codecov
Copy link

codecov bot commented Oct 17, 2021

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% <ø> (ø)

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

@sebastianbergmann sebastianbergmann added this to the PHPUnit 9.6 milestone Sep 25, 2022
@sebastianbergmann sebastianbergmann self-assigned this Sep 25, 2022
@sebastianbergmann sebastianbergmann added type/deprecation Something will be/is deprecated feature/test-doubles Test Stubs and Mock Objects labels Sep 25, 2022
@sebastianbergmann
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-doubles Test Stubs and Mock Objects type/deprecation Something will be/is deprecated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants