Skip to content

Commit

Permalink
Support PHP 8.3 and Rector 1.x and CI improvements (#13)
Browse files Browse the repository at this point in the history
* feat: support Rector 1.x

* ci: bump actions
  • Loading branch information
zeriyoshi authored Mar 26, 2024
1 parent 91f8d5f commit d148916
Show file tree
Hide file tree
Showing 17 changed files with 161 additions and 160 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ updates:
schedule:
interval: "weekly"
day: "saturday"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
13 changes: 5 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,26 @@ jobs:
arch: ["arm64v8", "amd64"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Setup Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build Container
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
build-args: ARCH=${{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: ./build/ubuntu2204/Dockerfile
load: true
tags: "pskel-build-ubuntu2204-${{ matrix.arch }}"
- name: Build Extension with Container
run: |
mkdir "artifacts"
docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "pskel-build-ubuntu2204-${{ matrix.arch }}"
- name: Upload deb Packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ubuntu_2204_debs
path: artifacts/
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
version: ["7.4", "8.0", "8.1", "8.2"]
version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64,s390x"
- name: Setup Buildx
Expand Down
1 change: 0 additions & 1 deletion .idea/php-colopl_bc.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
}
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6.13",
"phpstan/phpstan": "^1.10.39",
"vimeo/psalm": "^5.15",
"phpstan/phpstan-phpunit": "^1.3.15",
"psalm/plugin-phpunit": "^0.18.4",
"php-cs-fixer/shim": "^3.35.1",
"rector/rector": "^0.18.5"
"phpunit/phpunit": "^9.6.18",
"phpstan/phpstan": "^1.10.65",
"vimeo/psalm": "^5.23.1",
"phpstan/phpstan-phpunit": "^1.3.16",
"psalm/plugin-phpunit": "^0.19",
"php-cs-fixer/shim": "^3.52.1",
"rector/rector": "^1.0.3"
},
"license": "PHP-3.01",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion ext/php_colopl_bc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern zend_module_entry colopl_bc_module_entry;
#define COLOPL_BC_PHP74_SORT_MODE_DEPRECATED 1
#define COLOPL_BC_PHP74_SORT_MODE_LOG 2

#define PHP_COLOPL_BC_VERSION "10.1.0"
#define PHP_COLOPL_BC_VERSION "11.0.0"

ZEND_BEGIN_MODULE_GLOBALS(colopl_bc)
bool rand_is_seeded;
Expand Down
251 changes: 123 additions & 128 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,161 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<files psalm-version="5.23.1@8471a896ccea3526b26d082f4461eeea467f10a4">
<file src="library.php">
<LessSpecificReturnType>
<code>array-key|false|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code>bool|null</code>
<code><![CDATA[array-key|false|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
<code><![CDATA[bool|null]]></code>
</LessSpecificReturnType>
</file>
<file src="tests/Extension/PHP70Test.php">
<UnusedFunctionCall>
<code>\Colopl\ColoplBc\Php70\mt_srand</code>
<code>\Colopl\ColoplBc\Php70\mt_srand</code>
<code>\Colopl\ColoplBc\Php70\mt_srand</code>
<code>\Colopl\ColoplBc\Php70\srand</code>
<code>\Colopl\ColoplBc\Php70\srand</code>
<code>\Colopl\ColoplBc\Php70\srand</code>
<code>\Colopl\ColoplBc\Php70\srand</code>
<code>\Colopl\ColoplBc\Php70\srand</code>
<code><![CDATA[\Colopl\ColoplBc\Php70\mt_srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\mt_srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\mt_srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\srand]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php70\srand]]></code>
</UnusedFunctionCall>
</file>
<file src="tests/Extension/PHP74Test.php">
<DeprecatedFunction>
<code><![CDATA[\Colopl\ColoplBc\Php74\array_keys(['first' => 0, 'second' => ''], '')]]></code>
<code>\Colopl\ColoplBc\Php74\array_multisort($ary1, $ary2)</code>
<code><![CDATA[\Colopl\ColoplBc\Php74\array_multisort($ary1, $ary2)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\array_search('', ['first' => 0, 'second' => ''])]]></code>
<code>\Colopl\ColoplBc\Php74\arsort($array)</code>
<code>\Colopl\ColoplBc\Php74\asort($array)</code>
<code><![CDATA[\Colopl\ColoplBc\Php74\arsort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\asort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\eq(0, '')]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\gt('a', 0)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\gte(0, '')]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\in_array('', [0])]]></code>
<code>\Colopl\ColoplBc\Php74\krsort($array)</code>
<code>\Colopl\ColoplBc\Php74\ksort($array)</code>
<code><![CDATA[\Colopl\ColoplBc\Php74\krsort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\ksort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\lt(0, 'a')]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\lte(0, '')]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\neq(0, '')]]></code>
<code>\Colopl\ColoplBc\Php74\rsort($array)</code>
<code>\Colopl\ColoplBc\Php74\sort($array)</code>
<code><![CDATA[\Colopl\ColoplBc\Php74\rsort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\sort($array)]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\spaceship('', 0)]]></code>
<code>\Colopl\ColoplBc\Php74\uasort($array, function (int $_left, int $_right): int {
<code><![CDATA[\Colopl\ColoplBc\Php74\uasort($array, function (int $_left, int $_right): int {
return 0;
})</code>
<code>\Colopl\ColoplBc\Php74\uksort($array, function (int $_left, int $_right): int {
})]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\uksort($array, function (int $_left, int $_right): int {
return 0;
})</code>
<code>\Colopl\ColoplBc\Php74\usort($array, function (int $_left, int $_right): int {
})]]></code>
<code><![CDATA[\Colopl\ColoplBc\Php74\usort($array, function (int $_left, int $_right): int {
return 0;
})</code>
})]]></code>
</DeprecatedFunction>
</file>
<file src="tests/Rector/AbstractSimpleRectorTestCase.php">
<MixedInferredReturnType>
<code>Iterator</code>
</MixedInferredReturnType>
</file>
<file src="vendor/rector/rector/src/Rector/AbstractRector.php">
<LessSpecificImplementedReturnType>
<code>mixed[]|int|\PhpParser\Node|null</code>
<code><![CDATA[mixed[]|int|\PhpParser\Node|null]]></code>
</LessSpecificImplementedReturnType>
<MissingConstructor>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$file</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeComparator</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeFactory</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeNameResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$nodeTypeResolver</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code>$skipper</code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$file]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeComparator]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeFactory]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeNameResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$nodeTypeResolver]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
<code><![CDATA[$skipper]]></code>
</MissingConstructor>
</file>
</files>
2 changes: 1 addition & 1 deletion src/Rector/AbstractBinaryOpRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Variable;
use Rector\Core\Rector\AbstractRector;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\Exception\PoorDocumentationException;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down
Loading

0 comments on commit d148916

Please sign in to comment.