diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a3c7e0..af78187 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: matrix: php: [ "8.3" ] - runs-on: [self-hosted, linux, x64] + runs-on: [ubuntu-latest] name: PHP@${{ matrix.php }} steps: diff --git a/composer.json b/composer.json index cdeca1a..0b67943 100644 --- a/composer.json +++ b/composer.json @@ -3,13 +3,13 @@ "type": "package", "description": "The Gaudigame Engine", "require": { - "php": "8.3.*" + "php": "8.3.* | 8.4.*" }, "require-dev": { - "laravel/pint": "^1.14", - "pestphp/pest": "^2.34", - "pestphp/pest-plugin-type-coverage": "^2.8", - "phpstan/phpstan": "^1.10.59" + "laravel/pint": "^1.0", + "pestphp/pest": "^3.0", + "pestphp/pest-plugin-type-coverage": "^3.0", + "phpstan/phpstan": "^1.0" }, "autoload": { "psr-4": { diff --git a/phpstan.neon b/phpstan.neon index 9a59341..3a0decc 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,23 +5,19 @@ parameters: level: max treatPhpDocTypesAsCertain: false - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false reportUnmatchedIgnoredErrors: true ignoreErrors: - # Pest implicitly binds $this to the current test case - # @see https://pestphp.com/docs/underlying-test-case - message: '#^Undefined variable: \$this$#' - reportUnmatched: false path: tests/* - message: '#^Call to an undefined method Pest\\Expectation<([a-zA-Z|\\\\]+)>\:\:[a-zA-Z]+\(\)\.$#' - reportUnmatched: false path: tests/* - message: "#^Call to an undefined method Pest\\\\PendingCalls\\\\TestCall\\:\\:expect\\(\\)\\.$#" - reportUnmatched: false + path: tests/* + - + message: "#^Access to an undefined property PHPUnit\\\\Framework\\\\TestCase\\:\\:\\$#" path: tests/* diff --git a/tests/Pest.php b/tests/Pest.php index 64c24a5..a3f34d2 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -19,7 +19,7 @@ return $this; }); -expect()->extend('toBeExactGuess', function (float $boost = null) { +expect()->extend('toBeExactGuess', function (?float $boost = null) { $expectedPoints = (float) (new DefaultCalculationModel())->getPointsForExactGuess(); $expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints; @@ -33,7 +33,7 @@ return $this; }); -expect()->extend('toBeWrongGuess', function (float $boost = null) { +expect()->extend('toBeWrongGuess', function (?float $boost = null) { $expectedPoints = (float) (new DefaultCalculationModel())->getPointsForWrongGuess(); $expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints; @@ -47,7 +47,7 @@ return $this; }); -expect()->extend('toBeExactGapGuess', function (float $boost = null) { +expect()->extend('toBeExactGapGuess', function (?float $boost = null) { $expectedPoints = (float) (new DefaultCalculationModel())->getPointsForExactGap(); $expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints; @@ -61,7 +61,7 @@ return $this; }); -expect()->extend('toBeCorrectTendencyGuess', function (float $boost = null) { +expect()->extend('toBeCorrectTendencyGuess', function (?float $boost = null) { $expectedPoints = (float) (new DefaultCalculationModel())->getPointsForTendency(); $expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints; @@ -75,7 +75,7 @@ return $this; }); -expect()->extend('toBeDrawGapGuess', function (float $boost = null) { +expect()->extend('toBeDrawGapGuess', function (?float $boost = null) { $expectedPoints = (float) (new DefaultCalculationModel())->getPointsForDrawGap(); $expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;