Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Add support for laravel 7
Browse files Browse the repository at this point in the history
I hate you ❤
  • Loading branch information
DarkGhostHunter committed Mar 4, 2020
2 parents a31e8b1 + 97c98ae commit 81d6692
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 40 deletions.
73 changes: 40 additions & 33 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: PHP Composer

on: [push]
on:
push:
pull_request:

jobs:
test:
Expand All @@ -21,35 +23,40 @@ jobs:
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: xdebug

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Run test suite
run: composer run-script test

- name: Upload Coverage to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
mv -f .github/workflows/composer-coveralls.json composer.json
composer install
vendor/bin/coveralls build/logs/clover.xml
- name: Checkout
uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
coverage: xdebug

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-progress --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
rm -rf composer.* vendor/
composer require cedx/coveralls
vendor/bin/coveralls build/logs/clover.xml
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
"ext-json": "*",
"bacon/bacon-qr-code": "2.*",
"paragonie/constant_time_encoding": "2.*",
"illuminate/support": "^6.15|7.*",
"illuminate/auth": "^6.15|7.*"
"illuminate/support": "^6.15||^7.0",
"illuminate/auth": "^6.15||^7.0"
},
"require-dev": {
"orchestra/testbench": "^4.0|^5.0",
"orchestra/canvas": "^4.0|^5.0"
"orchestra/testbench": "^4.0||^5.0",
"orchestra/canvas": "^4.0||5.0",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 1 addition & 3 deletions src/TwoFactorAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ trait TwoFactorAuthentication
public function initializeTwoFactorAuthentication()
{
// For security, we will hide the Two Factor Authentication data from the parent model.
if (! in_array('twoFactorAuth', $this->hidden, true)) {
$this->hidden[] = 'twoFactorAuth';
}
$this->makeHidden('twoFactorAuth');
}

/**
Expand Down

0 comments on commit 81d6692

Please sign in to comment.