- Notifications
You must be signed in to change notification settings - Fork73
⬆️ draft support for laravel 6.*#53
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
5d7a998
5d897a2
b5b0414
8996a1a
9759d81
5857428
948e29a
e6484b1
4c78044
5170cfd
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: "Run unit tests" | ||
on: | ||
- push | ||
jobs: | ||
test: | ||
name: "Build" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: ['7.1', '7.2', '7.3', '7.4'] | ||
laravel: ['5.5', '5.6', '5.7', '5.8', '6.x'] | ||
exclude: | ||
# Laravel 6.x is 7.2+ | ||
- php: '7.1' | ||
laravel: '6.x' | ||
services: | ||
database: | ||
image: mysql:5 | ||
ports: | ||
- 13306:3306 | ||
env: | ||
MYSQL_ROOT_PASSWORD: 'test' | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v1 | ||
- name: Setup PHP ${{ matrix.php }} | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: json,mbstring,pdo,mysql,dom | ||
coverage: xdebug | ||
- name: Start build on Code Climate | ||
continue-on-error: true | ||
run: | | ||
curl -o ./cc-test-reporter -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 | ||
chmod +x ./cc-test-reporter | ||
./cc-test-reporter before-build | ||
- name: Get user-level Composer cache | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Setup Composer cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: composer-${{ runner.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
composer-${{ runner.os }}-${{ matrix.laravel }}-${{ matrix.php }}- | ||
composer-${{ runner.os }}-${{ matrix.laravel }}- | ||
composer-${{ runner.os }}- | ||
- name: Install dependencies for Laravel 5.5 | ||
if: ( matrix.laravel == '5.5' ) | ||
run: | | ||
composer require "phpunit/phpunit:^6.0" --no-update | ||
composer require "laravel/framework:~5.5.0" --no-update | ||
composer require "orchestra/database:~3.5.0" --no-update | ||
composer require "orchestra/testbench:~3.5.0" --no-update | ||
- name: Install dependencies for Laravel 5.6 | ||
if: ( matrix.laravel == '5.6' ) | ||
run: | | ||
composer require "phpunit/phpunit:^7.0" --no-update | ||
composer require "laravel/framework:~5.6.0" --no-update | ||
composer require "orchestra/database:~3.6.0" --no-update | ||
composer require "orchestra/testbench:~3.6.0" --no-update | ||
- name: Install dependencies for Laravel 5.7 | ||
if: ( matrix.laravel == '5.7' ) | ||
run: | | ||
composer require "phpunit/phpunit:^7.0" --no-update | ||
composer require "laravel/framework:~5.7.0" --no-update | ||
composer require "orchestra/database:~3.7.0" --no-update | ||
composer require "orchestra/testbench:~3.7.0" --no-update | ||
- name: Install dependencies for Laravel 5.8 | ||
if: ( matrix.laravel == '5.8' ) | ||
run: | | ||
composer require "phpunit/phpunit:^7.0" --no-update | ||
composer require "laravel/framework:~5.8.0" --no-update | ||
composer require "orchestra/database:~3.8.0" --no-update | ||
composer require "orchestra/testbench:~3.8.0" --no-update | ||
- name: Install dependencies for Laravel 6 | ||
if: ( matrix.laravel == '6.x' ) | ||
run: | | ||
composer require "phpunit/phpunit:^8.3" --no-update | ||
composer require "laravel/framework:^6.0" --no-update | ||
composer require "orchestra/database:^4.0" --no-update | ||
composer require "orchestra/testbench:^4.0" --no-update | ||
- name: Install composer dependencies | ||
run: composer install --no-suggest --no-progress --no-interaction --prefer-source | ||
- name: Run unit tests | ||
run: vendor/bin/phpunit --coverage-text | ||
env: | ||
TESTING_DB_PASS: 'test' | ||
TESTING_DB_PORT: 13306 | ||
- name: Complete build on Code Climate | ||
continue-on-error: true | ||
run: ./cc-test-reporter after-build --coverage-input-type clover --prefix "${GITHUB_WORKSPACE}" --exit-code ${{ job.status == 'failure' }} | ||
if: always() | ||
- name: Upload coverage to Code Climate | ||
continue-on-error: true | ||
run: vendor/bin/test-reporter |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -63,7 +63,7 @@ directory. The most logical place to start are the [docs for the `HasEncryptedAt | ||
## Requirements | ||
* Laravel: 5.5, 5.6, 5.7, 5.8, or 6.x | ||
* PHP: 7.1, 7.2, or 7.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Since 7.1 isalready deprecated and 7.2 is in security-only, maybe also look into PHP 7.4 support (add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Yes, That's good idea. For now I was just looking into my own case where i needed Laravel 6 and php 7.3 support. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think that should be a separate PR. There will probably be some issues. | ||
* PHP [OpenSSL extension](http://php.net/manual/en/book.openssl.php) | ||
@@ -75,6 +75,7 @@ Laravel|[v5.5](https://laravel.com/docs/5.5/releases)|[v0.1.0](https://github.co | ||
Laravel|[v5.6](https://laravel.com/docs/5.6/releases)|[v0.1.1](https://github.com/austinheap/laravel-database-encryption/releases/tag/v0.1.1) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.1.1))|Stable|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption) | ||
Laravel|[v5.7](https://laravel.com/docs/5.7/releases)|[v0.2.0](https://github.com/austinheap/laravel-database-encryption/releases/tag/v0.2.0) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.0))|Stable|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption) | ||
Laravel|[v5.8](https://laravel.com/docs/5.8/releases)|[v0.2.1](https://github.com/austinheap/laravel-database-encryption/releases/tag/v0.2.1) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.1))|Stable|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption) | ||
Laravel|[v6.x](https://laravel.com/docs/6.x/releases)|[v0.3.0](https://github.com/austinheap/laravel-database-encryption/releases/tag/v0.3.0) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.3.0))|Stable|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption)|[](https://travis-ci.org/austinheap/laravel-database-encryption) | ||
## Schemas | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -3,7 +3,7 @@ | ||
* src/helpers.php. | ||
* | ||
* @author Austin Heap <me@austinheap.com> | ||
* @version v0.3.0 | ||
*/ | ||
declare(strict_types=1); | ||
@@ -96,3 +96,15 @@ function dbdecrypt(string $value): ?string | ||
return database_decrypt($value); | ||
} | ||
} | ||
if (! function_exists('str_random')) { | ||
/** | ||
* @param int $value | ||
* @return string|null | ||
*/ | ||
function str_random(int $value = 16): ?string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Why? Just replace it with | ||
{ | ||
return \Illuminate\Support\Str::random($value); | ||
} | ||
} |
Uh oh!
There was an error while loading.Please reload this page.