Skip to content

[PhpUnitBridge] Restore SetUpTearDownTraitForV5 #39487

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

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

jderusse
Copy link
Member

Q A
Branch? 5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The class SetUpTearDownTraitForV5 removed in #39419 is still needed when using PHPUNIT 7.5 (PHP 7.1) that does not have return type:

https://github.com/sebastianbergmann/phpunit/blob/520723129e2b3fc1dc4c0953e43c9d40e1ecb352/src/Framework/TestCase.php#L407

@carsonbot carsonbot changed the title Restore SetUpTearDownTraitForV5 [PhpUnitBridge] Restore SetUpTearDownTraitForV5 Dec 13, 2020
@jderusse jderusse added this to the 5.x milestone Dec 13, 2020
@derrabus
Copy link
Member

On PHP 7.1, you can simply define function setUp(): void even if the upstream method does not have that return type. I agree with the proposed change, but we should deprecate the trait and remove it in Symfony 6.

@jderusse
Copy link
Member Author

Deprecating added

@nicolas-grekas
Copy link
Member

Thank you @jderusse.

@nicolas-grekas nicolas-grekas merged commit a4f71a6 into symfony:5.x Dec 14, 2020
nicolas-grekas added a commit that referenced this pull request Dec 14, 2020
…derusse)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] [phpunit] Stop using deprecated trait

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

the `SetUpTearDownTrait` trait has been removed in #39487 this PR remove usage of it in branch 4.4

Commits
-------

55ed00c Stop using deprecated trait
@jderusse jderusse deleted the fix-phpunit branch December 15, 2020 12:36
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.

4 participants