From 3a88f5d4d87fa8537488765645316bdb32d8a55d Mon Sep 17 00:00:00 2001 From: Nicholas Ciechanowski Date: Wed, 22 Apr 2026 15:44:09 +1000 Subject: [PATCH 1/4] ci: fix backwards compatibility check --- .github/workflows/backwards-compatibility.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backwards-compatibility.yml b/.github/workflows/backwards-compatibility.yml index 8d13b2d512e..dcedc804d1c 100644 --- a/.github/workflows/backwards-compatibility.yml +++ b/.github/workflows/backwards-compatibility.yml @@ -15,7 +15,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.5' - name: Install roave/backward-compatibility-check run: composer require --dev roave/backward-compatibility-check diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26fa98818e2..255acda3c28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v6 From df575afaa2aa4f58e357c34bbe22b5ed13a98647 Mon Sep 17 00:00:00 2001 From: Nicholas Ciechanowski Date: Wed, 22 Apr 2026 16:10:01 +1000 Subject: [PATCH 2/4] chore: bump phpstan --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index da450bc019d..0fdb370616e 100644 --- a/composer.json +++ b/composer.json @@ -37,9 +37,9 @@ "http-interop/http-factory-guzzle": "^1.0", "guzzlehttp/guzzle": "^7.2", "php-http/mock-client": "^1.4.1", - "phpstan/phpstan": "^0.12.57", + "phpstan/phpstan": "^1", "phpstan/extension-installer": "^1.0.5", - "phpstan/phpstan-deprecation-rules": "^0.12.5", + "phpstan/phpstan-deprecation-rules": "^1", "phpunit/phpunit": "^8.5 || ^9.4", "symfony/phpunit-bridge": "^5.2" }, From c9d9444351e03a4e2b111af40415f42c3476db34 Mon Sep 17 00:00:00 2001 From: Nicholas Ciechanowski Date: Wed, 22 Apr 2026 16:20:53 +1000 Subject: [PATCH 3/4] fix: `setAccessible` for >= 8.5 --- test/Github/Tests/Api/TestCase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Github/Tests/Api/TestCase.php b/test/Github/Tests/Api/TestCase.php index 4fd6a49234c..381cda9e98a 100644 --- a/test/Github/Tests/Api/TestCase.php +++ b/test/Github/Tests/Api/TestCase.php @@ -42,7 +42,9 @@ protected function getApiMock() protected function getMethod($object, $methodName) { $method = new ReflectionMethod($object, $methodName); - $method->setAccessible(true); + if (version_compare(PHP_VERSION, '8.5.0', '<')) { + $method->setAccessible(true); + } return $method; } From e0ec280bbd06f7893603cf8f640271b90f2feec2 Mon Sep 17 00:00:00 2001 From: Nicholas Ciechanowski Date: Wed, 22 Apr 2026 16:36:01 +1000 Subject: [PATCH 4/4] fix: phpstan old rules --- phpstan.neon.dist | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9e84171f2c5..b235de8e54b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,8 +8,9 @@ parameters: ignoreErrors: # Ignore typehint errors on api classes - - message: '#Method (.*) with no typehint specified\.#' + identifier: missingType.return path: lib/Github/Api + - - message: '#Method (.*) has no return typehint specified\.#' + identifier: missingType.parameter path: lib/Github/Api