Skip to content

Do not depend on phpspec/prophecy #5033

@staabm

Description

@staabm

we are using phpunit and don't use mocks. therefore we don't need phpspec/prophecy, which is a requirement for phpunit atm.

we would like to use phpunit on php8.2 but composer let us not install it because phpspec/prophecy seems to not yet support php 8.2.

Error: Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[9.4.1, ..., 9.5.22] require phpspec/prophecy ^1.12.1 -> satisfiable by phpspec/prophecy[1.12.1, ..., v1.15.0].
    - phpunit/phpunit[9.3.0, ..., 9.4.0] require phpspec/prophecy ^1.11.1 -> satisfiable by phpspec/prophecy[1.11.1, ..., v1.15.0].
    - phpunit/phpunit[9.0.0, ..., 9.2.6] require php ^7.3 -> your php version (8.2.0-dev) does not satisfy that requirement.
    - phpspec/prophecy[1.11.0, ..., 1.11.1] require php ^7.2 -> your php version (8.2.0-dev) does not satisfy that requirement.
    - phpspec/prophecy[1.12.0, ..., 1.13.0] require php ^7.2 || ~8.0, <8.1 -> your php version (8.2.0-dev) does not satisfy that requirement.
    - phpspec/prophecy[1.14.0, ..., v1.15.0] require php ^7.2 || ~8.0, <8.2 -> your php version (8.2.0-dev) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ^9 -> satisfiable by phpunit/phpunit[9.0.0, ..., 9.5.22].

atm we can work around the problem using --ignore-platform-req=php+ composer cli switch.

I guess our situation is similar for other phpunit uses which also don't use mocks...

do you think its feasible to drop this dependency - or at least consider it optional in future phpunit versions?

thanks for the great tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/change-in-dependency-requires-adaptationA change in a dependency requires a change so that existing PHPUnit functionality continues to work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions