Skip to content

Commit 2ddab56

Browse files
committed
Test against PHP 8.3
1 parent 4d5b3e4 commit 2ddab56

File tree

9 files changed

+38
-18
lines changed

9 files changed

+38
-18
lines changed

.github/workflows/code-style.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66

77
jobs:
88
phpcs:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
- name: Install PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
1616
coverage: none
17-
php-version: "8.0"
17+
php-version: "8.3"
1818
ini-values: memory_limit=-1
1919
tools: phpcs, cs2pr
2020
- name: Run PHP Code Sniffer

.github/workflows/static-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ on:
77
jobs:
88
phpstan:
99
name: phpstan
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Install PHP
1515
uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: "8.1"
17+
php-version: "8.3"
1818
ini-values: memory_limit=-1
1919
tools: composer:v2
2020
- name: Cache dependencies
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: |
2424
~/.composer/cache

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ on:
77
jobs:
88
phpunit:
99
name: phpunit
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
1313
php-version:
1414
- "8.1"
1515
- "8.2"
16+
- "8.3"
1617
steps:
1718
- name: Checkout
18-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
1920
- name: Install PHP
2021
uses: shivammathur/setup-php@v2
2122
with:
@@ -24,7 +25,7 @@ jobs:
2425
ini-values: memory_limit=-1
2526
tools: composer:v2
2627
- name: Cache dependencies
27-
uses: actions/cache@v2
28+
uses: actions/cache@v4
2829
with:
2930
path: |
3031
~/.composer/cache
@@ -39,7 +40,7 @@ jobs:
3940
run: make test-coveralls
4041

4142
- name: Upload code coverage
42-
if: ${{ matrix.php-version == '8.1' }}
43+
if: ${{ matrix.php-version == '8.3' }}
4344
env:
4445
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4546
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG PHP_VERSION
2-
FROM php:${PHP_VERSION}-cli-buster
2+
FROM php:${PHP_VERSION}-cli-bookworm
33

44
RUN apt-get update && \
55
apt-get install -y autoconf pkg-config && \

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ test-container-81:
3434

3535
.PHONY: test-container-82
3636
test-container-82:
37-
@-docker-compose run --rm app81 bash
37+
@-docker-compose run --rm app82 bash
38+
@docker-compose down -v
39+
40+
.PHONY: test-container-83
41+
test-container-83:
42+
@-docker-compose run --rm app83 bash
3843
@docker-compose down -v
3944

4045
.PHONY: lint

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"phpstan/phpstan": "^1.10",
28-
"phpunit/phpunit": "^10.3",
28+
"phpunit/phpunit": "^10.5",
2929
"symfony/config": "^6.3"
3030
},
3131
"autoload": {

docker-compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ services:
2121
volumes:
2222
- .:/app:delegated
2323
- ~/.composer:/root/.composer:delegated
24+
app83:
25+
build:
26+
context: .
27+
args:
28+
PHP_VERSION: "8.3"
29+
environment:
30+
PHP_IDE_CONFIG: "serverName=symfony-di-proxy"
31+
volumes:
32+
- .:/app:delegated
33+
- ~/.composer:/root/.composer:delegated

lib/MethodRenderer.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,13 @@ function (ReflectionParameter $parameter) {
106106
private function renderType(ReflectionType $type): string
107107
{
108108
if ($type instanceof ReflectionUnionType) {
109-
return implode('|', array_map(function (ReflectionNamedType $namedType) {
110-
return $namedType->getName();
111-
}, $type->getTypes()));
109+
return implode(
110+
'|',
111+
array_map(
112+
fn(ReflectionNamedType $namedType) => $namedType->getName(), // @phpstan-ignore-line
113+
$type->getTypes()
114+
)
115+
);
112116
}
113117

114118
assert($type instanceof ReflectionNamedType);

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
44
colors="true"
55
bootstrap="tests/bootstrap.php"
66
>

0 commit comments

Comments
 (0)