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

chore(deps-dev): update phpunit/phpunit requirement from ^10.5.16 to ^11.2.6 #9039

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 9, 2024

Updates the requirements on phpunit/phpunit to permit the latest version.

Release notes

Sourced from phpunit/phpunit's releases.

PHPUnit 11.2.6

Changed

  • #5880: Add hints to CLI parameter deprecation messages

How to install or update PHPUnit

Changelog

Sourced from phpunit/phpunit's changelog.

[11.2.6] - 2024-07-03

Changed

  • #5880: Add hints to CLI parameter deprecation messages

[11.2.5] - 2024-06-20

Changed

  • #5877: Use array_pop() instead of array_shift() for processing Test objects in TestSuite::run() and optimize TestSuite::isEmpty()

[11.2.4] - 2024-06-20

Changed

  • #5875: Also destruct TestCase objects early that use a data provider

[11.2.3] - 2024-06-19

Changed

  • #5870: Do not collect unnecessary information using debug_backtrace()

[11.2.2] - 2024-06-15

Changed

  • #5861: Destroy TestCase object after its test was run

Fixed

  • #5822: PHP deprecations triggered within a closure are not handled correctly

[11.2.1] - 2024-06-11

Fixed

  • #5857: Mocked methods cannot be called from the original constructor of a partially mocked class
  • #5859: XML Configuration File Migrator does not remove cacheDirectory attribute from <coverage> element when migrating from PHPUnit 11.1 to PHPUnit 11.2

[11.2.0] - 2024-06-07

Added

  • #5799: #[CoversTrait] and #[UsesTrait] attributes
  • #5804: Support doubling readonly classes
  • #5811: assertObjectNotEquals()

Deprecated

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) to permit the latest version.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/11.2.6/ChangeLog-11.2.md)
- [Commits](sebastianbergmann/phpunit@10.5.16...11.2.6)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update external dependencies php Pull requests that update Php code labels Jul 9, 2024
@kenjis
Copy link
Member

kenjis commented Jul 10, 2024

When will we upgrade to PHPUnit 11?

@paulbalandan
Copy link
Member

I think we can make the requirement as ^10.5 || ^11.2

@kenjis
Copy link
Member

kenjis commented Jul 10, 2024

PHPUnit 11 requires PHP 8.2 or later. If you are not using PHP 8.2 or PHP 8.3, you will not be able to use PHPUnit 11 right away.
https://phpunit.de/announcements/phpunit-11.html

Then, do we change the version to ^10.5 || ^11.2, and write test code that can run both on 10 and 11?
Is it possible?

@paulbalandan
Copy link
Member

As far as I remember, PHPUnit 11's major change is the hard deprecations, e.g. on annotations vs attributes. Other than those, I believe there's no substantial change from PHPUnit 10.

@kenjis
Copy link
Member

kenjis commented Jul 10, 2024

Cannot upgrade to PHPUnit 11.

--- a/composer.json
+++ b/composer.json
@@ -29,8 +29,8 @@
         "phpstan/extension-installer": "^1.3",
         "phpstan/phpstan": "^1.11",
         "phpstan/phpstan-strict-rules": "^1.6",
-        "phpunit/phpcov": "^9.0.2",
-        "phpunit/phpunit": "^10.5.16",
+        "phpunit/phpcov": "^10.0.0",
+        "phpunit/phpunit": "^11.2.6",
         "predis/predis": "^1.1 || ^2.0",
         "rector/rector": "1.2.0",
         "vimeo/psalm": "^5.0"
$ composer update -W
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sebastian/diff[4.0.0, ..., 4.0.1] require php ^7.3 -> your php version (8.2.20) does not satisfy that requirement.
    - vimeo/psalm[5.22.0, ..., 5.25.0] require nikic/php-parser ^4.16 -> satisfiable by nikic/php-parser[v4.16.0, ..., v4.19.1].
    - You can only install one version of a package, so only one of these can be installed: nikic/php-parser[v4.13.0, ..., v4.19.1, v5.0.0, v5.0.1, v5.0.2, v5.1.0].
    - vimeo/psalm[5.5.0, ..., 5.21.1] require sebastian/diff ^4.0 || ^5.0 -> satisfiable by sebastian/diff[4.0.0, ..., 4.0.6, 5.0.0, ..., 5.1.1].
    - vimeo/psalm[5.0.0, ..., 5.4.0] require sebastian/diff ^4.0 -> satisfiable by sebastian/diff[4.0.0, ..., 4.0.6].
    - phpunit/php-code-coverage[11.0.0, ..., 11.0.5] require nikic/php-parser ^5.0 -> satisfiable by nikic/php-parser[v5.0.0, v5.0.1, v5.0.2, v5.1.0].
    - You can only install one version of a package, so only one of these can be installed: sebastian/diff[4.0.0, ..., 4.0.6, 5.0.0, ..., 5.1.1, 6.0.0, 6.0.1, 6.0.2].
    - phpunit/phpcov 10.0.0 requires phpunit/php-code-coverage ^11.0 -> satisfiable by phpunit/php-code-coverage[11.0.0, ..., 11.0.5].
    - phpunit/phpcov 10.0.0 requires sebastian/diff ^6.0 -> satisfiable by sebastian/diff[6.0.0, 6.0.1, 6.0.2].
    - Root composer.json requires phpunit/phpcov ^10.0.0 -> satisfiable by phpunit/phpcov[10.0.0].
    - Root composer.json requires vimeo/psalm ^5.0 -> satisfiable by vimeo/psalm[5.0.0, ..., 5.25.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 10, 2024

Superseded by #9042.

@dependabot dependabot bot closed this Jul 10, 2024
@dependabot dependabot bot deleted the dependabot/composer/phpunit/phpunit-tw-11.2.6 branch July 10, 2024 15:17
@paulbalandan
Copy link
Member

It seems psalm's dependencies are conflicting with the requirements.

@kenjis
Copy link
Member

kenjis commented Jul 11, 2024

Yes. It seems Psalm 6 will be compatible with PHPUnit 11.
vimeo/psalm#10792

Why don't we wait for Psalm 6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update external dependencies php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants