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

Deprecate traits ForwardCompatTestTrait #33043

Closed
wants to merge 1 commit into from

Conversation

jderusse
Copy link
Member

@jderusse jderusse commented Aug 8, 2019

Q A
Branch? 4.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #32844
License MIT
Doc PR NA

As symfony 4.3 is compatible with php 7.1 which supports typehint, we don't have to provide a trait that provide 2 signatures in order to be compatible with both PHPUnit 8 and bellow

@nicolas-grekas
Copy link
Member

They are internal and used by core, we cannot do this.

@nicolas-grekas nicolas-grekas modified the milestones: 4.3, next Aug 8, 2019
@@ -13,6 +13,8 @@

use PHPUnit\Framework\TestCase;

@trigger_error(sprintf('The "%s" trait is deprecated since Symfony 4.3, typehint methods "setUp" and "tearDown" with ": void" instead.', ForwardCompatTestTrait::class), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@trigger_error(sprintf('The "%s" trait is deprecated since Symfony 4.3, typehint methods "setUp" and "tearDown" with ": void" instead.', ForwardCompatTestTrait::class), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s" trait is deprecated since Symfony 4.4, typehint methods "setUp" and "tearDown" with ": void" instead.', ForwardCompatTestTrait::class), E_USER_DEPRECATED);

@jderusse
Copy link
Member Author

jderusse commented Aug 8, 2019

They are internal and used by core, we cannot do this.

@nicolas-grekas then we should stop using them. I don't see what problem they solve (when using php 7.1).

@nicolas-grekas
Copy link
Member

I agree, that's what we should do.

@jderusse
Copy link
Member Author

jderusse commented Aug 8, 2019

Closing as this trait is used by exposed abstract classes like KernelTestCase. Removing this trait means to add a : void return typehint on abstract class which is a BC break.

@jderusse jderusse closed this Aug 8, 2019
@jderusse jderusse deleted the deprecat-forwardcompat branch August 8, 2019 11:36
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
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