From c310049907f156f6e469cb240f2c981f48f04a48 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:19:00 +0100 Subject: [PATCH] Move to php83 as php82 active support ended late 2024 --- .travis.yml | 2 +- Dockerfile | 28 ++++++++++++++-------------- README.md | 2 +- composer.json | 2 +- docs/debian-setup.md | 16 ++++++++-------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17d4525d..075dd842 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ env: language: php php: - - 8.2 - 8.3 + - 8.4 services: - mysql diff --git a/Dockerfile b/Dockerfile index 7619506d..71a71841 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 ARG TARGETPLATFORM -ARG ALPINE_VERSION=3.19 -ARG PHP_VERSION=8.2-alpine${ALPINE_VERSION} +ARG ALPINE_VERSION=3.21 +ARG PHP_VERSION=8.3-alpine${ALPINE_VERSION} ARG COMPOSER_VERSION=2.7 ARG SUPERVISORD_VERSION=v0.7.3 @@ -46,28 +46,28 @@ COPY --from=supervisord --chown=${UID}:${GID} /bin /usr/local/bin/supervisord # Install PHP and PHP system dependencies RUN apk add --update --no-cache \ # PHP - php82 \ + php83 \ # Composer dependencies - php82-phar \ + php83-phar \ # PHP SQLite, MySQL/MariaDB & Postgres drivers - php82-pdo_sqlite php82-sqlite3 php82-pdo_mysql php82-pdo_pgsql php82-pgsql \ + php83-pdo_sqlite php83-sqlite3 php83-pdo_mysql php83-pdo_pgsql php83-pgsql \ # PHP extensions - php82-xml php82-gd php82-mbstring php82-tokenizer php82-fileinfo php82-bcmath php82-ctype php82-dom php-redis \ + php83-xml php83-gd php83-mbstring php83-tokenizer php83-fileinfo php83-bcmath php83-ctype php83-dom php-redis \ # Runtime dependencies - php82-session php82-openssl \ + php83-session php83-openssl \ # Nginx and PHP FPM to serve over HTTP - php82-fpm nginx + php83-fpm nginx # PHP FPM configuration # Change username and ownership in php-fpm pool config -RUN sed -i '/user = nobody/d' /etc/php82/php-fpm.d/www.conf && \ - sed -i '/group = nobody/d' /etc/php82/php-fpm.d/www.conf && \ - sed -i '/listen.owner/d' /etc/php82/php-fpm.d/www.conf && \ - sed -i '/listen.group/d' /etc/php82/php-fpm.d/www.conf +RUN sed -i '/user = nobody/d' /etc/php83/php-fpm.d/www.conf && \ + sed -i '/group = nobody/d' /etc/php83/php-fpm.d/www.conf && \ + sed -i '/listen.owner/d' /etc/php83/php-fpm.d/www.conf && \ + sed -i '/listen.group/d' /etc/php83/php-fpm.d/www.conf # Pre-create files with the correct permissions RUN mkdir /run/php && \ - chown ${UID}:${GID} /run/php /var/log/php82 && \ - chmod 700 /run/php /var/log/php82 + chown ${UID}:${GID} /run/php /var/log/php83 && \ + chmod 700 /run/php /var/log/php83 # NGINX # Clean up diff --git a/README.md b/README.md index 3821341a..4462a291 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Sensitive data stored in the database can be encrypted to protect them against d ## Requirements -* [![Requires PHP8](https://img.shields.io/badge/php-^8.2-red.svg?style=flat-square)](https://secure.php.net/downloads.php) +* [![Requires PHP8](https://img.shields.io/badge/php-^8.3-red.svg?style=flat-square)](https://secure.php.net/downloads.php) * See [Laravel server requirements](https://laravel.com/docs/installation#server-requirements) * Any database [supported by Laravel](https://laravel.com/docs/database) diff --git a/composer.json b/composer.json index 7d238369..9bd2c303 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "ext-bcmath": "*", "ext-ctype": "*", "ext-dom": "*", diff --git a/docs/debian-setup.md b/docs/debian-setup.md index aadbb299..90d97660 100644 --- a/docs/debian-setup.md +++ b/docs/debian-setup.md @@ -22,11 +22,11 @@ This applies to Debian Buster, but similar instructions should apply for other D ```bash apt-get install -y --no-install-recommends \ - php8.2 \ - php8.2-sqlite3 php8.2-mysql \ - php-xml php8.2-gd php8.2-mbstring \ + php8.3 \ + php8.3-sqlite3 php8.3-mysql \ + php-xml php8.3-gd php8.3-mbstring \ unzip wget ca-certificates \ - php8.2-fpm nginx + php8.3-fpm nginx ``` ## Download the code @@ -71,7 +71,7 @@ http { error_page 404 /index.php; location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } @@ -155,14 +155,14 @@ chmod 500 /usr/local/bin/composer ```bash mkdir -p /run/php /www/data/.composer - touch /run/nginx.pid /var/log/php8.2-fpm.log + touch /run/nginx.pid /var/log/php8.3-fpm.log chown -R www-data \ - /var/log/php8.2-fpm.log \ + /var/log/php8.3-fpm.log \ /run/nginx.pid \ /run/php \ /www/data/.composer chmod 700 /run/php /www/data/.composer - chmod 600 /var/log/php8.2-fpm.log + chmod 600 /var/log/php8.3-fpm.log ``` ## Change user