ci: fix github action dep (#4939)
This commit is contained in:
@@ -36,7 +36,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo
|
||||
extensions: imagick, redis
|
||||
coverage: none
|
||||
- name: Check PHP Version
|
||||
run: php -v
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-req=php
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
# Yarn
|
||||
- name: Setup Node.js
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo
|
||||
extensions: imagick, redis
|
||||
coverage: none
|
||||
- name: Check PHP Version
|
||||
run: php -v
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-req=php
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
# Yarn
|
||||
- name: Setup Node.js
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo, ${{ matrix.connection }}
|
||||
extensions: imagick, redis, ${{ matrix.connection }}
|
||||
coverage: none
|
||||
- name: Check PHP Version
|
||||
run: php -v
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-req=php
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
# Prepare
|
||||
- name: Prepare environment
|
||||
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo
|
||||
extensions: imagick, redis
|
||||
coverage: none
|
||||
|
||||
# Composer
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo
|
||||
extensions: imagick, 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, mbstring, dom, fileinfo
|
||||
extensions: imagick, redis
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: [7.4, 8.0]
|
||||
php-version: [7.4, '8.0']
|
||||
connection: [mysql]
|
||||
testsuite: [Api, Feature, Unit-Models, Unit-Services]
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: imagick, mbstring, dom, fileinfo, ${{ matrix.connection }}
|
||||
extensions: imagick, redis, ${{ matrix.connection }}
|
||||
coverage: none
|
||||
- name: Check PHP Version
|
||||
run: php -v
|
||||
@@ -68,7 +68,9 @@ jobs:
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-req=php
|
||||
run: |
|
||||
test '${{ matrix.php-version }}' == '8.0' && ext='--ignore-platform-req=php'
|
||||
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader $ext
|
||||
|
||||
# Prepare
|
||||
- name: Prepare environment
|
||||
@@ -144,7 +146,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: [7.4, 8.0]
|
||||
php-version: [7.4, '8.0']
|
||||
connection: [mysql]
|
||||
|
||||
steps:
|
||||
@@ -155,7 +157,8 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: imagick, ${{ matrix.connection }}
|
||||
extensions: imagick, redis, ${{ matrix.connection }}
|
||||
coverage: xdebug
|
||||
- name: Check PHP Version
|
||||
run: php -v
|
||||
- name: Check Composer Version
|
||||
@@ -181,7 +184,9 @@ jobs:
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-req=php
|
||||
run: |
|
||||
test '${{ matrix.php-version }}' == '8.0' && ext='--ignore-platform-req=php'
|
||||
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader $ext
|
||||
|
||||
# Yarn
|
||||
- name: Setup Node.js
|
||||
@@ -235,6 +240,9 @@ jobs:
|
||||
- name: Cache route
|
||||
run: php artisan route:cache
|
||||
|
||||
- name: Test coverage page
|
||||
run: REQUEST_URI=/ php scripts/tests/server-cc.php
|
||||
|
||||
# Test
|
||||
- name: Upgrade Chrome Driver
|
||||
run: php artisan dusk:chrome-driver $(google-chrome -version | awk '{ print $3 }' | cut -d . -f 1)
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use PragmaRX\Random\Random;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User\RecoveryCode;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Traits\JsonRespondController;
|
||||
use PragmaRX\Recovery\Recovery as PragmaRXRecovery;
|
||||
|
||||
class RecoveryCodesController extends Controller
|
||||
{
|
||||
@@ -77,12 +77,20 @@ class RecoveryCodesController extends Controller
|
||||
private function generate()
|
||||
{
|
||||
// Generate new codes
|
||||
$recovery = new PragmaRXRecovery();
|
||||
$codes = $recovery->setCount(config('auth.recovery.count'))
|
||||
->setBlocks(config('auth.recovery.blocks'))
|
||||
->setChars(config('auth.recovery.chars'))
|
||||
->uppercase()
|
||||
->toArray();
|
||||
$random = new Random();
|
||||
$random->uppercase(true);
|
||||
|
||||
$codes = [];
|
||||
|
||||
for ($i = 1; $i <= (int) config('auth.recovery.count'); $i++) {
|
||||
$blocks = [];
|
||||
|
||||
for ($j = 1; $j <= (int) config('auth.recovery.blocks'); $j++) {
|
||||
$blocks[] = $random->size(config('auth.recovery.chars'))->get();
|
||||
}
|
||||
|
||||
$codes[] = implode('-', $blocks);
|
||||
}
|
||||
|
||||
foreach ($codes as $code) {
|
||||
RecoveryCode::create([
|
||||
|
||||
+7
-8
@@ -9,7 +9,7 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"require": {
|
||||
"php": "^7.4",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-bcmath": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-gmp": "*",
|
||||
@@ -30,8 +30,7 @@
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/passport": "^10.0",
|
||||
"laravel/socialite": "^5.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
"laravel/ui": "^3.0",
|
||||
"laravolt/avatar": "^4.0",
|
||||
"league/flysystem-aws-s3-v3": "~1.0",
|
||||
"league/flysystem-cached-adapter": "^1.0",
|
||||
@@ -44,9 +43,8 @@
|
||||
"pragmarx/countries-laravel": "^0",
|
||||
"pragmarx/google2fa": "^8.0",
|
||||
"pragmarx/google2fa-laravel": "^1.3",
|
||||
"pragmarx/recovery": "^0",
|
||||
"pragmarx/random": "^0",
|
||||
"predis/predis": "^1.1",
|
||||
"ralouphie/mimey": "^2.0",
|
||||
"sabre/dav": "^4.0",
|
||||
"sentry/sentry-laravel": "^2.0",
|
||||
"stevebauman/location": "^5.2",
|
||||
@@ -58,7 +56,8 @@
|
||||
"web-token/jwt-key-mgmt": "^2.1",
|
||||
"web-token/jwt-signature-algorithm-ecdsa": "^2.1",
|
||||
"web-token/jwt-signature-algorithm-eddsa": "^2.1",
|
||||
"web-token/jwt-signature-algorithm-rsa": "^2.1"
|
||||
"web-token/jwt-signature-algorithm-rsa": "^2.1",
|
||||
"xantios/mimey": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3",
|
||||
@@ -66,11 +65,11 @@
|
||||
"khanamiryan/qrcode-detector-decoder": "^1.0",
|
||||
"laravel/dusk": "^6.0",
|
||||
"laravel/legacy-factories": "^1.0",
|
||||
"matthiasnoback/live-code-coverage": "^1.0",
|
||||
"matthiasnoback/live-code-coverage": "^1",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"nunomaduro/larastan": "^0",
|
||||
"phpunit/phpcov": "^7.0",
|
||||
"phpunit/phpcov": "^8.0",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"psalm/plugin-laravel": "^1.4",
|
||||
"roave/security-advisories": "dev-master",
|
||||
|
||||
Generated
+1191
-846
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user