Skip to content

Commit e03ad06

Browse files
committed
Migrate to phpspec/prophecy-phpunit
sebastianbergmann/phpunit#5033 changed phpunit to no longer depend on phpspec/prophecy. This results in the need to add a development dependency for phpspec/prophecy. Doing so results in a warning, since PHPUnit\Framework\TestCase::prophesize() is deprecated and will be removed in PHPUnit 10. Let's use the trait provided by phpspec/prophecy-phpunit instead. * Fixes myclabs#177
1 parent 14daed4 commit e03ad06

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"require-dev": {
1717
"doctrine/collections": "^1.6.8",
1818
"doctrine/common": "^2.13.3 || ^3.2.2",
19+
"phpspec/prophecy-phpunit": "^2.0",
1920
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
2021
},
2122
"conflict": {

tests/DeepCopyTest/TypeFilter/Spl/ArrayObjectFilterTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use DeepCopy\DeepCopy;
77
use DeepCopy\TypeFilter\Spl\ArrayObjectFilter;
88
use PHPUnit\Framework\TestCase;
9-
use Prophecy\Prophecy\ObjectProphecy;
9+
use Prophecy\PhpUnit\ProphecyTrait;
1010
use RecursiveArrayIterator;
1111

1212
/**
@@ -16,13 +16,14 @@
1616
*/
1717
final class ArrayObjectFilterTest extends TestCase
1818
{
19+
use ProphecyTrait;
1920
/**
2021
* @var ArrayObjectFilter
2122
*/
2223
private $arrayObjectFilter;
2324

2425
/**
25-
* @var DeepCopy|ObjectProphecy
26+
* @var DeepCopy|ProphecyTrait
2627
*/
2728
private $copierProphecy;
2829

0 commit comments

Comments
 (0)