From bf0108419a513b840f5c0740a9b65497aa57275f Mon Sep 17 00:00:00 2001
From: orbeji <155294281+orbeji@users.noreply.github.com>
Date: Mon, 11 Nov 2024 22:08:45 +0100
Subject: [PATCH 1/5] Updating composer and adapting tests
---
composer.json | 24 ++++++++++++------------
tests/PrCoverageCheckerTest.php | 10 +++++-----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/composer.json b/composer.json
index ff786ce..a43f5b7 100644
--- a/composer.json
+++ b/composer.json
@@ -13,25 +13,25 @@
"Code coverage"
],
"require": {
- "php": "^7.2",
+ "php": "^8.3",
"ext-json": "*",
"ext-simplexml": "*",
"composer-runtime-api": "^2.2",
- "mashape/unirest-php": "^3.0",
- "ptlis/diff-parser": "^1.0.2",
- "symfony/console": "^5.4.36",
- "symfony/polyfill-php83": "*",
- "symfony/polyfill-uuid": "^1.29.0"
+ "mashape/unirest-php": "^3.0.4",
+ "ptlis/diff-parser": "^1.1.0",
+ "symfony/console": "^5.4.46",
+ "symfony/polyfill-php83": "^1.31",
+ "symfony/polyfill-uuid": "^1.31.0"
},
"require-dev": {
- "nyholm/symfony-bundle-test": "^1.8.0",
- "phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^7.5.0",
+ "nyholm/symfony-bundle-test": "^3.0",
+ "phpstan/phpstan": "^1.12.10",
+ "phpunit/phpunit": "^10.5",
"roave/security-advisories": "dev-latest",
"rregeer/phpunit-coverage-check": "^0.3.1",
- "squizlabs/php_codesniffer": "^3.8",
- "symfony/framework-bundle": "5.4",
- "symfony/var-dumper": "^5.4",
+ "squizlabs/php_codesniffer": "^3.10.3",
+ "symfony/framework-bundle": "^5.4.45",
+ "symfony/var-dumper": "^5.4.46",
"webmozart/assert": "^1.11.0"
},
"autoload": {
diff --git a/tests/PrCoverageCheckerTest.php b/tests/PrCoverageCheckerTest.php
index e93fff1..72d3414 100644
--- a/tests/PrCoverageCheckerTest.php
+++ b/tests/PrCoverageCheckerTest.php
@@ -3,7 +3,7 @@
namespace Orbeji\PrCoverageChecker;
use InvalidArgumentException;
-use Nyholm\BundleTest\AppKernel;
+use Nyholm\BundleTest\TestKernel;
use Orbeji\PrCoverageChecker\Coverage\Parser;
use Orbeji\PrCoverageChecker\Git\GitAdapterFactory;
use Orbeji\PrCoverageChecker\Mocks\Git\Bitbucket\BitbucketAdapter;
@@ -20,15 +20,15 @@ class PrCoverageCheckerTest extends KernelTestCase
{
protected static function getKernelClass(): string
{
- return AppKernel::class;
+ return TestKernel::class;
}
protected static function createKernel(array $options = []): KernelInterface
{
- return parent::createKernel($options);
+ $kernel = parent::createKernel($options);
+ return $kernel;
}
-
public function testCommandDiffFile(): void
{
self::bootKernel();
@@ -193,7 +193,7 @@ public function testCommandNoClover(): void
);
$this->expectException(InvalidArgumentException::class);
- $this->expectExceptionMessageRegExp('/Files does not exist: */');
+ $this->expectExceptionMessageMatches('/Files does not exist: */');
$command = $application->find('check');
$commandTester = new CommandTester($command);
$commandTester->execute(
From 9631fdac6a10651b5173d7ce94d6a0c4729909ea Mon Sep 17 00:00:00 2001
From: orbeji <155294281+orbeji@users.noreply.github.com>
Date: Mon, 11 Nov 2024 22:11:24 +0100
Subject: [PATCH 2/5] updating php version in github actions
---
.github/workflows/compatibility.yml | 2 +-
.github/workflows/static.yml | 8 ++++----
.github/workflows/tests.yml | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml
index 3d79201..6254827 100644
--- a/.github/workflows/compatibility.yml
+++ b/.github/workflows/compatibility.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ 'ubuntu-22.04' ]
- php: [ '7.2' ]
+ php: [ '8.3' ]
symfony: [ '5.4.*']
steps:
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
index d825b82..8ddfd33 100644
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -13,7 +13,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: 7.2
+ php-version: 8.3
coverage: none
tools: phpstan:1.10.55, cs2pr
@@ -33,17 +33,17 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: 7.2
+ php-version: 8.3
coverage: none
- name: Composer install
uses: php-actions/composer@v6
with:
- php_version: 7.2
+ php_version: 8.3
- name: PHP Code Sniffer
uses: php-actions/phpcs@v1
with:
- php_version: 7.2
+ php_version: 8.3
path: src/
standard: psr12
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index a25c631..e53e1da 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -13,7 +13,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '7.2'
+ php-version: '8.3'
- name: Install dependencies
run: composer install
From 75f307d7b52e8c1a66d3285cc1824b0dbf85d9a4 Mon Sep 17 00:00:00 2001
From: orbeji <155294281+orbeji@users.noreply.github.com>
Date: Mon, 11 Nov 2024 22:16:11 +0100
Subject: [PATCH 3/5] Updating phpunit xml dist
---
phpunit.xml.dist | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 709bd02..69cd08e 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -21,7 +21,7 @@
- tests
+ tests
From a206ee2431d53c89e50289a0e4a74c9b9abcf65c Mon Sep 17 00:00:00 2001
From: orbeji <155294281+orbeji@users.noreply.github.com>
Date: Mon, 11 Nov 2024 22:19:34 +0100
Subject: [PATCH 4/5] Update phpunit coverage
---
phpunit.xml.dist | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 69cd08e..6435137 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -26,7 +26,7 @@
- src
+ src
From 19c2dca2196e2c0bce16c156bb3c653534098234 Mon Sep 17 00:00:00 2001
From: orbeji <155294281+orbeji@users.noreply.github.com>
Date: Tue, 12 Nov 2024 21:23:42 +0100
Subject: [PATCH 5/5] Try to fix github action
---
phpunit.xml.dist | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 6435137..9034928 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -24,11 +24,9 @@
tests
-
-
- src
-
-
-
-
+
+
+ src
+
+