Browse Source

[laravel] Update to v8.70 and php 8.1 (#6908)

* [laravel] Update to php 8.1

* Update laravel to v8.70

* Update laravel roadrunner composer
Joan Miquel 3 years ago
parent
commit
078f8b4469

+ 1 - 1
frameworks/PHP/laravel/benchmark_config.json

@@ -14,7 +14,7 @@
 			"database": "MySQL",
 			"framework": "laravel",
 			"language": "PHP",
-			"flavor": "PHP8",
+			"flavor": "PHP8.1",
 			"orm": "Full",
 			"platform": "FPM/FastCGI",
 			"webserver": "nginx",

+ 1 - 1
frameworks/PHP/laravel/composer.json

@@ -8,7 +8,7 @@
     ],
     "license": "MIT",
     "require": {
-        "laravel/framework": "^8.16"
+        "laravel/framework": "^8.70"
     },
     "require-dev": {
         "facade/ignition": "^2.3.6",

+ 3 - 3
frameworks/PHP/laravel/deploy/roadrunner/composer.json

@@ -8,10 +8,10 @@
     ],
     "license": "MIT",
     "require": {
-        "laravel/framework": "^8.16",
+        "laravel/framework": "^8.70",
         "nyholm/psr7": "*",
-        "spiral/roadrunner": "^2.0",
-        "spiral/roadrunner-laravel": "^4.0"
+        "spiral/roadrunner": "^2.5",
+        "spiral/roadrunner-laravel": "^5.4"
     },
     "require-dev": {
         "facade/ignition": "^2.3.6",

+ 6 - 6
frameworks/PHP/laravel/laravel.dockerfile

@@ -6,17 +6,17 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq nginx git unzip \
-    php8.0-cli php8.0-fpm php8.0-mysql  > /dev/null
-RUN apt-get install -yqq php8.0-mbstring php8.0-xml  > /dev/null
+    php8.1-cli php8.1-fpm php8.1-mysql  > /dev/null
+RUN apt-get install -yqq php8.1-mbstring php8.1-xml php8.1-dev > /dev/null
 
 COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
 
-COPY deploy/conf/* /etc/php/8.0/fpm/
+COPY deploy/conf/* /etc/php/8.1/fpm/
 
 ADD ./ /laravel
 WORKDIR /laravel
 
-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;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi;
 
 RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache
 RUN chmod -R 777 /laravel
@@ -27,8 +27,8 @@ RUN php artisan optimize
 EXPOSE 8080
 
 # Uncomment next line for Laravel console error logging to be viewable in docker logs
-# RUN echo "catch_workers_output = yes" >> /etc/php/8.0/fpm/php-fpm.conf
+# RUN echo "catch_workers_output = yes" >> /etc/php/8.1/fpm/php-fpm.conf
 
 RUN mkdir -p /run/php
-CMD /usr/sbin/php-fpm8.0 --fpm-config /etc/php/8.0/fpm/php-fpm.conf && nginx -c /laravel/deploy/nginx.conf
+CMD /usr/sbin/php-fpm8.1 --fpm-config /etc/php/8.1/fpm/php-fpm.conf && nginx -c /laravel/deploy/nginx.conf