Skip to content

Commit f2e22c6

Browse files
Support PHP 8.2 (#43)
1 parent d13515e commit f2e22c6

File tree

4 files changed

+34
-10
lines changed

4 files changed

+34
-10
lines changed

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

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

4040
steps:
4141
- name: Checkout code

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88
jobs:
99
tests:
1010
name: PHP ${{ matrix.php }}
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212

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

1717
steps:
1818
- name: Checkout Code

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
}
1919
},
2020
"require": {
21-
"php": "^7.4 || ^8.0",
21+
"php": "^7.4.15 || ^8.0.2",
2222
"ext-json": "*",
2323
"ext-pcre": "*",
24-
"symfony/polyfill-php80": "^1.17"
24+
"symfony/polyfill-php80": "^1.26"
2525
},
2626
"require-dev": {
27-
"guzzlehttp/psr7": "^2.0",
28-
"php-http/discovery": "^1.14",
29-
"phpunit/phpunit": "^9.5 || ^10.0",
27+
"guzzlehttp/psr7": "^2.4.3",
28+
"php-http/discovery": "^1.15.2",
29+
"phpunit/phpunit": "^9.6.3 || ^10.0.12",
3030
"psalm/phar": "5.7.6",
3131
"psr/http-factory": "^1.0.1",
3232
"psr/http-message": "^1.0.1",
@@ -47,12 +47,14 @@
4747
"tests-build": [
4848
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:7.4-tests -f hack/7.4.Dockerfile hack",
4949
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.0-tests -f hack/8.0.Dockerfile hack",
50-
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.1-tests -f hack/8.1.Dockerfile hack"
50+
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.1-tests -f hack/8.1.Dockerfile hack",
51+
"DOCKER_BUILDKIT=1 docker build -t cloudevents/sdk-php:8.2-tests -f hack/8.1.Dockerfile hack"
5152
],
5253
"tests-docker": [
5354
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:7.4-tests --coverage-html=coverage",
5455
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.0-tests",
55-
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.1-tests"
56+
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.1-tests",
57+
"docker run -it -v $(pwd):/var/www cloudevents/sdk-php:8.2-tests"
5658
]
5759
},
5860
"scripts-descriptions": {

hack/8.2.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM php:8.2-alpine
2+
3+
LABEL org.opencontainers.image.url="https://github.com/cloudevents/sdk-php/tree/main/hack/8.2.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.2" \
8+
org.opencontainers.image.description="PHP 8.2 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)