Skip to content

Commit f60d28e

Browse files
authored
Merge pull request #723 from mspirkov/support-new-types
Use `phpdocumentor/reflection-docblock` v6 and `phpdocumentor/type-resolver` v2
2 parents 4af448a + 6a1dab1 commit f60d28e

5 files changed

Lines changed: 124 additions & 57 deletions

File tree

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ 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 php:8.1-cli vendor/bin/phpcs
7+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-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 php:8.1-cli vendor/bin/phpcbf
11+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-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
@@ -17,31 +17,31 @@ static-code-analysis: #vendor ## Runs a static code analysis with phpstan/phpsta
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:8.1-cli vendor/bin/phpunit
20+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-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:8.1-cli vendor/bin/phpunit --testsuite=unit
24+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-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:8.1-cli vendor/bin/phpunit --testsuite=integration
28+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli vendor/bin/phpunit --testsuite=integration
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:8.1-cli .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.2-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:8.1-cli tools/phpbench run
40+
docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:8.2-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:8.1-cli vendor/bin/rector process
44+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
}
2525
},
2626
"require": {
27-
"php": "8.1.*|8.2.*|8.3.*|8.4.*|8.5.*",
27+
"php": "8.2.*|8.3.*|8.4.*|8.5.*",
2828
"composer-runtime-api": "^2",
2929
"nikic/php-parser": "~4.18 || ^5.0",
3030
"phpdocumentor/reflection-common": "^2.1",
31-
"phpdocumentor/reflection-docblock": "^5",
32-
"phpdocumentor/type-resolver": "^1.4",
31+
"phpdocumentor/reflection-docblock": "^6.0",
32+
"phpdocumentor/type-resolver": "^2.0",
3333
"symfony/polyfill-php80": "^1.28",
3434
"webmozart/assert": "^1.7"
3535
},
@@ -54,7 +54,7 @@
5454
},
5555
"sort-packages": true,
5656
"platform": {
57-
"php": "8.1.0"
57+
"php": "8.2.0"
5858
},
5959
"allow-plugins": {
6060
"phpstan/extension-installer": true,

composer.lock

Lines changed: 110 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<!-- Set the minimum PHP version for PHPCompatibility.
1111
This should be kept in sync with the requirements in the composer.json file. -->
12-
<config name="testVersion" value="8.1-"/>
12+
<config name="testVersion" value="8.2-"/>
1313

1414
<arg value="nps"/>
1515

tests/integration/PHP8/UnionTypesTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
use phpDocumentor\Reflection\Fqsen;
99
use phpDocumentor\Reflection\Php\Project;
1010
use phpDocumentor\Reflection\Php\ProjectFactory;
11-
use phpDocumentor\Reflection\Types\False_;
11+
use phpDocumentor\Reflection\PseudoTypes\False_;
1212
use phpDocumentor\Reflection\Types\Compound;
1313
use phpDocumentor\Reflection\Types\Integer;
14-
use phpDocumentor\Reflection\Types\Mixed_;
1514
use phpDocumentor\Reflection\Types\Null_;
1615
use phpDocumentor\Reflection\Types\Object_;
17-
use phpDocumentor\Reflection\Types\Static_;
1816
use phpDocumentor\Reflection\Types\String_;
1917
use PHPUnit\Framework\TestCase;
2018

0 commit comments

Comments
 (0)