Skip to content

Commit 18a98ca

Browse files
authored
Merge pull request #207 from clue-labs/php8.2
Update documentation and container images to PHP 8.2
2 parents a477f66 + 0da8fe1 commit 18a98ca

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
- uses: actions/checkout@v3
9292
- uses: shivammathur/setup-php@v2
9393
with:
94-
php-version: 8.1
94+
php-version: 8.2
9595
- run: composer install -d tests/install-as-dep/
9696
- run: docker build -f tests/${{ matrix.dockerfile }} tests/install-as-dep/
9797
- run: docker run -d -p 8080:8080 -v "$PWD/examples/index.php":/app/public/index.php -v "$PWD/composer.json":/app/composer.json -v "$PWD/LICENSE":/app/LICENSE -v "$PWD/tests/":/app/tests/ $(docker images -q | head -n1)
@@ -107,7 +107,7 @@ jobs:
107107
strategy:
108108
matrix:
109109
php:
110-
- 8.2-rc
110+
- 8.2
111111
- 8.1
112112
- 8.0
113113
- 7.4
@@ -131,7 +131,7 @@ jobs:
131131
strategy:
132132
matrix:
133133
php:
134-
- 8.2-rc
134+
- 8.2
135135
- 8.1
136136
- 8.0
137137
- 7.4

docs/best-practices/deployment.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ If you're not already running an Apache server, you can run your X project with
220220
Apache in a temporary Docker container like this:
221221

222222
```bash
223-
$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.1-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
223+
$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.2-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
224224
```
225225

226226
In order to check your web application responds as expected, you can use your
@@ -304,10 +304,10 @@ limit to match your concurrency workload. On Ubuntu- or Debian-based systems,
304304
you may change your PHP configuration like this:
305305

306306
```bash
307-
$ sudoedit /etc/php/8.1/cli/php.ini
307+
$ sudoedit /etc/php/8.2/cli/php.ini
308308
```
309309

310-
```diff title="/etc/php/8.1/cli/php.ini"
310+
```diff title="/etc/php/8.2/cli/php.ini"
311311
- memory_limit = 128M
312312
+ memory_limit = -1
313313
```
@@ -519,7 +519,7 @@ be achieved by using a `Dockerfile` with the following contents:
519519

520520
```docker title="Dockerfile"
521521
# syntax=docker/dockerfile:1
522-
FROM php:8.1-cli
522+
FROM php:8.2-cli
523523

524524
WORKDIR /app/
525525
COPY public/ public/
@@ -541,14 +541,14 @@ be achieved by using a `Dockerfile` with the following contents:
541541
COPY composer.json composer.lock ./
542542
RUN composer install --no-dev --ignore-platform-reqs --optimize-autoloader
543543

544-
FROM php:8.1-alpine
544+
FROM php:8.2-alpine
545545

546546
# recommended: install optional extensions ext-ev and ext-sockets
547-
RUN apk --no-cache add ${PHPIZE_DEPS} libev \
547+
RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \
548548
&& pecl install ev \
549549
&& docker-php-ext-enable ev \
550550
&& docker-php-ext-install sockets \
551-
&& apk del ${PHPIZE_DEPS} \
551+
&& apk del ${PHPIZE_DEPS} linux-headers \
552552
&& echo "memory_limit = -1" >> "$PHP_INI_DIR/conf.d/acme.ini"
553553

554554
WORKDIR /app/

tests/Dockerfile-basics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM php:8.1-cli
2+
FROM php:8.2-cli
33

44
WORKDIR /app/
55
COPY public/ public/

tests/Dockerfile-production

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ COPY composer.json composer.lock ./
88
# dev environment already has dependencies installed:
99
COPY vendor/ vendor/
1010

11-
FROM php:8.1-alpine
11+
FROM php:8.2-alpine
1212

1313
# recommended: install optional extensions ext-ev and ext-sockets
14-
RUN apk --no-cache add ${PHPIZE_DEPS} libev \
14+
RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \
1515
&& pecl install ev \
1616
&& docker-php-ext-enable ev \
1717
&& docker-php-ext-install sockets \
18-
&& apk del ${PHPIZE_DEPS} \
18+
&& apk del ${PHPIZE_DEPS} linux-headers \
1919
&& echo "memory_limit = -1" >> "$PHP_INI_DIR/conf.d/acme.ini"
2020

2121
WORKDIR /app/

0 commit comments

Comments
 (0)