Skip to content

Commit

Permalink
feat!: drop php 7.4 support (#6246)
Browse files Browse the repository at this point in the history
Monica now depends on PHP 8.0+
  • Loading branch information
asbiin authored Jul 27, 2022
1 parent 91b86f3 commit 84d0232
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
types: [completed]

env:
php-version: '8.0'
php-version: '8.1'
node-version: 16

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_dispatch:

env:
php-version: '8.0'
php-version: '8.1'
node-version: 16

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

env:
php-version: '8.0'
php-version: '8.1'
node-version: 16

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/migration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [7.4]
php-version: ['8.1']
connection: [mysql]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

env:
php-version: '8.0'
php-version: '8.1'
build-node-version: 16
semantic-node-version: 16

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [completed]

env:
php-version: '8.0'
php-version: '8.1'


jobs:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
types: [completed]

env:
default-php-version: '7.4'
default-php-version: '8.0'
node-version: 16


Expand All @@ -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
Expand Down Expand Up @@ -147,7 +150,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [7.4, '8.0']
php-version: ['8.0']
connection: [mysql]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: app

# The type of the application to build.
type: php:7.4
type: php:8.1
build:
flavor: none

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"license": "AGPL",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"ext-bcmath": "*",
"ext-gd": "*",
"ext-gmp": "*",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/contribute/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/installation/providers/cpanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 26 additions & 8 deletions docs/installation/providers/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions docs/installation/providers/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions docs/installation/providers/ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion docs/installation/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion template-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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<br/>MariaDB 10.4<br/>Redis 5.0"
content: "PHP 8.1<br/>MariaDB 10.4<br/>Redis 5.0"


# This key describes the initialization call made to the main environment at
Expand Down

0 comments on commit 84d0232

Please sign in to comment.