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 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" }, 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 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; }