Skip to content

Commit

Permalink
Drop support for PHP 7 and add PHP 8.3
Browse files Browse the repository at this point in the history
CRC-Mismatch committed Oct 3, 2024
1 parent 07821f4 commit 6ea62e3
Showing 14 changed files with 87 additions and 667 deletions.
62 changes: 0 additions & 62 deletions .docker/PHP7.1.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .docker/PHP7.2.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .docker/PHP7.3.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .docker/PHP7.4.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .docker/PHP8.0.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .docker/PHP8.1.Dockerfile

This file was deleted.

62 changes: 62 additions & 0 deletions .docker/PHP8.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
ARG PHP_VERSION=8.3
FROM php:${PHP_VERSION}

RUN <<EOT
set -eux
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
DEBIAN_FRONTEND=noninteractive RUNLEVEL=1 apt-get upgrade -y -f --no-install-recommends
apt-get install --no-install-recommends --no-install-suggests -y \
gnupg \
gpg \
gpg-agent \
lsb-release \
wget
apt-get install --no-install-recommends --no-install-suggests -y \
ssh-client \
unzip \
procps \
vim-nox \
ca-certificates \
libmcrypt4 \
libmcrypt-dev \
libssl-dev \
libxml2-dev \
icu-devtools \
libicu-dev \
libxslt1-dev \
libxslt1.1 \
libcurl4-openssl-dev \
libzip4 \
libzip-dev \
git \
libpq-dev
docker-php-ext-install \
bcmath \
soap \
zip \
intl \
opcache \
xsl \
sockets \
pcntl
pecl install pcov xdebug
docker-php-ext-enable xdebug pcov
EOT

RUN <<EOT
set -eux
useradd -m -s /bin/bash -G www-data app
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --lts
apt-get update
apt-get install --no-install-recommends --no-install-suggests -y \
gettext-base
echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | tee /etc/apt/sources.list.d/symfony-cli.list
apt-get update && apt-get install symfony-cli
EOT
COPY config/php/php.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
COPY config/php/pcov.ini /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini
ARG PROJECT_PATH=/var/www/html
ENV PROJECT_PATH=${PROJECT_PATH}
WORKDIR $PROJECT_PATH
USER app
7 changes: 0 additions & 7 deletions .docker/config/php/php71.ini

This file was deleted.

64 changes: 12 additions & 52 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,15 @@
version: '3.5'

networks:
project_network:
driver: bridge
name: ${COMPOSE_PROJECT_NAME}_network

services:
php-cli-8.1:
build:
context: .
dockerfile: PHP8.1.Dockerfile
args:
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
- ../:/var/www/html
- ${SSH_AUTH_SOCK}:/ssh-agent
- ~/.config/composer:/home/app/.composer
environment:
- SSH_AUTH_SOCK=/ssh-agent
- PHP_MAX_EXECUTION_TIME=$PHP_CLI_MAX_EXECUTION_TIME
- PHP_MEMORY_LIMIT=$PHP_CLI_MEMORY_LIMIT
- PHP_POST_MAX_SIZE=$PHP_CLI_POST_MAX_SIZE
- PHP_UPLOAD_MAX_FILESIZE=$PHP_CLI_UPLOAD_MAX_FILESIZE
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- project_network
php-cli-8.0:
php-cli-8.3:
build:
context: .
dockerfile: PHP8.0.Dockerfile
dockerfile: PHP8.Dockerfile
args:
- PHP_VERSION=8.3
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
@@ -48,11 +26,12 @@ services:
- "host.docker.internal:host-gateway"
networks:
- project_network
php-cli-7.4:
php-cli-8.2:
build:
context: .
dockerfile: PHP7.4.Dockerfile
dockerfile: PHP8.Dockerfile
args:
- PHP_VERSION=8.2
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
@@ -69,32 +48,12 @@ services:
- "host.docker.internal:host-gateway"
networks:
- project_network
php-cli-7.3:
build:
context: .
dockerfile: PHP7.3.Dockerfile
args:
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
- ../:/var/www/html
- ${SSH_AUTH_SOCK}:/ssh-agent
- ~/.config/composer:/home/app/.composer
environment:
- SSH_AUTH_SOCK=/ssh-agent
- PHP_MAX_EXECUTION_TIME=$PHP_CLI_MAX_EXECUTION_TIME
- PHP_MEMORY_LIMIT=$PHP_CLI_MEMORY_LIMIT
- PHP_POST_MAX_SIZE=$PHP_CLI_POST_MAX_SIZE
- PHP_UPLOAD_MAX_FILESIZE=$PHP_CLI_UPLOAD_MAX_FILESIZE
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- project_network
php-cli-7.2:
php-cli-8.1:
build:
context: .
dockerfile: PHP7.2.Dockerfile
dockerfile: PHP8.Dockerfile
args:
- PHP_VERSION=8.1
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
@@ -111,11 +70,12 @@ services:
- "host.docker.internal:host-gateway"
networks:
- project_network
php-cli-7.1:
php-cli-8.0:
build:
context: .
dockerfile: PHP7.1.Dockerfile
dockerfile: PHP8.Dockerfile
args:
- PHP_VERSION=8.0
- USERID=${USERID}
- GROUPID=${GROUPID}
volumes:
16 changes: 0 additions & 16 deletions .idea/php-test-framework.xml

This file was deleted.

221 changes: 7 additions & 214 deletions .idea/php.xml
6 changes: 3 additions & 3 deletions .idea/spawnia-sailor-bundle.iml
4 changes: 2 additions & 2 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ init() {
fi
self=$(which $0)
declare -A available_php_versions
available_php_versions=(["8"]="8.0" ["8.0"]="8.0" ["8.1"]="8.1" ["7"]="7.4" ["7.1"]="7.1" ["7.2"]="7.2" ["7.3"]="7.3" ["7.4"]="7.4")
available_php_versions=(["8"]="8.3" ["8.0"]="8.0" ["8.1"]="8.1" ["8.2"]="8.2" ["8.3"]="8.3")
self_path=$(dirname $(realpath $self))
project_path=$(dirname $self_path)
compose_file_custom="${project_path}/docker-compose.yml"
@@ -30,7 +30,7 @@ init() {
php_version="${available_php_versions["$1"]}"
set -- "${@:2}"
else
php_version="8.1"
php_version="8.3"
fi
"$@"

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
}
],
"require": {
"php": "^7.4||^8.0",
"php": "^8.0",
"ext-json": "*",
"nette/php-generator": "^3.6||^4.0",
"spawnia/sailor": "^0.29",

0 comments on commit 6ea62e3

Please sign in to comment.