refactor: remove imagick dependency (#5143)

This commit is contained in:
Alexis Saettler
2021-05-02 14:35:41 +02:00
committed by GitHub
parent 672574d67a
commit 5fc458478f
18 changed files with 51 additions and 45 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
- name: Check PHP Version
run: php -v
+1 -1
View File
@@ -29,7 +29,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
- name: Check PHP Version
run: php -v
+1 -1
View File
@@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
- name: Check PHP Version
run: php -v
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: imagick, redis, ${{ matrix.connection }}
extensions: redis, ${{ matrix.connection }}
coverage: none
- name: Check PHP Version
run: php -v
+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
# Composer
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
- name: Get Composer Cache Directory
@@ -56,7 +56,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: imagick, redis
extensions: redis
coverage: none
- name: Get Composer Cache Directory
+2 -2
View File
@@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: imagick, redis, ${{ matrix.connection }}
extensions: redis, ${{ matrix.connection }}
coverage: none
- name: Check PHP Version
run: php -v
@@ -155,7 +155,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: imagick, redis, ${{ matrix.connection }}
extensions: redis, ${{ matrix.connection }}
coverage: xdebug
- name: Check PHP Version
run: php -v
-1
View File
@@ -15,7 +15,6 @@ runtime:
- gmp
- redis
- sodium
- imagick
# The hooks that will be performed when the package is deployed.
hooks:
-1
View File
@@ -13,7 +13,6 @@
"ext-bcmath": "*",
"ext-gd": "*",
"ext-gmp": "*",
"ext-imagick": "*",
"ext-intl": "*",
"ext-redis": "*",
"asbiin/laravel-webauthn": "^1.0",
Generated
+6 -7
View File
@@ -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": "aebf6def55106d5d7d85307e0fdd2c2b",
"content-hash": "434e50e8209b64eb33aedb04241707d8",
"packages": [
{
"name": "asbiin/laravel-webauthn",
@@ -15857,7 +15857,7 @@
"friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
"fuel/core": "<1.8.1",
"getgrav/grav": "<1.7.11",
"getkirby/cms": ">=3,<3.4.5",
"getkirby/cms": "<3.5.4",
"getkirby/panel": "<2.5.14",
"gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
"gree/jose": "<=2.2",
@@ -15865,7 +15865,7 @@
"guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1",
"illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
"illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
"illuminate/database": "<6.20.26|>=7,<7.30.4|>=8,<8.40",
"illuminate/database": "<6.20.26|>=7,<8.40",
"illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
"illuminate/view": ">=7,<7.1.2",
"impresscms/impresscms": "<=1.4.2",
@@ -15878,7 +15878,7 @@
"kitodo/presentation": "<3.1.2",
"kreait/firebase-php": ">=3.2,<3.8.1",
"la-haute-societe/tcpdf": "<6.2.22",
"laravel/framework": "<6.20.26|>=7,<7.30.4|>=8,<8.40",
"laravel/framework": "<6.20.26|>=7,<8.40",
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
"league/commonmark": "<0.18.3",
"librenms/librenms": "<1.53",
@@ -15920,7 +15920,7 @@
"pear/archive_tar": "<1.4.12",
"personnummer/personnummer": "<3.0.2",
"phpfastcache/phpfastcache": ">=5,<5.0.13",
"phpmailer/phpmailer": "<6.1.6",
"phpmailer/phpmailer": "<6.1.6|>=6.1.8,<6.4.1",
"phpmussel/phpmussel": ">=1,<1.6",
"phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3",
"phpoffice/phpexcel": "<1.8.2",
@@ -16112,7 +16112,7 @@
"type": "tidelift"
}
],
"time": "2021-04-29T22:01:20+00:00"
"time": "2021-05-02T09:01:19+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -18152,7 +18152,6 @@
"ext-bcmath": "*",
"ext-gd": "*",
"ext-gmp": "*",
"ext-imagick": "*",
"ext-intl": "*",
"ext-redis": "*"
},
+30 -16
View File
@@ -3,43 +3,45 @@
return [
/*
* Auth container binding
* Enable / disable Google2FA.
*/
'enabled' => env('MFA_ENABLED', env('2FA_ENABLED', true)),
/*
* Lifetime in minutes.
*
* In case you need your users to be asked for a new one time passwords from time to time.
*/
'lifetime' => 0, // 0 = eternal
'lifetime' => env('OTP_LIFETIME', 0), // 0 = eternal
/*
* Renew lifetime at every new request.
*/
'keep_alive' => true,
'keep_alive' => env('OTP_KEEP_ALIVE', true),
/*
* Auth container binding
* Auth container binding.
*/
'auth' => 'auth',
/*
* 2FA verified session var
* Guard.
*/
'guard' => '',
/*
* 2FA verified session var.
*/
'session_var' => 'google2fa',
/*
* One Time Password request input name
* One Time Password request input name.
*/
'otp_input' => 'one_time_password',
/*
* One Time Password Window
* One Time Password Window.
*/
'window' => 8,
@@ -49,22 +51,34 @@ return [
'forbid_old_passwords' => false,
/*
* User's table column for google2fa secret
* User's table column for google2fa secret.
*/
'otp_secret_column' => 'google2fa_secret',
/*
* One Time Password View
* One Time Password View.
*/
'view' => 'auth/validate2fa',
/*
* One Time Password error message
* One Time Password error message.
*/
'error_messages' => [
'wrong_otp' => 'The two factor authentication has failed.',
'wrong_otp' => "The 'One Time Password' typed was wrong.",
'cannot_be_empty' => 'One Time Password cannot be empty.',
'unknown' => 'An unknown error has occurred. Please try again.',
'unknown' => 'An unknown error has occurred. Please try again.',
],
/*
* Throw exceptions or just fire events?
*/
'throw_exceptions' => env('OTP_THROW_EXCEPTION', true),
/*
* Which image backend to use for generating QR codes?
*
* Supports imagemagick, svg and eps
*/
'qrcode_image_backend' => \PragmaRX\Google2FALaravel\Support\Constants::QRCODE_IMAGE_BACKEND_SVG,
];
-1
View File
@@ -39,7 +39,6 @@ Monica can be configured in shared hosting environments with a little difference
- sodium
- xml
- zip
- imagick
In most cases, this will be under the section called 'PHP Version' in cPanel where you can enable and disable modules.
+1 -1
View File
@@ -45,7 +45,7 @@ sudo apt install -y git
Install PHP 7.4 with these extensions:
```sh
sudo apt install -y php php-bcmath php-curl php-gd php-gmp php-imagick \
sudo apt install -y php php-bcmath php-curl php-gd php-gmp \
php-intl php-mbstring php-mysql php-redis php-xml php-zip
```
-1
View File
@@ -47,7 +47,6 @@ If you don't want to use Docker, the best way to setup the project is to use the
- sodium
- xml
- zip
- imagick
**Composer:** After you're done installing PHP, you'll need the Composer dependency manager. It is not enough to just install Composer, you also need to make sure it is installed globally for Monica's installation to run smoothly:
+2 -2
View File
@@ -56,8 +56,8 @@ Then install php 7.4 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-imagick php7.4-intl php7.4-json \
php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-redis php7.4-xml php7.4-zip
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
```
**Composer:** After you're done installing PHP, you'll need the [Composer](https://getcomposer.org/download/) dependency manager.
@@ -19,9 +19,8 @@
<div class="panel-body">
{{ $t('settings.2fa_enable_otp') }}
<div v-html="image"></div>
<p>
<img id="barcode" alt="Image of QR barcode" :src="image" />
<br />
{{ $t('settings.2fa_enable_otp_help') }}
<code id="secretkey">
{{ secret }}
-2
View File
@@ -64,13 +64,11 @@ RUN set -ex; \
pecl install APCu; \
pecl install memcached; \
pecl install redis; \
pecl install imagick; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
imagick \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+2 -2
View File
@@ -52,8 +52,8 @@ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
echo -e "\n\033[4;32mInstalling packages for Monica\033[0;40m"
apt-get install -y php7.4-bcmath php7.4-cli php7.4-curl php7.4-common php7.4-fpm \
php7.4-gd php7.4-gmp php7.4-imagick php7.4-intl php7.4-json php7.4-mbstring \
php7.4-mysql php7.4-opcache php7.4-redis php7.4-xml php7.4-zip >/dev/null
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 >/dev/null
echo -e "\n\033[4;32mInstalling node.js\033[0;40m"
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - >/dev/null