From d2156d0f551961b8dc67f583b3e6257e103d9f4e Mon Sep 17 00:00:00 2001 From: azjezz Date: Wed, 19 May 2021 04:11:29 +0100 Subject: [PATCH] fix build --- composer.json | 2 +- composer.lock | 2 +- phpunit.xml.dist | 20 ++++++++++--------- src/Command/AssertBackwardsCompatible.php | 6 +++++- .../Command/AssertBackwardsCompatibleTest.php | 4 ++-- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 6c4c31a6..1a210510 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "doctrine/coding-standard": "^8.2.0", "infection/infection": "^0.16.4", "php-standard-library/psalm-plugin": "^1.1", - "phpunit/phpunit": "^9.2.6", + "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3.6.0", "vimeo/psalm": "^4.7" diff --git a/composer.lock b/composer.lock index 6cc8b883..56540c5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "92c62d968f24dce0f4201786a22aa910", + "content-hash": "c294b928d0fcb3386b49039ba25a00f5", "packages": [ { "name": "azjezz/psl", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b4acd2c7..fae9d95a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,9 +1,9 @@ @@ -13,12 +13,14 @@ ./test/e2e - - + + + ./src - - + + + - + diff --git a/src/Command/AssertBackwardsCompatible.php b/src/Command/AssertBackwardsCompatible.php index 92bae300..45e56d14 100644 --- a/src/Command/AssertBackwardsCompatible.php +++ b/src/Command/AssertBackwardsCompatible.php @@ -141,7 +141,11 @@ public function execute(InputInterface $input, OutputInterface $output): int $toRevision = $this->parseRevision->fromStringForRepository($to, $sourceRepo); - $stdErr->writeln(Str\format('Comparing from %s to %s...', (string) $fromRevision, (string) $toRevision)); + $stdErr->writeln(Str\format( + 'Comparing from %s to %s...', + Type\string()->coerce($fromRevision), + Type\string()->coerce($toRevision) + )); $fromPath = $this->git->checkout($sourceRepo, $fromRevision); $toPath = $this->git->checkout($sourceRepo, $toRevision); diff --git a/test/e2e/Command/AssertBackwardsCompatibleTest.php b/test/e2e/Command/AssertBackwardsCompatibleTest.php index 35c54d0e..20a907fc 100644 --- a/test/e2e/Command/AssertBackwardsCompatibleTest.php +++ b/test/e2e/Command/AssertBackwardsCompatibleTest.php @@ -173,7 +173,7 @@ public function testWillAllowSpecifyingGitRevision() : void EXPECTED , - $exception->getOutput() // @TODO https://github.com/Roave/BackwardCompatibilityCheck/issues/79 this looks like a symfony bug - we shouldn't check STDERR, but STDOUT + $exception->getErrorOutput() // @TODO https://github.com/Roave/BackwardCompatibilityCheck/issues/79 this looks like a symfony bug - we shouldn't check STDERR, but STDOUT ); } } @@ -199,7 +199,7 @@ public function testWillRunSuccessfullyOnNoBcBreaks() : void '-vvv', ], $this->sourcesRepository); - self::assertStringContainsString('No backwards-incompatible changes detected', $output); + self::assertEmpty($output); } public function testWillPickTaggedVersionOnNoGivenFrom() : void