Skip to content

Commit

Permalink
add php8.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jlabno committed Jun 24, 2022
1 parent 433bcb1 commit abac4b2
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ jobs:
run: make test-php7.4

- name: Run test suite php8.0
run: make test-php8.0
run: make test-php8.0

- name: Run test suite php8.1
run: make test-php8.1
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ test-php7.4: ## run tests
test-php8.0: ## run tests
docker-compose run --rm -T php-8.0 composer update
docker-compose run --rm -T php-8.0 php vendor/bin/phpunit --configuration phpunit.dist.xml

test-php8.1: ## run tests
docker-compose run --rm -T php-8.1 composer update
docker-compose run --rm -T php-8.1 php vendor/bin/phpunit --configuration phpunit.dist.xml
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php": "^7.4||^8.0",
"php": "^7.4||^8.0||^8.1",
"doctrine/annotations": "^1.13",
"psr/simple-cache": "^1.0",
"symfony/cache": "^5.4",
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ services:
context: .
volumes:
- .:/app

php-8.1:
build:
dockerfile: php8.1.Dockerfile
context: .
volumes:
- .:/app
21 changes: 21 additions & 0 deletions php8.1.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM composer:latest as composer
FROM php:8.1-cli-alpine

RUN apk update && \
apk upgrade && \
apk add --no-cache \
autoconf \
g++ \
make

RUN pecl install xdebug-3.1.0 apcu && \
pecl clear-cache && \
docker-php-ext-enable xdebug

COPY build/php.ini /usr/local/etc/php/

COPY --from=composer /usr/bin/composer /usr/bin/composer

COPY . /app

WORKDIR /app
2 changes: 1 addition & 1 deletion php8.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM composer:latest as composer
FROM php:8.0-cli-alpine
FROM php:8.1-cli-alpine

RUN apk update && \
apk upgrade && \
Expand Down

0 comments on commit abac4b2

Please sign in to comment.