Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation and container images to PHP 8.2 #207

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
- run: composer install -d tests/install-as-dep/
- run: docker build -f tests/${{ matrix.dockerfile }} tests/install-as-dep/
- 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)
Expand All @@ -107,7 +107,7 @@ jobs:
strategy:
matrix:
php:
- 8.2-rc
- 8.2
- 8.1
- 8.0
- 7.4
Expand All @@ -131,7 +131,7 @@ jobs:
strategy:
matrix:
php:
- 8.2-rc
- 8.2
- 8.1
- 8.0
- 7.4
Expand Down
14 changes: 7 additions & 7 deletions docs/best-practices/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ If you're not already running an Apache server, you can run your X project with
Apache in a temporary Docker container like this:

```bash
$ 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"
$ 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"
```

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

```bash
$ sudoedit /etc/php/8.1/cli/php.ini
$ sudoedit /etc/php/8.2/cli/php.ini
```

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

```docker title="Dockerfile"
# syntax=docker/dockerfile:1
FROM php:8.1-cli
FROM php:8.2-cli

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

FROM php:8.1-alpine
FROM php:8.2-alpine

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

WORKDIR /app/
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile-basics
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM php:8.1-cli
FROM php:8.2-cli

WORKDIR /app/
COPY public/ public/
Expand Down
6 changes: 3 additions & 3 deletions tests/Dockerfile-production
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ COPY composer.json composer.lock ./
# dev environment already has dependencies installed:
COPY vendor/ vendor/

FROM php:8.1-alpine
FROM php:8.2-alpine

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

WORKDIR /app/
Expand Down