Skip to content

Commit 8420305

Browse files
Merge pull request #9507 from joanhey/symfony-php8.4
[php] Symfony and Laravel update to PHP8.4
2 parents 1479697 + ccd87b8 commit 8420305

13 files changed

+50
-46
lines changed

frameworks/PHP/laravel/benchmark_config.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@
160160
"database_os": "Linux",
161161
"display_name": "laravel-ripple",
162162
"notes": "",
163-
"versus": "php"
163+
"versus": "php",
164+
"tags": ["broken"]
164165
}
165166
}]
166167
}

frameworks/PHP/laravel/deploy/conf/cli-php.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ memory_limit = 512M
1313
opcache.jit_buffer_size = 128M
1414
opcache.jit = tracing
1515

16-
disable_functions=header,header_remove,headers_sent,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,set_time_limit
16+
disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit

frameworks/PHP/laravel/laravel-laravel-s.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM phpswoole/swoole:5.1.3-php8.3
1+
FROM phpswoole/swoole:php8.4
22

33
RUN docker-php-ext-install pcntl opcache curl > /dev/null
44

frameworks/PHP/laravel/laravel-swoole.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM phpswoole/swoole:5.1.3-php8.3
1+
FROM phpswoole/swoole:php8.4
22

33
RUN docker-php-ext-install pcntl opcache curl > /dev/null
44

frameworks/PHP/laravel/laravel-workerman.dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq git unzip \
10-
php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null
10+
php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null
1111

1212
COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer
1313

14-
RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null
15-
RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini
14+
RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null
15+
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini
1616

1717
WORKDIR /laravel
1818
COPY --link . .
@@ -26,7 +26,7 @@ RUN mkdir -p bootstrap/cache \
2626
RUN composer require joanhey/adapterman --update-no-dev --no-scripts --quiet
2727
RUN php artisan optimize
2828

29-
COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini
29+
COPY --link deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini
3030

3131
EXPOSE 8080
3232

frameworks/PHP/laravel/laravel.dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq nginx git unzip \
10-
php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null
10+
php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null
1111

1212
COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer
1313

14-
COPY --link deploy/conf/* /etc/php/8.3/fpm/
14+
COPY --link deploy/conf/* /etc/php/8.4/fpm/
1515
WORKDIR /laravel
1616
COPY --link . .
1717

18-
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
18+
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;
1919

2020
RUN mkdir -p bootstrap/cache \
2121
storage/logs \
@@ -29,7 +29,7 @@ RUN php artisan optimize
2929
EXPOSE 8080
3030

3131
# Uncomment next line for Laravel console error logging to be viewable in docker logs
32-
# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf
32+
# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf
3333

34-
CMD service php8.3-fpm start && \
34+
CMD service php8.4-fpm start && \
3535
nginx -c /laravel/deploy/nginx.conf

frameworks/PHP/symfony/composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"symfony/orm-pack": "^2",
1414
"symfony/twig-bundle": "^7",
1515
"symfony/yaml": "^7",
16-
"joanhey/adapterman": "^0.6"
16+
"joanhey/adapterman": "^0.7"
1717
},
1818
"minimum-stability": "dev",
1919
"prefer-stable": true,
@@ -45,7 +45,10 @@
4545
"symfony/polyfill-php73": "*",
4646
"symfony/polyfill-php74": "*",
4747
"symfony/polyfill-php80": "*",
48-
"symfony/polyfill-php81": "*"
48+
"symfony/polyfill-php81": "*",
49+
"symfony/polyfill-php82": "*",
50+
"symfony/polyfill-php83": "*",
51+
"symfony/polyfill-php84": "*"
4952
},
5053
"scripts": {
5154
"auto-scripts": {

frameworks/PHP/symfony/deploy/conf/cli-php.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ memory_limit = 512M
1313
opcache.jit_buffer_size = 128M
1414
opcache.jit = tracing
1515

16-
disable_functions=header,header_remove,headers_sent,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,set_time_limit
16+
disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -7,27 +7,27 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq nginx git unzip curl \
10-
php8.3-cli php8.3-fpm php8.3-mysql \
11-
php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null
10+
php8.4-cli php8.4-fpm php8.4-mysql \
11+
php8.4-mbstring php8.4-xml php8.4-curl php8.4-dev > /dev/null
1212

1313
COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer
1414

15-
COPY --link deploy/conf/* /etc/php/8.3/fpm/
15+
COPY --link deploy/conf/* /etc/php/8.4/fpm/
1616
WORKDIR /symfony
1717
COPY --link . .
1818

19-
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
19+
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;
2020

2121
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet
2222
RUN cp deploy/mysql/.env . && composer dump-env prod && bin/console cache:clear
2323

24-
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini
24+
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/fpm/php.ini
2525

2626
EXPOSE 8080
2727

2828
# Uncomment next line for Laravel console error logging to be viewable in docker logs
29-
# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf
29+
# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf
3030

3131
RUN mkdir -p /run/php
32-
CMD service php8.3-fpm start && \
32+
CMD service php8.4-fpm start && \
3333
nginx -c /symfony/deploy/nginx.conf
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -7,27 +7,27 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq nginx git unzip curl \
10-
php8.3-cli php8.3-fpm php8.3-pgsql \
11-
php8.3-mbstring php8.3-xml php8.3-curl > /dev/null
10+
php8.4-cli php8.4-fpm php8.4-pgsql \
11+
php8.4-mbstring php8.4-xml php8.4-curl > /dev/null
1212

1313
COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer
1414

15-
COPY --link deploy/conf/* /etc/php/8.3/fpm/
15+
COPY --link deploy/conf/* /etc/php/8.4/fpm/
1616
WORKDIR /symfony
1717
COPY --link . .
1818

19-
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
19+
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;
2020

2121
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet
2222
RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear
2323

24-
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini
24+
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/fpm/php.ini
2525

2626
EXPOSE 8080
2727

2828
# Uncomment next line for Laravel console error logging to be viewable in docker logs
29-
# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf
29+
# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf
3030

3131
RUN mkdir -p /run/php
32-
CMD service php8.3-fpm start && \
32+
CMD service php8.4-fpm start && \
3333
nginx -c /symfony/deploy/nginx.conf

frameworks/PHP/symfony/symfony-swoole.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM phpswoole/swoole:5.1.3-php8.3
1+
FROM phpswoole/swoole:php8.4
22

33
RUN apt-get update -yqq && \
44
apt-get install -yqq libpq-dev libicu-dev > /dev/null && \

frameworks/PHP/symfony/symfony-workerman.dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -7,20 +7,20 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq unzip \
10-
php8.3-cli php8.3-pgsql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null
10+
php8.4-cli php8.4-pgsql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null
1111

1212
COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer
1313

14-
RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null && \
15-
pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini
14+
RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null && \
15+
pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini
1616

1717
WORKDIR /symfony
1818
COPY --link . .
1919

2020
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet
2121
RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear
2222

23-
COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini
23+
COPY --link deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini
2424

2525
EXPOSE 8080
2626

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -7,28 +7,28 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
77
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null
88

99
RUN apt-get install -yqq nginx git unzip curl \
10-
php8.3-cli php8.3-fpm php8.3-pgsql \
11-
php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null
10+
php8.4-cli php8.4-fpm php8.4-pgsql \
11+
php8.4-mbstring php8.4-xml php8.4-curl php8.4-dev > /dev/null
1212

1313
COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer
1414

15-
COPY --link deploy/conf/* /etc/php/8.3/fpm/
15+
COPY --link deploy/conf/* /etc/php/8.4/fpm/
1616

1717
WORKDIR /symfony
1818
COPY --link . .
1919

20-
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
20+
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;
2121

2222
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet
2323
RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear
2424

25-
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini
25+
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/fpm/php.ini
2626

2727
EXPOSE 8080
2828

2929
# Uncomment next line for Laravel console error logging to be viewable in docker logs
30-
# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf
30+
# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf
3131

3232
RUN mkdir -p /run/php
33-
CMD service php8.3-fpm start && \
33+
CMD service php8.4-fpm start && \
3434
nginx -c /symfony/deploy/nginx.conf

0 commit comments

Comments
 (0)