Skip to content

Commit 72a6226

Browse files
authored
[cakephp] Update to PHP8 (#6281)
1 parent eafe67f commit 72a6226

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed
+7-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:20.10
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

55
RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
66
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
77
RUN apt-get update -yqq > /dev/null && \
8-
apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql php7.4-xml php7.4-mbstring php7.0-mcrypt php7.4-intl > /dev/null
8+
apt-get install -yqq nginx git unzip \
9+
php8.0-fpm php8.0-mysql php8.0-xml php8.0-mbstring php8.0-intl > /dev/null
910

1011
RUN apt-get install -yqq composer > /dev/null
1112

12-
COPY deploy/conf/* /etc/php/7.4/fpm/
13-
COPY deploy/conf/* /etc/php/7.4/cli/
13+
COPY deploy/conf/* /etc/php/8.0/fpm/
14+
COPY deploy/conf/* /etc/php/8.0/cli/
1415

1516
ADD ./ /cakephp
1617
WORKDIR /cakephp
1718

18-
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/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.0/fpm/php-fpm.conf ; fi;
1920

2021
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
2122

2223
RUN chmod -R 777 /cakephp
2324

24-
EXPOSE 8080
25-
26-
CMD service php7.4-fpm start && \
25+
CMD service php8.0-fpm start && \
2726
nginx -c /cakephp/deploy/nginx.conf
2827

frameworks/PHP/cakephp/composer.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"type": "project",
66
"license": "MIT",
77
"require": {
8-
"php": ">=7.2",
9-
"cakephp/cakephp": "^4.0.2",
8+
"cakephp/cakephp": "^4.1",
109
"cakephp/plugin-installer": "^1.0"
1110
},
1211
"autoload": {
@@ -15,7 +14,6 @@
1514
}
1615
},
1716
"scripts": {
18-
"post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
1917
"check": [
2018
"@test",
2119
"@cs-check"

0 commit comments

Comments
 (0)