Merge branch '1.8'

* 1.8:
  Remove pamil/prophecy-common from require-dev dependencies
This commit is contained in:
Kamil Kokot 2020-12-03 11:12:28 +01:00
commit 3183f9fd36
No known key found for this signature in database
GPG key ID: 7BD76F7054D93C89
4 changed files with 24 additions and 7 deletions

View file

@ -131,7 +131,6 @@
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"mikey179/vfsstream": "^1.6",
"mockery/mockery": "^1.4",
"pamil/prophecy-common": "^0.1",
"phpspec/phpspec": "^7.0",
"phpstan/phpstan": "0.12.56",
"phpstan/phpstan-doctrine": "0.12.22",

View file

@ -34,7 +34,6 @@
"zendframework/zend-stdlib": "^3.2"
},
"require-dev": {
"pamil/prophecy-common": "^0.1",
"phpspec/phpspec": "^7.0"
},
"config": {

View file

@ -13,7 +13,6 @@ declare(strict_types=1);
namespace spec\Sylius\Component\Channel\Context;
use Pamil\ProphecyCommon\Promise\CompositePromise;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Channel\Context\ChannelContextInterface;
use Sylius\Component\Channel\Context\ChannelNotFoundException;
@ -116,7 +115,30 @@ final class CachedPerRequestChannelContextSpec extends ObjectBehavior
$decoratedChannelContext
->getChannel()
->will(CompositePromise::it()->willThrow(ChannelNotFoundException::class)->andThenReturn($channel))
->will(new class ($channel->getWrappedObject()) {
/** @var int */
private $counter = 0;
/** @var ChannelInterface */
private $channel;
public function __construct(ChannelInterface $channel) {
$this->channel = $channel;
}
/** @throws ChannelNotFoundException */
public function __invoke(): ChannelInterface
{
$currentCounter = $this->counter;
++$this->counter;
if ($currentCounter === 0) {
throw new ChannelNotFoundException();
}
return $this->channel;
}
})
->shouldBeCalledTimes(2)
;

View file

@ -402,9 +402,6 @@
"pagerfanta/pagerfanta": {
"version": "v2.4.1"
},
"pamil/prophecy-common": {
"version": "v0.1.0"
},
"paragonie/random_compat": {
"version": "v2.0.18"
},