From 84d0232095c4178be64076d1c52f7dc2e2a8caeb Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Wed, 27 Jul 2022 08:28:57 +0200 Subject: [PATCH] feat!: drop php 7.4 support (#6246) Monica now depends on PHP 8.0+ --- .github/workflows/build.yml | 2 +- .github/workflows/cypress.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/migration_tests.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static.yml | 2 +- .github/workflows/tests.yml | 9 ++++--- .platform.app.yaml | 2 +- README.md | 2 +- composer.json | 2 +- composer.lock | 4 +-- docs/contribute/readme.md | 2 +- docs/installation/providers/cpanel.md | 4 +-- docs/installation/providers/debian.md | 34 ++++++++++++++++++++------ docs/installation/providers/generic.md | 4 +-- docs/installation/providers/ubuntu.md | 20 +++++++-------- docs/installation/readme.md | 2 +- template-definition.yaml | 2 +- 19 files changed, 61 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a84c6750..1b28f1337 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ on: types: [completed] env: - php-version: '8.0' + php-version: '8.1' node-version: 16 jobs: diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index dab6cac1c..893f58652 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [7.4] + php-version: ['8.1'] browser: [chrome] containers: [1, 2, 3, 4, 5, 6, 7, 8] diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b6258a876..17e9713d9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: env: - php-version: '8.0' + php-version: '8.1' node-version: 16 jobs: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a07de3374..b56b35e3a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: - main env: - php-version: '8.0' + php-version: '8.1' node-version: 16 jobs: diff --git a/.github/workflows/migration_tests.yml b/.github/workflows/migration_tests.yml index 0d1af794e..65efa9686 100644 --- a/.github/workflows/migration_tests.yml +++ b/.github/workflows/migration_tests.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [7.4] + php-version: ['8.1'] connection: [mysql] steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89d27fdd8..062a55bc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ on: workflow_dispatch: env: - php-version: '8.0' + php-version: '8.1' build-node-version: 16 semantic-node-version: 16 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4615b0ab9..d6c00cf4f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -9,7 +9,7 @@ on: types: [completed] env: - php-version: '8.0' + php-version: '8.1' jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 282cbfac0..38d0c8c5f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ on: types: [completed] env: - default-php-version: '7.4' + default-php-version: '8.0' node-version: 16 @@ -29,9 +29,12 @@ jobs: strategy: fail-fast: false matrix: - php-version: [7.4, '8.0'] + php-version: ['8.0', '8.1'] connection: [mysql] testsuite: [Api, Feature, Unit-Models, Unit-Services] + # exclude: + # - php-version: '8.1' + # testsuite: Feature steps: - name: Checkout sources @@ -147,7 +150,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [7.4, '8.0'] + php-version: ['8.0'] connection: [mysql] steps: diff --git a/.platform.app.yaml b/.platform.app.yaml index 04d6e44a3..8ae5fd267 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -5,7 +5,7 @@ name: app # The type of the application to build. -type: php:7.4 +type: php:8.1 build: flavor: none diff --git a/README.md b/README.md index 89758f045..184258186 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ There are multiple ways of getting started with Monica: If you want to host Monica yourself, you will need a server with: -- PHP 7.4 or newer +- PHP 8.0 or newer - HTTP server with PHP support (eg: Apache, Nginx, Caddy) - Composer - MySQL diff --git a/composer.json b/composer.json index 044aa87a2..2d3144272 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "license": "AGPL", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-bcmath": "*", "ext-gd": "*", "ext-gmp": "*", diff --git a/composer.lock b/composer.lock index ac43bfa8d..aea6a727a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dbb8a40531e1c39b654747f9c0d61cce", + "content-hash": "b88fbc2e98a7d7a184b1657722746575", "packages": [ { "name": "asbiin/laravel-adorable", @@ -19222,7 +19222,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-bcmath": "*", "ext-gd": "*", "ext-gmp": "*", diff --git a/docs/contribute/readme.md b/docs/contribute/readme.md index a9f4abdaa..c06d2e28f 100644 --- a/docs/contribute/readme.md +++ b/docs/contribute/readme.md @@ -95,7 +95,7 @@ You'll need to run the installation instructions below and setup a local mysql i **Prerequisites**: * Git * [Node](https://nodejs.org/en/) -* PHP 7.4+ +* PHP 8.0+ * [Composer](https://getcomposer.org/) * GNU Make diff --git a/docs/installation/providers/cpanel.md b/docs/installation/providers/cpanel.md index c86f7b3dc..32dce7d24 100644 --- a/docs/installation/providers/cpanel.md +++ b/docs/installation/providers/cpanel.md @@ -14,14 +14,14 @@ Monica can be configured in shared hosting environments with a little differences that we can remedy easily. In this scenario, Monica depends on the following: - A shared cPanel Server -- PHP 7.4+ +- PHP 8.0+ - [Composer](https://getcomposer.org/) - [MySQL](https://www.mysql.com/) - SSH Access for an accont on the cPanel server **Git:** Git should come pre-installed with your server. If it doesn't - use the installation instructions in the link. -**PHP:** Install php7.4 minimum. Generally cPanel will have a PHP 7 version installed, verify under the 'PHP Version' section from the cPanel section. Make sure these extensions are enabled: +**PHP:** Install php8.0 minimum. Generally cPanel will have a PHP 7 version installed, verify under the 'PHP Version' section from the cPanel section. Make sure these extensions are enabled: - bcmath - curl diff --git a/docs/installation/providers/debian.md b/docs/installation/providers/debian.md index f566bab06..75358459b 100644 --- a/docs/installation/providers/debian.md +++ b/docs/installation/providers/debian.md @@ -19,7 +19,7 @@ Monica depends on the following: - A Web server, like [Apache httpd webserver](https://httpd.apache.org/) - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) -- PHP 7.4+ +- PHP 8.0+ - [Composer](https://getcomposer.org/) - [Node.js](https://nodejs.org) - [Yarn](https://yarnpkg.com) @@ -42,32 +42,50 @@ sudo apt install -y git **PHP:** -If you are using Debian 10 or lower, PHP 7.4 is not available from the Debian project directly. Instead use the [deb.sury.org](https://deb.sury.org/) package repository from Ondřej Surý, maintainer of the mainline Debian packages. +If you are using Debian 10 or lower, PHP 8.0 is not available from the Debian project directly. Instead use the [deb.sury.org](https://deb.sury.org/) package repository from Ondřej Surý, maintainer of the mainline Debian packages. ```sh -sudo wget -q https://packages.sury.org/php/apt.gpg -O /etc/apt/trusted.gpg.d/php-sury.gpg +sudo apt install -y curl software-properties-common +curl -sSL https://packages.sury.org/php/apt.gpg | sudo tee /etc/apt/trusted.gpg.d/php-sury.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php-sury.list sudo apt update ``` +Install PHP 8.0 or 8.1 with these extensions: -Install PHP 7.4 with these extensions: +- bcmath +- curl +- dom +- gd +- gmp +- iconv +- intl +- json +- mbstring +- mysqli +- opcache +- pdo_mysql +- redis +- sodium +- xml +- zip +Run: ```sh -sudo apt install -y php7.4 php7.4-bcmath php7.4-curl php7.4-gd php7.4-gmp \ - php7.4-intl php7.4-mbstring php7.4-mysql php7.4-redis php7.4-xml php7.4-zip +sudo apt install -y php8.1 php8.1-bcmath php8.1-curl php8.1-gd php8.1-gmp \ + php8.1-intl php8.1-mbstring php8.1-mysql php8.1-redis php8.1-xml php8.1-zip ``` **Composer:** After you're done installing PHP, you'll need the Composer dependency manager. ```sh -wget -q -O - https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/ --filename=composer +curl -sSL https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/ --filename=composer ``` **Node.js:** Install node.js with package manager. ```sh -wget -q -O - https://deb.nodesource.com/setup_16.x | sudo bash - +curl -sSL https://deb.nodesource.com/setup_16.x | sudo bash - sudo apt install -y nodejs ``` diff --git a/docs/installation/providers/generic.md b/docs/installation/providers/generic.md index 39d20b4b8..170b843db 100644 --- a/docs/installation/providers/generic.md +++ b/docs/installation/providers/generic.md @@ -20,7 +20,7 @@ If you don't want to use Docker, the best way to setup the project is to use the same configuration that [Homestead](https://laravel.com/docs/homestead) uses. Basically, Monica depends on the following: - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) -- PHP 7.4+ +- PHP 8.0+ - [Composer](https://getcomposer.org/) - [Node.js](https://nodejs.org) - [Yarn](https://yarnpkg.com) @@ -29,7 +29,7 @@ If you don't want to use Docker, the best way to setup the project is to use the **Git:** Git should come pre-installed with your server. If it doesn't - use the installation instructions in the link. -**PHP:** Install php7.4 minimum, with these extensions: +**PHP:** Install php8.0 minimum, with these extensions: - bcmath - curl diff --git a/docs/installation/providers/ubuntu.md b/docs/installation/providers/ubuntu.md index 0becc8bbb..9e21b355f 100644 --- a/docs/installation/providers/ubuntu.md +++ b/docs/installation/providers/ubuntu.md @@ -20,7 +20,7 @@ Monica depends on the following: - [Apache httpd webserver](https://httpd.apache.org/) - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) -- PHP 7.4+ +- PHP 8.0+ - [Composer](https://getcomposer.org/) - [Node.js](https://nodejs.org) - [Yarn](https://yarnpkg.com) @@ -42,22 +42,22 @@ sudo apt update sudo apt install -y apache2 ``` -**PHP 7.4+:** +**PHP 8.0+:** First add this PPA repository: ```sh -sudo apt-get install -y software-properties-common +sudo apt install -y software-properties-common sudo add-apt-repository ppa:ondrej/php ``` -Then install php 7.4 with these extensions: +Then install php 8.0 or 8.1 with these extensions: ```sh sudo apt update -sudo apt install -y php7.4 php7.4-bcmath php7.4-cli php7.4-curl php7.4-common \ - php7.4-fpm php7.4-gd php7.4-gmp php7.4-intl php7.4-json php7.4-mbstring \ - php7.4-mysql php7.4-opcache php7.4-redis php7.4-xml php7.4-zip +sudo apt install -y php8.1 php8.1-bcmath php8.1-cli php8.1-curl php8.1-common \ + php8.1-fpm php8.1-gd php8.1-gmp php8.1-intl php8.1-json php8.1-mbstring \ + php8.1-mysql php8.1-opcache php8.1-redis php8.1-xml php8.1-zip ``` **Composer:** After you're done installing PHP, you'll need the [Composer](https://getcomposer.org/download/) dependency manager. @@ -233,10 +233,10 @@ Then, in the `nano` text editor window you just opened, copy the following - swa sudo a2dissite 000-default.conf sudo a2ensite monica.conf -# Enable php7.4 fpm, and restart apache +# Enable php8.1 fpm, and restart apache sudo a2enmod proxy_fcgi setenvif -sudo a2enconf php7.4-fpm -sudo service php7.4-fpm restart +sudo a2enconf php8.1-fpm +sudo service php8.1-fpm restart sudo service apache2 restart ``` diff --git a/docs/installation/readme.md b/docs/installation/readme.md index 36fea6765..e40f00d63 100644 --- a/docs/installation/readme.md +++ b/docs/installation/readme.md @@ -14,7 +14,7 @@ Monica can be installed on a variety of platforms. The choice of the platform is If you don't want to use [Docker](/docs/installation/providers/docker.md), the best way to setup the project is to use the same configuration that [Homestead](https://laravel.com/docs/homestead) uses. Basically, Monica depends on the following: * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) -* PHP 7.4+ +* PHP 8.0+ * [Composer](https://getcomposer.org/) * [MySQL](https://www.mysql.com/) * Optional: Redis or Beanstalk diff --git a/template-definition.yaml b/template-definition.yaml index 93246c89d..3b4e86eb7 100644 --- a/template-definition.yaml +++ b/template-definition.yaml @@ -41,7 +41,7 @@ info: # These are the name/version of the Platforms.h containers, not including the Nginx router. notes: - heading: "Apps & Services" - content: "PHP 7.4
MariaDB 10.4
Redis 5.0" + content: "PHP 8.1
MariaDB 10.4
Redis 5.0" # This key describes the initialization call made to the main environment at