Skip to content

Commit

Permalink
Merge pull request #377 from php-vcr/php_82
Browse files Browse the repository at this point in the history
PHP 8.2 compatibility
  • Loading branch information
higidi committed Sep 4, 2023
2 parents e7f32c4 + c9f681b commit 376dd9c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/continuous integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
php:
- "8.0"
- "8.1"
- "8.2"
dependencies:
- "lowest"
- "highest"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "^8,<8.2",
"php": "^8,<8.2|>=8.2.9,<8.3",
"ext-curl": "*",
"beberlei/assert": "^3.2.5",
"symfony/yaml": "^3|^4|^5|^6",
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ services:
volumes:
- .:/var/www/html
- ~/.composer:/home/user/.composer
workspace82:
tty: true
build:
context: resources/docker/workspace/8.2
args:
PUID: "${PUID:-1000}"
PGID: "${PGID:-1000}"
volumes:
- .:/var/www/html
- ~/.composer:/home/user/.composer
40 changes: 40 additions & 0 deletions resources/docker/workspace/8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM php:8.2-cli-alpine

ARG PUID=1000
ARG PGID=1000

RUN apk add --no-cache --virtual .build-deps \
# for extensions
$PHPIZE_DEPS \
# for soap
libxml2-dev \
# for xdebug \
linux-headers \
&& \
apk add --no-cache \
bash \
# for soap
libxml2 \
# for composer
unzip \
&& \
docker-php-ext-install soap \
&& \
pecl install \
# pcov for coverage runs
pcov && docker-php-ext-enable pcov \
&& \
# for debugging
pecl install xdebug && docker-php-ext-enable xdebug \
&& \
apk del .build-deps

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

WORKDIR /var/www/html

# Add a non-root user to prevent files being created with root permissions on host machine.
RUN addgroup -g ${PGID} user && \
adduser -u ${PUID} -G user -D user

USER user

0 comments on commit 376dd9c

Please sign in to comment.