Browse Source

[phpixie] Update to PHP 8 (#6194)

Joan Miquel 4 years ago
parent
commit
6c60b0cf09

+ 0 - 152
frameworks/PHP/phpixie/composer.lock

@@ -1,152 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
-        "This file is @generated automatically"
-    ],
-    "content-hash": "bb146d4f98065d11fe00ffc774bedd1f",
-    "packages": [
-        {
-            "name": "phpixie/core",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/dracony/PHPixie-Core.git",
-                "reference": "52660b51002e53243bda3af6c11151a3232bfd7a"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/dracony/PHPixie-Core/zipball/52660b51002e53243bda3af6c11151a3232bfd7a",
-                "reference": "52660b51002e53243bda3af6c11151a3232bfd7a",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.*-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "PHPixie": "classes/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Tsiupa",
-                    "email": "[email protected]",
-                    "homepage": "http://dracony.org"
-                }
-            ],
-            "description": "PHPixie Framework",
-            "homepage": "http://phpixie.com",
-            "keywords": [
-                "framework"
-            ],
-            "time": "2015-04-16T11:59:58+00:00"
-        },
-        {
-            "name": "phpixie/db",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/dracony/PHPixie-DB.git",
-                "reference": "e6b46a322234da7cdf7d7d3645c108018cad9ac6"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/dracony/PHPixie-DB/zipball/e6b46a322234da7cdf7d7d3645c108018cad9ac6",
-                "reference": "e6b46a322234da7cdf7d7d3645c108018cad9ac6",
-                "shasum": ""
-            },
-            "require": {
-                "phpixie/core": "2.*@dev"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "PHPixie": "classes/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Tsiupa",
-                    "email": "[email protected]",
-                    "homepage": "http://dracony.org"
-                }
-            ],
-            "description": "PHPixie Database library",
-            "homepage": "http://phpixie.com",
-            "keywords": [
-                "database",
-                "mysql",
-                "postgresql",
-                "sqlite"
-            ],
-            "time": "2014-11-07T09:09:11+00:00"
-        },
-        {
-            "name": "phpixie/orm",
-            "version": "2.x-dev",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/PHPixie/ORM/",
-                "reference": "82048e94f41e3fd4483480dc6709937d009ea18e"
-            },
-            "require": {
-                "phpixie/db": "2.*@dev"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-0": {
-                    "PHPixie": "classes/"
-                }
-            },
-            "license": [
-                "BSD"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Tsiupa",
-                    "email": "[email protected]",
-                    "homepage": "http://dracony.org"
-                }
-            ],
-            "description": "ORM library for PHPixie",
-            "homepage": "http://phpixie.com",
-            "keywords": [
-                "database",
-                "orm"
-            ],
-            "time": "2015-03-04T15:55:04+00:00"
-        }
-    ],
-    "packages-dev": [],
-    "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": {
-        "phpixie/core": 20,
-        "phpixie/db": 20,
-        "phpixie/orm": 20
-    },
-    "prefer-stable": false,
-    "prefer-lowest": false,
-    "platform": [],
-    "platform-dev": []
-}

+ 2 - 3
frameworks/PHP/phpixie/deploy/conf/php-fpm.conf

@@ -14,14 +14,13 @@
 ; Pid file
 ; Note: the default prefix is /var
 ; Default Value: none
-pid = /run/php/php7.3-fpm.pid
+pid = /run/php/php-fpm.pid
 
 ; Error log file
 ; If it's set to "syslog", log is sent to syslogd instead of being written
 ; into a local file.
 ; Note: the default prefix is /var
 ; Default Value: log/php-fpm.log
-;error_log = /var/log/php7.3-fpm.log
 error_log = /dev/stderr
 
 
@@ -161,7 +160,7 @@ group = www-data
 ;                            (IPv6 and IPv4-mapped) on a specific port;
 ;   '/path/to/unix/socket' - to listen on a unix socket.
 ; Note: This value is mandatory.
-listen = /run/php/php7.3-fpm.sock
+listen = /run/php/php-fpm.sock
 
 ; Set listen(2) backlog.
 ; Default Value: 511 (-1 on FreeBSD and OpenBSD)

+ 2 - 1
frameworks/PHP/phpixie/deploy/nginx.conf

@@ -2,6 +2,7 @@ user www-data;
 worker_processes  auto;
 error_log stderr error;
 worker_rlimit_nofile 200000;
+daemon off;
 
 events {
     worker_connections 16384;
@@ -41,7 +42,7 @@ http {
 
 
     upstream fastcgi_backend {
-        server unix:/var/run/php/php7.3-fpm.sock;
+        server unix:/var/run/php/php-fpm.sock;
         keepalive 40;
     }
 

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

@@ -1,22 +1,22 @@
-FROM ubuntu:20.04
+FROM ubuntu:20.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 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 php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql  > /dev/null
+    apt-get install -yqq nginx git unzip php8.0 php8.0-common php8.0-cli php8.0-fpm php8.0-mysql  > /dev/null
 
 RUN apt-get install -yqq composer > /dev/null
 
-COPY deploy/conf/* /etc/php/7.4/fpm/
+COPY deploy/conf/* /etc/php/8.0/fpm/
 
 ADD ./ /phpixie
 WORKDIR /phpixie
 
-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;
+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 composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
-CMD service php7.4-fpm start && \
-    nginx -c /phpixie/deploy/nginx.conf -g "daemon off;"
+CMD service php8.0-fpm start && \
+    nginx -c /phpixie/deploy/nginx.conf