Skip to content

Commit 11cdb81

Browse files
committed
Upgrade code to php 8.1
Drop support for php 7.4 and 8.0.
1 parent 5112cf3 commit 11cdb81

File tree

104 files changed

+874
-1192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+874
-1192
lines changed

.github/workflows/integrate.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@ name: "Integrate"
55
on: # yamllint disable-line rule:truthy
66
push:
77
branches:
8-
- "5.x"
8+
- "6.x"
99
pull_request: null
1010
# Allow manually triggering the workflow.
1111
workflow_dispatch: null
1212

1313
jobs:
1414
code-coverage:
1515
name: "Code Coverage"
16-
uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@v0.4.0"
16+
uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@v0.5.0"
1717

1818
coding-standards:
1919
name: "Coding Standards"
20-
uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.4.0"
20+
uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.5.0"
2121

2222
dependency-analysis:
2323
name: "Dependency analysis"
24-
uses: "phpDocumentor/.github/.github/workflows/dependency-analysis.yml@v0.4.0"
24+
uses: "phpDocumentor/.github/.github/workflows/dependency-analysis.yml@v0.5.0"
2525

2626
lint-root:
2727
name: "Lint root"
28-
uses: "phpDocumentor/.github/.github/workflows/lint.yml@v0.4.0"
28+
uses: "phpDocumentor/.github/.github/workflows/lint.yml@v0.5.0"
2929
with:
3030
composer-options: "--no-check-publish --ansi"
3131

3232
static-analysis:
3333
name: "Static analysis"
34-
uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.4.0"
34+
uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.5.0"
3535
with:
3636
php-extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, pcntl, posix"
3737

3838
unit-tests:
3939
name: "Unit test"
40-
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.4.0"
40+
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.5.0"
4141

4242
integration-tests:
4343
name: "Integration test"
44-
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.4.0"
44+
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.5.0"
4545
needs: "unit-tests"
4646
with:
4747
test-suite: "integration"

Makefile

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,44 @@ help: ## Displays this list of targets with descriptions
44

55
.PHONY: code-style
66
code-style:
7-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -d memory_limit=1024M -s
7+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpcs
88

99
.PHONY: fix-code-style
1010
fix-code-style:
11-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf
11+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpcbf
1212

1313
.PHONY: static-code-analysis
1414
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm
15-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpstan --configuration=phpstan.neon
16-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/psalm
15+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpstan --configuration=phpstan.neon
16+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/psalm
1717

1818
.PHONY: test
1919
test: test-unit test-functional ## Runs all test suites with phpunit/phpunit
20-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit
20+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpunit
2121

2222
.PHONY: test-unit
2323
test-unit: ## Runs unit tests with phpunit/phpunit
24-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit --testsuite=unit
24+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpunit --testsuite=unit
2525

2626
.PHONY: test-functional
2727
test-functional: ## Runs unit tests with phpunit/phpunit
28-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit --testsuite=functional
28+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpunit --testsuite=functional
2929

3030
.PHONY: dependency-analysis
3131
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
32-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json
32+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json
3333

3434
vendor: composer.json composer.lock
3535
composer validate --no-check-publish
3636
composer install --no-interaction --no-progress
3737

3838
.PHONY: benchmark
3939
benchmark:
40-
docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:7.4-cli tools/phpbench run
40+
docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:8.1-cli tools/phpbench run
4141

4242
.PHONY: rector
4343
rector: ## Refactor code using rector
44-
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/rector process
44+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/rector process
4545

4646
.PHONY: pre-commit-test
4747
pre-commit-test: fix-code-style test code-style static-code-analysis

composer.json

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
},
2121
"require": {
22-
"php": "^7.4|8.0.*|8.1.*|8.2.*|8.3.*",
22+
"php": "8.1.*|8.2.*|8.3.*",
2323
"nikic/php-parser": "~4.14",
2424
"phpdocumentor/reflection-common": "^2.1",
2525
"phpdocumentor/reflection-docblock": "^5",
@@ -28,6 +28,8 @@
2828
"webmozart/assert": "^1.7"
2929
},
3030
"require-dev": {
31+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
32+
"doctrine/coding-standard": "^12.0",
3133
"mikey179/vfsstream": "~1.2",
3234
"mockery/mockery": "~1.6.0",
3335
"phpspec/prophecy-phpunit": "^2.0",
@@ -37,6 +39,7 @@
3739
"phpstan/phpstan-webmozart-assert": "^1.2",
3840
"phpunit/phpunit": "^9.5",
3941
"rector/rector": "^0.18.0",
42+
"squizlabs/php_codesniffer": "^3.8",
4043
"vimeo/psalm": "^5.0"
4144
},
4245
"config": {
@@ -45,15 +48,17 @@
4548
},
4649
"sort-packages": true,
4750
"platform": {
48-
"php": "7.4.0"
51+
"php": "8.1.0"
4952
},
5053
"allow-plugins": {
51-
"phpstan/extension-installer": true
54+
"phpstan/extension-installer": true,
55+
"dealerdirect/phpcodesniffer-composer-installer": true
5256
}
5357
},
5458
"extra": {
5559
"branch-alias": {
56-
"dev-5.x": "5.3.x-dev"
60+
"dev-5.x": "5.3.x-dev",
61+
"dev-6.x": "6.0.x-dev"
5762
}
5863
}
5964
}

0 commit comments

Comments
 (0)