Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use PHPUnit 9.6 to run Symfony's test suite #49233

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
Feb 15, 2023

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Feb 4, 2023

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

Let's use PHPUnit 9.6 to run test test suite if we can.

@carsonbot carsonbot added this to the 5.4 milestone Feb 4, 2023
Comment on lines -13 to -14
if (\PHP_VERSION_ID < 70200) {
putenv('SYMFONY_PHPUNIT_VERSION=7.5');
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a leftover from Symfony 4 wasn't it?

Copy link
Member

Choose a reason for hiding this comment

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

I'd keep this, the bridge is still declared as compatible with <7.2

@derrabus
Copy link
Member Author

derrabus commented Feb 4, 2023

All right, the output gives us a couple of tasks to work on for PHPUnit 10.

cc @OskarStark

@xabbuh
Copy link
Member

xabbuh commented Feb 4, 2023

👍 I would have expected a lot of messages about the deprecated setMethods() method though (see #49218). 🤔

@OskarStark
Copy link
Contributor

OskarStark commented Feb 4, 2023

It was fixed in

Referenced PR in #49218

@xabbuh
Copy link
Member

xabbuh commented Feb 4, 2023

Yeah, for that particular case which is a file that can be used by users of Symfony. But we make heavy use of setMethods() in our own tests.

@OskarStark
Copy link
Contributor

OskarStark commented Feb 4, 2023

CleanShot 2023-02-04 at 10 42 51@2x

Ok... but why 🤷‍♂️ ...

That will be a lot of work for the abstract test cases in /Test/

OskarStark added a commit to OskarStark/symfony that referenced this pull request Feb 4, 2023
Using `Test` suffix is deprecated since PHPUnit 10

Spooted in
* symfony#49233
@OskarStark
Copy link
Contributor

That will be a lot of work for the abstract test cases in /Test/

Oh no, we already named them *TestCase 💪

OskarStark added a commit to OskarStark/symfony that referenced this pull request Feb 4, 2023
Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony#49233
OskarStark added a commit to OskarStark/symfony that referenced this pull request Feb 6, 2023
Replaces symfony#49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony#49233
nicolas-grekas added a commit that referenced this pull request Feb 6, 2023
…NotAttribute()` (xabbuh)

This PR was merged into the 5.4 branch.

Discussion
----------

stop using `assertObjectHasAttribute()`/`assertObjectHasNotAttribute()`

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | related #49233
| License       | MIT
| Doc PR        |

Commits
-------

442b43c stop using assertObjectHasAttribute()/assertObjectHasNotAttribute()
OskarStark added a commit to OskarStark/symfony that referenced this pull request Feb 7, 2023
Replaces symfony#49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony#49233
nicolas-grekas added a commit that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs #49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* #49233

Commits
-------

cb3db96 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
nicolas-grekas added a commit that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs #49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* #49233

Commits
-------

cb3db96 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/console that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/security-core that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/security-bundle that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/property-access that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/twig-bridge that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/routing that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/serializer that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/translation that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
symfony-splitter pushed a commit to symfony/lock that referenced this pull request Feb 7, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
@derrabus
Copy link
Member Author

What's the fix for…

Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.

? Registering a custom error handler? 🤔

nicolas-grekas added a commit that referenced this pull request Feb 14, 2023
…Unit getMockClass() method (xabbuh)

This PR was merged into the 5.4 branch.

Discussion
----------

[WebProfilerBundle] replace usages of the deprecated PHPUnit getMockClass() method

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | related to #49233
| License       | MIT
| Doc PR        |

Commits
-------

2f7c509 replace usages of the deprecated PHPUnit getMockClass() method
@xabbuh
Copy link
Member

xabbuh commented Feb 14, 2023

I think it's easier: #49375 (I need to check all places though)

nicolas-grekas added a commit that referenced this pull request Feb 14, 2023
…certain strings (xabbuh)

This PR was merged into the 5.4 branch.

Discussion
----------

use proper methods to assert exception messages contain certain strings

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | related to #49233
| License       | MIT
| Doc PR        |

Commits
-------

5b3e6a5 use proper methods to assert exception messages contain certain strings
@derrabus derrabus force-pushed the improvement/phpunit-9.6 branch 2 times, most recently from ecbe5b7 to 4237f77 Compare February 14, 2023 18:12
@derrabus derrabus force-pushed the improvement/phpunit-9.6 branch 4 times, most recently from 493a9b9 to efd7cbb Compare February 14, 2023 21:51
@derrabus
Copy link
Member Author

🟢

nicolas-grekas added a commit that referenced this pull request Feb 15, 2023
This PR was merged into the 6.2 branch.

Discussion
----------

Fix PHPUnit 9.6 deprecations

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Related to #49233
| License       | MIT
| Doc PR        | N/A

This PR fixes deprecations introduced by PHPUnit 9.6. We should merge this PR before merging up #49233.

Commits
-------

a6896fa Fix PHPUnit 9.6 deprecations
@derrabus derrabus force-pushed the improvement/phpunit-9.6 branch from efd7cbb to e1ca0aa Compare February 15, 2023 18:14
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit c7a7cb8 into symfony:5.4 Feb 15, 2023
@derrabus derrabus deleted the improvement/phpunit-9.6 branch February 15, 2023 18:37
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Jul 28, 2023
… `/Tests/` (OskarStark)

This PR was merged into the 6.3 branch.

Discussion
----------

[PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Refs symfony/symfony#49233
| License       | MIT
| Doc PR        | n/a

Replaces #49234

Using `Test` suffix is deprecated since PHPUnit 10

Spotted in
* symfony/symfony#49233

Commits
-------

cb3db968e4 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/`
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.

5 participants