Browse Source

:wrench: upgrade php to 8.0

Jeremy Zheng 4 years ago
parent
commit
585dc89f7c
2 changed files with 34 additions and 1 deletions
  1. 1 1
      composer.json
  2. 33 0
      deploy/php.sh

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
 	"require": {
 		"elasticsearch/elasticsearch": "~7.0",
-		"guzzlehttp/guzzle": "7.0",
+		"guzzlehttp/guzzle": "^7.0",
 		"catfan/medoo": "^2.1",
 		"casbin/casbin": "^3.9",
 		"phpmailer/phpmailer": "^6.5",

+ 33 - 0
deploy/php.sh

@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -e
+
+export PHP_VERSION="8.0"
+
+declare -a plugins=(
+    "cli"
+    "fpm"
+    "xml"
+    # https://php.watch/versions/8.0/ext-json
+    # "json"
+    "imap"
+    "intl"
+    "mbstring"
+    "bz2"
+    "zip"
+    "curl"
+    "gd"
+    "imagick"
+    "mysql"
+    "pgsql"
+    "sqlite3"
+    "redis"
+    "bcmath"
+)
+
+for i in "${plugins[@]}"
+do
+    sudo apt install -y php${PHP_VERSION}-$i
+done
+
+echo 'done.'