Skip to content

Commit 08074c8

Browse files
⬆️ Bump PHP 8.1 minimal version
* ⬆️ Bump PHP 8.1 minimal version - issue #3551 * 💚 Bump CI PHP version to 8.1 and 8.2 * ⬆️ review update issue #3551
1 parent 3f06b23 commit 08074c8

File tree

7 files changed

+29
-37
lines changed

7 files changed

+29
-37
lines changed

.github/workflows/api_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
apicurltests:
88
strategy:
99
matrix:
10-
php-version: [ '7.2', '8.0' ]
10+
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
1111
name: curl tests
1212
runs-on: ubuntu-latest
1313
steps:

.github/workflows/code_analysis.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php-version: ['7.2', '8.0']
14+
php-version: ['8.1', '8.2', '8.3', '8.4']
1515
actions:
1616
-
1717
name: Coding Standard
@@ -42,7 +42,7 @@ jobs:
4242
name: Check Doctrine Mapping
4343
run: bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction --ansi
4444

45-
name: ${{ matrix.actions.name }}
45+
name: ${{ matrix.actions.name }} - PHP ${{ matrix.php-version }}
4646
runs-on: ubuntu-latest
4747

4848
steps:

.github/workflows/unit_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
unittests:
88
strategy:
99
matrix:
10-
php-version: [ '7.2', '8.0' ]
10+
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
1111
fail-fast: false
1212
name: PHPUnit
1313
runs-on: ubuntu-latest

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ appveyor.yml
6969
/config/routes/local
7070
!/config/routes/local/_import_dev.yaml
7171
.php-version
72+
compose.override.yaml
7273

7374
###> symfony/framework-bundle ###
7475
/.env.local
@@ -78,10 +79,6 @@ appveyor.yml
7879
/vendor/
7980
###< symfony/framework-bundle ###
8081

81-
###> symfony/web-server-bundle ###
82-
/.web-server-pid
83-
###< symfony/web-server-bundle ###
84-
8582
###> phpunit/phpunit ###
8683
/phpunit.xml
8784
/.phpunit.result.cache

compose.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ services:
44
context: docker/php
55
dockerfile: Dockerfile
66
cache_from:
7-
- php:7.3-fpm
7+
- php:8.1-fpm
88
env_file:
99
- .env
1010
depends_on:
1111
- database
12-
- blackfire
1312
volumes:
1413
- ./:/var/www/bolt
1514
working_dir: /var/www/bolt
@@ -21,10 +20,10 @@ services:
2120
ports:
2221
- 3306
2322
environment:
24-
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
25-
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
26-
MYSQL_USER: ${DATABASE_USER}
27-
MYSQL_DATABASE: ${DATABASE_NAME}
23+
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD:-bolt}
24+
MYSQL_PASSWORD: ${DATABASE_PASSWORD:-bolt}
25+
MYSQL_USER: ${DATABASE_USER:-bolt}
26+
MYSQL_DATABASE: ${DATABASE_NAME:-bolt}
2827
MYSQL_INITDB_SKIP_TZINFO: 0
2928

3029
web:

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "🧿 Bolt 5 Core",
55
"license": "MIT",
66
"require": {
7-
"php": ">=7.2.9",
7+
"php": ">=8.1",
88
"ext-json": "*",
99
"ext-mbstring": "*",
1010
"ext-pdo": "*",

docker/php/Dockerfile

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# https://github.com/docker-library/php/blob/master/7.3/buster/fpm/Dockerfile
2-
FROM php:7.3-fpm-buster
1+
# https://github.com/docker-library/php/blob/master/8.1/bookworm/fpm/Dockerfile
2+
FROM php:8.1-fpm-bookworm
33

4-
ENV PHP_MEMORYLIMIT 2048M
5-
ENV PHP_TIMEZONE Europe/Warsaw
6-
ENV PHP_MAXFILESIZE 100M
7-
ENV PHP_MAXEXECTIME 300
4+
ENV PHP_MEMORYLIMIT=2048M
5+
ENV PHP_TIMEZONE=Europe/Warsaw
6+
ENV PHP_MAXFILESIZE=100M
7+
ENV PHP_MAXEXECTIME=300
88
ARG CONFD_VERSION
9-
ENV CONFD_VERSION ${CONFD_VERSION:-0.11.0}
10-
ENV COMPOSER_ALLOW_SUPERUSER 1
9+
ENV CONFD_VERSION=${CONFD_VERSION:-0.11.0}
10+
ENV COMPOSER_ALLOW_SUPERUSER=1
1111

12-
RUN extBuildDeps=" \
12+
RUN --mount=type=cache,target=/var/cache/apt \
13+
--mount=type=cache,target=/var/lib/apt \
14+
extBuildDeps=" \
1315
libfreetype6 \
1416
libfreetype6-dev \
1517
libpng-dev \
@@ -20,6 +22,10 @@ RUN extBuildDeps=" \
2022
libmcrypt-dev \
2123
libldap2-dev \
2224
zlib1g-dev \
25+
libavif-dev \
26+
libwebp-dev \
27+
libpq-dev \
28+
libonig-dev \
2329
"; \
2430
set -x \
2531
&& usermod -u 1000 www-data \
@@ -39,15 +45,15 @@ RUN extBuildDeps=" \
3945
libzip-dev \
4046
sendmail && \
4147
rm -rf /var/lib/apt/lists/* && \
42-
docker-php-ext-configure gd --with-jpeg-dir=/usr/lib/x86_64-linux-gnu --with-png-dir=/usr/lib/x86_64-linux-gnu --with-freetype-dir=/usr/lib/x86_64-linux-gnu && \
48+
docker-php-ext-configure gd --enable-gd --with-webp --with-avif --with-jpeg --with-freetype && \
4349
docker-php-ext-configure intl --enable-intl && \
4450
docker-php-ext-install \
4551
exif \
4652
pdo \
4753
pdo_mysql \
54+
pdo_pgsql \
4855
zip \
4956
intl \
50-
iconv \
5157
mbstring \
5258
gd \
5359
pcntl \
@@ -66,17 +72,7 @@ RUN extBuildDeps=" \
6672
sed -i s'/pm.max_spare_servers = 3/pm.max_spare_servers = 35/' /usr/local/etc/php-fpm.d/www.conf && \
6773
echo 'ForwardAgent yes' >> /etc/ssh/ssh_config && \
6874
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
69-
composer clear-cache && \
70-
mkdir -p /root/.ssh/ && \
71-
ssh-keyscan github.com >> /root/.ssh/known_hosts
72-
73-
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
74-
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
75-
&& mkdir -p /tmp/blackfire \
76-
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
77-
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
78-
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
79-
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
75+
composer clear-cache
8076

8177
EXPOSE 9000
8278
COPY confd/ /etc/confd/

0 commit comments

Comments
 (0)