瀏覽代碼

Drop PHP8.1 support

Bubka 1 年之前
父節點
當前提交
243313bda0
共有 7 個文件被更改,包括 30 次插入31 次删除
  1. 0 1
      .travis.yml
  2. 15 15
      Dockerfile
  3. 1 1
      README.md
  4. 2 2
      docker/README.md
  5. 1 1
      docker/entrypoint.sh
  6. 1 1
      docker/supervisord.conf
  7. 10 10
      docs/debian-setup.md

+ 0 - 1
.travis.yml

@@ -6,7 +6,6 @@ env:
 language: php
 
 php:
-  - 8.1
   - 8.2
   - 8.3
 

+ 15 - 15
Dockerfile

@@ -1,8 +1,8 @@
 ARG BUILDPLATFORM=linux/amd64
 ARG TARGETPLATFORM
-ARG ALPINE_VERSION=3.17
-ARG PHP_VERSION=8.1-alpine${ALPINE_VERSION}
-ARG COMPOSER_VERSION=2.3
+ARG ALPINE_VERSION=3.19
+ARG PHP_VERSION=8.2-alpine${ALPINE_VERSION}
+ARG COMPOSER_VERSION=2.7
 ARG SUPERVISORD_VERSION=v0.7.3
 
 ARG UID=1000
@@ -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
-    php81 \
+    php82 \
     # Composer dependencies
-    php81-phar \
+    php82-phar \
     # PHP SQLite, MySQL/MariaDB & Postgres drivers
-    php81-pdo_sqlite php81-sqlite3 php81-pdo_mysql php81-pdo_pgsql php81-pgsql \
+    php82-pdo_sqlite php82-sqlite3 php82-pdo_mysql php82-pdo_pgsql php82-pgsql \
     # PHP extensions
-    php81-xml php81-gd php81-mbstring php81-tokenizer php81-fileinfo php81-bcmath php81-ctype php81-dom \
+    php82-xml php82-gd php82-mbstring php82-tokenizer php82-fileinfo php82-bcmath php82-ctype php82-dom \
     # Runtime dependencies
-    php81-session php81-openssl \
+    php82-session php82-openssl \
     # Nginx and PHP FPM to serve over HTTP
-    php81-fpm nginx
+    php82-fpm nginx
 
 # PHP FPM configuration
 # Change username and ownership in php-fpm pool config
-RUN sed -i '/user = nobody/d' /etc/php81/php-fpm.d/www.conf && \
-    sed -i '/group = nobody/d' /etc/php81/php-fpm.d/www.conf && \
-    sed -i '/listen.owner/d' /etc/php81/php-fpm.d/www.conf && \
-    sed -i '/listen.group/d' /etc/php81/php-fpm.d/www.conf
+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
 # Pre-create files with the correct permissions
 RUN mkdir /run/php && \
-    chown ${UID}:${GID} /run/php /var/log/php81 && \
-    chmod 700 /run/php /var/log/php81
+    chown ${UID}:${GID} /run/php /var/log/php82 && \
+    chmod 700 /run/php /var/log/php82
 
 # NGINX
 # Clean up

+ 1 - 1
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.1-red.svg?style=flat-square)](https://secure.php.net/downloads.php)
+* [![Requires PHP8](https://img.shields.io/badge/php-^8.2-red.svg?style=flat-square)](https://secure.php.net/downloads.php)
 * See [Laravel server requirements](https://laravel.com/docs/7.x/installation#server-requirements)
 * Any database [supported by Laravel](https://laravel.com/docs/7.x/database)
 

+ 2 - 2
docker/README.md

@@ -102,8 +102,8 @@ There are the following build arguments you can use to customize the image using
 | `UID` | 1000 | The UID of the user to run the container as |
 | `GID` | 1000 | The GID of the user to run the container as |
 | `DEBIAN_VERSION` | `buster-slim` | The Debian version to use |
-| `PHP_VERSION` | `8.1-buster` | The PHP version to use to get composer dependencies |
-| `COMPOSER_VERSION` | `2.3` | The version of composer to use |
+| `PHP_VERSION` | `8.2-buster` | The PHP version to use to get composer dependencies |
+| `COMPOSER_VERSION` | `2.7` | The version of composer to use |
 | `SUPERVISORD_VERSION` | `v0.7.3` | The version of supervisord to use |
 | `VERSION` | `unknown` | The version of the image |
 | `CREATED` | `an unknown date` | The date of the image build time |

+ 1 - 1
docker/entrypoint.sh

@@ -6,7 +6,7 @@ echo "Running version ${VERSION} commit ${COMMIT} built on ${CREATED}"
 
 # Show versions
 echo "supervisord version: $(supervisord version)"
-php-fpm81 -v | head -n 1
+php-fpm82 -v | head -n 1
 nginx -v
 
 # Database creation

+ 1 - 1
docker/supervisord.conf

@@ -12,7 +12,7 @@ autorestart=false
 startretries=0
 
 [program:php-fpm]
-command=/usr/sbin/php-fpm81 -F
+command=/usr/sbin/php-fpm82 -F
 
 [program:nginx]
 command=/usr/sbin/nginx -g 'daemon off;'

+ 10 - 10
docs/debian-setup.md

@@ -4,7 +4,7 @@ This applies to Debian Buster, but similar instructions should apply for other D
 
 ## What we will do
 
-- We will use PHP 8.1
+- We will use PHP 8.2
 - We will use version v4.0.0 of 2fauth
 - We will setup to use an Sqlite database
 - We will use Nginx and PHP-FPM to serve our site on port `8000`
@@ -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.1 \
-    php8.1-sqlite3 php8.1-mysql \
-    php-xml php8.1-gd php8.1-mbstring \
+    php8.2 \
+    php8.2-sqlite3 php8.2-mysql \
+    php-xml php8.2-gd php8.2-mbstring \
     unzip wget ca-certificates \
-    php8.1-fpm nginx
+    php8.2-fpm nginx
     ```
 
 ## Download the code
@@ -71,7 +71,7 @@ http {
       error_page 404 /index.php;
 
       location ~ \.php$ {
-          fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
+          fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
           fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
           include fastcgi_params;
       }
@@ -129,7 +129,7 @@ chmod 500 /usr/local/bin/composer
     startretries=0
 
     [program:php-fpm]
-    command=/usr/sbin/php-fpm8.1 -F
+    command=/usr/sbin/php-fpm8.2 -F
 
     [program:nginx]
     command=/usr/sbin/nginx -g 'daemon off;'
@@ -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.1-fpm.log
+    touch /run/nginx.pid /var/log/php8.2-fpm.log
     chown -R www-data \
-      /var/log/php8.1-fpm.log \
+      /var/log/php8.2-fpm.log \
       /run/nginx.pid \
       /run/php \
       /www/data/.composer
     chmod 700 /run/php /www/data/.composer
-    chmod 600 /var/log/php8.1-fpm.log
+    chmod 600 /var/log/php8.2-fpm.log
     ```
 
 ## Change user