Skip to content

Commit 9304ab7

Browse files
Validate PHP 8.5 compatibility
1 parent 976591b commit 9304ab7

4 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/static.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Setup PHP
1818
uses: shivammathur/setup-php@v2
@@ -24,7 +24,7 @@ jobs:
2424
update: true
2525

2626
- name: Install Dependencies
27-
uses: nick-invision/retry@v3
27+
uses: nick-fields/retry@v3
2828
with:
2929
timeout_minutes: 5
3030
max_attempts: 5
@@ -35,11 +35,11 @@ jobs:
3535

3636
psalm:
3737
name: Psalm
38-
runs-on: ubuntu-22.04
38+
runs-on: ubuntu-24.04
3939

4040
steps:
4141
- name: Checkout code
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v6
4343

4444
- name: Setup PHP
4545
uses: shivammathur/setup-php@v2
@@ -51,7 +51,7 @@ jobs:
5151
update: true
5252

5353
- name: Install Dependencies
54-
uses: nick-invision/retry@v3
54+
uses: nick-fields/retry@v3
5555
with:
5656
timeout_minutes: 5
5757
max_attempts: 5

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
15+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1616

1717
steps:
1818
- name: Checkout Code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v6
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
@@ -31,7 +31,7 @@ jobs:
3131
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3232

3333
- name: Install Dependencies
34-
uses: nick-invision/retry@v3
34+
uses: nick-fields/retry@v3
3535
with:
3636
timeout_minutes: 5
3737
max_attempts: 5

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@
5050
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.1-tests -f hack/8.1.Dockerfile hack",
5151
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.2-tests -f hack/8.2.Dockerfile hack",
5252
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.3-tests -f hack/8.3.Dockerfile hack",
53-
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.4-tests -f hack/8.4.Dockerfile hack"
53+
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.4-tests -f hack/8.4.Dockerfile hack",
54+
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.5-tests -f hack/8.5.Dockerfile hack"
5455
],
5556
"tests-docker": [
5657
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:7.4-tests --coverage-html=coverage",
5758
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.0-tests",
5859
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.1-tests",
5960
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.2-tests",
6061
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.3-tests",
61-
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.4-tests"
62+
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.4-tests",
63+
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.5-tests"
6264
]
6365
},
6466
"scripts-descriptions": {

hack/8.5.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM php:8.5-alpine
2+
3+
LABEL org.opencontainers.image.url="https://github.com/cloudevents/sdk-php/tree/main/hack/8.5.Dockerfile" \
4+
org.opencontainers.image.documentation="https://github.com/cloudevents/sdk-php/tree/main/hack/README.md" \
5+
org.opencontainers.image.source="https://github.com/cloudevents/sdk-php" \
6+
org.opencontainers.image.vendor="CloudEvent" \
7+
org.opencontainers.image.title="PHP 8.5" \
8+
org.opencontainers.image.description="PHP 8.5 test environment for cloudevents/sdk-php"
9+
10+
COPY --chown=www-data:www-data install-composer /usr/local/bin/install-composer
11+
RUN chmod +x /usr/local/bin/install-composer \
12+
&& /usr/local/bin/install-composer \
13+
&& rm /usr/local/bin/install-composer
14+
15+
RUN apk update \
16+
&& apk --no-cache upgrade \
17+
&& apk add --no-cache bash ca-certificates git libzip-dev \
18+
&& rm -rf /var/www/html /tmp/pear \
19+
&& chown -R www-data:www-data /var/www
20+
21+
WORKDIR /var/www
22+
ENTRYPOINT ["/var/www/vendor/bin/phpunit"]

0 commit comments

Comments
 (0)