phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 240 forks source link

Allow to work with PHPUnit 10 #585

Closed Jean85 closed 1 year ago

Jean85 commented 1 year ago

This draft of a PR was needed for me to work on PHPUnit 10 compat on another project, see https://github.com/facile-it/paraunit/pull/172

It allows two packages to the next major version (5), with no other code modifications since there are no BC impacting Prophecy.

stof commented 1 year ago

Can you rebase your branch to avoid the merge commit ?

Also, is this actually a draft PR ?

Jean85 commented 1 year ago

Rebased.

I left it as draft since both majors of both packages are not released yet.

stof commented 1 year ago

@sebastianbergmann is it safe for us to release this change now or do you expect to do more BC breaks in sebastian/comparator and sebastian/recursion-context before their stable 5.0 release ?

sebastianbergmann commented 1 year ago

I consider any such changes highly unlikely.

Jean85 commented 1 year ago

@sebastianbergmann @stof I've found a BC that's hitting this PR and it's going unnoticed due to the CI here not installing a dev dep: SebastianBergmann\Comparator\Factory if final and it's being extended in Prophecy\Comparator\Factory.

We could easily fix it with the decorator patter, but I don't know if it's to be considered a BC here (since no longer extending the class).

stof commented 1 year ago

@Jean85 you need to update the specs of that Factory

Jean85 commented 1 year ago

@stof I didn't do it because, apart from the fact that I'm not skilled with PHPSpec, I'm not sure on how to proceed:

stof commented 1 year ago

I worked on preparing this work in https://github.com/phpspec/prophecy/pull/589

Jean85 commented 1 year ago

Rebased to include #589

Jean85 commented 1 year ago

Closing and reopening to trigger a CI run, now that PHPUnit 10 is released.

Jean85 commented 1 year ago

This would require https://github.com/phpspec/phpspec/pull/1443 to test and work completely.

Jean85 commented 1 year ago

Let's follow the suggestion from https://github.com/phpspec/phpspec/pull/1443#issuecomment-1441442703 and test on an optional CI job requiring master.