From a93808b2f7345f4381e618f6551ea556849275c0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2019 13:38:27 +0000 Subject: [PATCH 1/3] Update pepakriz/phpstan-exception-rules requirement || ^0.4 Updates the requirements on pepakriz/phpstan-exception-rules to permit the latest version. Signed-off-by: dependabot-preview[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ed1d5689..56d6c6ee 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.13", "mikey179/vfsStream": "^1.6", - "pepakriz/phpstan-exception-rules": "^0.3", + "pepakriz/phpstan-exception-rules": "^0.3 || ^0.4", "phpstan/phpstan": "^0.10", "phpstan/phpstan-beberlei-assert": "^0.10", "phpstan/phpstan-deprecation-rules": "^0.10", From 844069d409a5292aa0d15aa75a17f11701d09c3b Mon Sep 17 00:00:00 2001 From: Jay Klehr Date: Tue, 30 Jul 2019 09:49:22 -0600 Subject: [PATCH 2/3] new php-cs-fixer fixes to fix build --- tests/BrowscapUpdaterTest.php | 4 ++-- tests/Command/CheckUpdateCommandTest.php | 8 ++++---- tests/Command/ConvertCommandTest.php | 8 ++++---- tests/Command/FetchCommandTest.php | 8 ++++---- tests/Command/UpdateCommandTest.php | 8 ++++---- tests/Helper/Converter/ConverterConvertStringTest.php | 10 +++++----- tests/Helper/Converter/ConverterTest.php | 10 +++++----- tests/Parser/Helper/GetPatternTest.php | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/BrowscapUpdaterTest.php b/tests/BrowscapUpdaterTest.php index c7f83d1c..16fbcaa7 100644 --- a/tests/BrowscapUpdaterTest.php +++ b/tests/BrowscapUpdaterTest.php @@ -316,11 +316,11 @@ public function testConvertString() : void public function testFetchFail() : void { $response = $this->createMock(Response::class); - $response->expects(self::exactly(2))->method('getStatusCode')->will(self::returnValue(500)); + $response->expects(self::exactly(2))->method('getStatusCode')->willReturn(500); /** @var ClientInterface|\PHPUnit_Framework_MockObject_MockObject $client */ $client = $this->createMock(ClientInterface::class); - $client->expects(self::once())->method('request')->will(self::returnValue($response)); + $client->expects(self::once())->method('request')->willReturn($response); $reflection = new \ReflectionClass($this->object); $reflectionAttrbute = $reflection->getProperty('client'); diff --git a/tests/Command/CheckUpdateCommandTest.php b/tests/Command/CheckUpdateCommandTest.php index bd11485f..3cfac4ce 100644 --- a/tests/Command/CheckUpdateCommandTest.php +++ b/tests/Command/CheckUpdateCommandTest.php @@ -16,19 +16,19 @@ public function testConfigure() : void $object ->expects(self::once()) ->method('setName') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('setDescription') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::never()) ->method('addArgument') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('addOption') - ->will(self::returnSelf()); + ->willReturnSelf(); $class = new \ReflectionClass(CheckUpdateCommand::class); $method = $class->getMethod('configure'); diff --git a/tests/Command/ConvertCommandTest.php b/tests/Command/ConvertCommandTest.php index 1a2f42aa..8e9b546c 100644 --- a/tests/Command/ConvertCommandTest.php +++ b/tests/Command/ConvertCommandTest.php @@ -19,19 +19,19 @@ public function testConfigure() : void $object ->expects(self::once()) ->method('setName') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('setDescription') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('addArgument') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('addOption') - ->will(self::returnSelf()); + ->willReturnSelf(); $class = new \ReflectionClass(ConvertCommand::class); $method = $class->getMethod('configure'); diff --git a/tests/Command/FetchCommandTest.php b/tests/Command/FetchCommandTest.php index 3c9f44ad..fece1c79 100644 --- a/tests/Command/FetchCommandTest.php +++ b/tests/Command/FetchCommandTest.php @@ -19,19 +19,19 @@ public function testConfigure() : void $object ->expects(self::once()) ->method('setName') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('setDescription') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('addArgument') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::exactly(2)) ->method('addOption') - ->will(self::returnSelf()); + ->willReturnSelf(); $class = new \ReflectionClass(FetchCommand::class); $method = $class->getMethod('configure'); diff --git a/tests/Command/UpdateCommandTest.php b/tests/Command/UpdateCommandTest.php index e62d5f31..6ed7a60e 100644 --- a/tests/Command/UpdateCommandTest.php +++ b/tests/Command/UpdateCommandTest.php @@ -19,19 +19,19 @@ public function testConfigure() : void $object ->expects(self::once()) ->method('setName') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::once()) ->method('setDescription') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::never()) ->method('addArgument') - ->will(self::returnSelf()); + ->willReturnSelf(); $object ->expects(self::exactly(3)) ->method('addOption') - ->will(self::returnSelf()); + ->willReturnSelf(); $class = new \ReflectionClass(UpdateCommand::class); $method = $class->getMethod('configure'); diff --git a/tests/Helper/Converter/ConverterConvertStringTest.php b/tests/Helper/Converter/ConverterConvertStringTest.php index e0e7a71e..479ee345 100644 --- a/tests/Helper/Converter/ConverterConvertStringTest.php +++ b/tests/Helper/Converter/ConverterConvertStringTest.php @@ -23,16 +23,16 @@ public function setUp() : void $logger = $this->createMock(LoggerInterface::class); $logger->expects(self::exactly(4)) ->method('info') - ->will(self::returnValue(false)); + ->willReturn(false); $logger->expects(self::never()) ->method('error') - ->will(self::returnValue(false)); + ->willReturn(false); /** @var BrowscapCacheInterface|\PHPUnit_Framework_MockObject_MockObject $cache */ $cache = $this->createMock(BrowscapCacheInterface::class); $cache->expects(self::any()) ->method('setItem') - ->will(self::returnValue(true)); + ->willReturn(true); $this->object = new Converter($logger, $cache); } @@ -45,7 +45,7 @@ public function testConvertString() : void ->getMock(); $file->expects(self::never()) ->method('exists') - ->will(self::returnValue(false)); + ->willReturn(false); $this->object->setFilesystem($file); @@ -166,7 +166,7 @@ public function testConvertStringWithoutPatternFound() : void ->getMock(); $file->expects(self::never()) ->method('exists') - ->will(self::returnValue(false)); + ->willReturn(false); $this->object->setFilesystem($file); diff --git a/tests/Helper/Converter/ConverterTest.php b/tests/Helper/Converter/ConverterTest.php index 3728c4dd..46e3d958 100644 --- a/tests/Helper/Converter/ConverterTest.php +++ b/tests/Helper/Converter/ConverterTest.php @@ -33,13 +33,13 @@ public function setUp() : void $logger = $this->createMock(LoggerInterface::class); $logger->expects(self::never()) ->method('info') - ->will(self::returnValue(false)); + ->willReturn(false); /** @var BrowscapCacheInterface|\PHPUnit_Framework_MockObject_MockObject $cache */ $cache = $this->createMock(BrowscapCacheInterface::class); $cache->expects(self::any()) ->method('setItem') - ->will(self::returnValue(true)); + ->willReturn(true); $this->object = new Converter($logger, $cache); } @@ -63,7 +63,7 @@ public function testConvertMissingFile() : void $file = $this->createMock(Filesystem::class); $file->expects(self::once()) ->method('exists') - ->will(self::returnValue(false)); + ->willReturn(false); $this->object->setFilesystem($file); @@ -190,7 +190,7 @@ public function testConvertFile() : void $file = $this->createMock(Filesystem::class); $file->expects(self::once()) ->method('exists') - ->will(self::returnValue(false)); + ->willReturn(false); $this->object->setFilesystem($file); @@ -205,7 +205,7 @@ public function testGetIniVersion() : void $file = $this->createMock(Filesystem::class); $file->expects(self::never()) ->method('exists') - ->will(self::returnValue(false)); + ->willReturn(false); $this->object->setFilesystem($file); diff --git a/tests/Parser/Helper/GetPatternTest.php b/tests/Parser/Helper/GetPatternTest.php index 18c5e91a..df092acf 100644 --- a/tests/Parser/Helper/GetPatternTest.php +++ b/tests/Parser/Helper/GetPatternTest.php @@ -41,7 +41,7 @@ public function setUp() : void $cache ->expects(self::never()) ->method('getItem') - ->will(self::returnValueMap($map)); + ->willReturnMap($map); /** @var LoggerInterface|\PHPUnit_Framework_MockObject_MockObject $logger */ $logger = $this->createMock(LoggerInterface::class); From 993fa882dd044e2dde7a8f08958b48e8c8322b25 Mon Sep 17 00:00:00 2001 From: Jay Klehr Date: Tue, 30 Jul 2019 09:53:08 -0600 Subject: [PATCH 3/3] also fixing a warning that composer throws due to uppercase letter in package name --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 56d6c6ee..57b1cccf 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.13", - "mikey179/vfsStream": "^1.6", + "mikey179/vfsstream": "^1.6", "pepakriz/phpstan-exception-rules": "^0.3 || ^0.4", "phpstan/phpstan": "^0.10", "phpstan/phpstan-beberlei-assert": "^0.10",