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

Don't call createMock with an array of interfaces #38079

Merged
merged 1 commit into from Sep 7, 2020

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Sep 6, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets #37564
License MIT
Doc PR N/A

PHPUnit 8 allows us to pass an array of interfaces to createMock(). The result was a mock object that implemented all of the given interfaces. This feature has sadly been removed (see sebastianbergmann/phpunit#3955), which forces us to create dummy classes that can be mocked instead. I've done this already on the 3.4 branch with #37566.

This PR fixes all affected tests (that I could find) on the 4.4 branch.

@derrabus derrabus force-pushed the bugfix/create-mock-with-array branch from 556aba1 to a8e762d Compare September 6, 2020 19:21
@fabpot
Copy link
Member

fabpot commented Sep 7, 2020

Thank you @derrabus.

@fabpot fabpot merged commit beb6fd8 into symfony:4.4 Sep 7, 2020
@xabbuh xabbuh added this to the 4.4 milestone Sep 7, 2020
@derrabus derrabus deleted the bugfix/create-mock-with-array branch September 7, 2020 09:00
chalasr added a commit that referenced this pull request Sep 7, 2020
…erfaces (derrabus)

This PR was merged into the 5.1 branch.

Discussion
----------

[SecurityHttp] Don't call createMock() with multiple interfaces

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #37564
| License       | MIT
| Doc PR        | N/A

Continuation of #38079 for the 5.1 branch.

Commits
-------

028ec0c [SecurityHttp] Don't call createMock() with multiple interfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants