From 7fff5316543dfa47295373eca5fc3e5ceb0ec009 Mon Sep 17 00:00:00 2001 From: Marcus Winkler Date: Mon, 6 Feb 2023 11:30:17 +0100 Subject: [PATCH 1/3] Allow installation with PHP 8.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0cdeed9..e7ad172 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "sort-packages": true }, "require": { - "php": "8.0.*|8.1.*" + "php": "8.0.*|8.1.*|8.2.*" }, "require-dev": { "phpunit/phpunit": "^9.5" From 8a6a265e84716b94e565a32d6b225668d281c3dd Mon Sep 17 00:00:00 2001 From: Marcus Winkler Date: Mon, 6 Feb 2023 11:42:21 +0100 Subject: [PATCH 2/3] Test on PHP 8.2 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cd7e13..f20dfd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,9 @@ jobs: - uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' - - uses: "ramsey/composer-install@v1" + - uses: "ramsey/composer-install@v2" - run: composer require --dev phpstan/phpstan @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.0', '8.1'] + php: ['8.0', '8.1', '8.2'] name: PHP ${{ matrix.php }} tests steps: - uses: actions/checkout@v2 @@ -35,7 +35,7 @@ jobs: - run: ./travisci/bin/start.sh - - uses: "ramsey/composer-install@v1" + - uses: "ramsey/composer-install@v2" - run: | ./travisci/bin/logs.sh From a977e8ed103c45a171e79b5e989c9a61198c3bf7 Mon Sep 17 00:00:00 2001 From: Marcus Winkler Date: Mon, 6 Feb 2023 12:47:42 +0100 Subject: [PATCH 3/3] Add phpstan baseline --- phpstan-baseline.neon | 31 +++++++++++++++++++++++++++++++ phpstan.neon | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 phpstan-baseline.neon diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..ecd1d7b --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,31 @@ +parameters: + ignoreErrors: + - + message: "#^Offset 'message' on array\\{type\\: int, message\\: string, file\\: string, line\\: int\\} in isset\\(\\) always exists and is not nullable\\.$#" + count: 1 + path: src/Network/Connection.php + + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: src/Network/Connection.php + + - + message: "#^Variable \\$read in empty\\(\\) always exists and is not falsy\\.$#" + count: 1 + path: src/Network/Connection.php + + - + message: "#^Comparison operation \"\\<\" between 0 and int\\<1, max\\> is always true\\.$#" + count: 1 + path: src/Transport/Parser.php + + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: src/Util/IdGenerator.php + + - + message: "#^Unsafe access to private property Stomp\\\\Util\\\\IdGenerator\\:\\:\\$generatedIds through static\\:\\:\\.$#" + count: 4 + path: src/Util/IdGenerator.php diff --git a/phpstan.neon b/phpstan.neon index 57020af..c51a2ac 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,3 +2,6 @@ parameters: level: 4 paths: - src/ + +includes: + - phpstan-baseline.neon