Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit fec06d3

Browse files
author
Wim
committed
⬆️ draft support for laravel 6.*
Signed-off-by: Wim <[email protected]>
1 parent 30515c1 commit fec06d3

38 files changed

+59
-38
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ matrix:
1818
env: LARAVEL=57
1919
- php: 7.2
2020
env: LARAVEL=58
21+
- php: 7.2
22+
env: LARAVEL=6
2123
- php: 7.3
2224
env: LARAVEL=55
2325
- php: 7.3
@@ -26,6 +28,8 @@ matrix:
2628
env: LARAVEL=57
2729
- php: 7.3
2830
env: LARAVEL=58
31+
- php: 7.3
32+
env: LARAVEL=6
2933

3034
services:
3135
- mysql
@@ -68,6 +72,11 @@ script:
6872
- if [ "$LARAVEL" = "58" ] ; then composer require "laravel/framework:5.8.*" --no-update ; fi
6973
- if [ "$LARAVEL" = "58" ] ; then composer require "orchestra/database:3.8.*" --no-update ; fi
7074
- if [ "$LARAVEL" = "58" ] ; then composer require "orchestra/testbench:3.8.*" --no-update ; fi
75+
# Packages: Laravel 6.x.x
76+
- if [ "$LARAVEL" = "6" ] ; then composer require "phpunit/phpunit:^8.0" --no-update ; fi
77+
- if [ "$LARAVEL" = "6" ] ; then composer require "laravel/framework:^6.0" --no-update ; fi
78+
- if [ "$LARAVEL" = "6" ] ; then composer require "orchestra/database:^4.0" --no-update ; fi
79+
- if [ "$LARAVEL" = "6" ] ; then composer require "orchestra/testbench:^4.0" --no-update ; fi
7180
# Packages: Update
7281
- composer update --prefer-source --no-interaction
7382
# Tests: Run

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ directory. The most logical place to start are the [docs for the `HasEncryptedAt
6363

6464
## Requirements
6565

66-
* Laravel: 5.5, 5.6, 5.7, or 5.8
66+
* Laravel: 5.5, 5.6, 5.7, 5.8, or 6.x
6767
* PHP: 7.1, 7.2, or 7.3
6868
* PHP [OpenSSL extension](http://php.net/manual/en/book.openssl.php)
6969

@@ -75,6 +75,7 @@ Laravel|[v5.5](https://laravel.com/docs/5.5/releases)|[v0.1.0](https://github.co
7575
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|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)
7676
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|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)
7777
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|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)
78+
Laravel|[v6.x](https://laravel.com/docs/6.x/releases)|[v0.2.2](https://github.com/austinheap/laravel-database-encryption/releases/tag/v0.2.2) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.2))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)
7879

7980
## Schemas
8081

composer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"laravel56 encryption",
2626
"laravel57 encryption",
2727
"laravel58 encryption",
28+
"laravel6 encryption",
2829
"eloquent encryption",
2930
"model encryption",
3031
"attribute encryption",
@@ -54,12 +55,12 @@
5455
},
5556
"require": {
5657
"php": ">=7.1.0",
57-
"laravel/framework": "5.5.*|5.6.*|5.7.*|5.8.*"
58+
"laravel/framework": "5.5.*|5.6.*|5.7.*|5.8.*|6.*.*"
5859
},
5960
"require-dev": {
6061
"codeclimate/php-test-reporter": "dev-master",
6162
"phpunit/phpunit": "~6.0|~7.0",
62-
"orchestra/testbench": "^3.5"
63+
"orchestra/testbench": "^3.5|^4.0"
6364
},
6465
"autoload": {
6566
"psr-4": {

config/database-encryption.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/config/database-encryption.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88

99
return [

src/Console/Commands/MigrateEncryptionCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/Console/Commands/MigrateEncryptionCommand.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/EncryptionDefaults.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/EncryptionDefaults.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/EncryptionFacade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/EncryptionFacade.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/EncryptionHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/EncryptionHelper.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/EncryptionServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/EncryptionServiceProvider.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/Traits/HasEncryptedAttributes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/Traits/HasEncryptedAttributes.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

src/helpers.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* src/helpers.php.
44
*
55
* @author Austin Heap <[email protected]>
6-
* @version v0.2.1
6+
* @version v0.2.2
77
*/
88
declare(strict_types=1);
99

@@ -96,3 +96,13 @@ function dbdecrypt(string $value): ?string
9696
return database_decrypt($value);
9797
}
9898
}
99+
100+
if (! function_exists('str_random')) {
101+
/**
102+
* @return null|string
103+
*/
104+
function str_random(int $value): ?string
105+
{
106+
return \Illuminate\Support\Str::random($value);
107+
}
108+
}

tests/Console/MigrateEncryptionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Console;

tests/DatabaseTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests;

tests/Defaults/ControlCharactersTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Defaults;

tests/Defaults/EnabledTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Defaults;

tests/Defaults/HelpersTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Defaults;

tests/Defaults/PrefixTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Defaults;

tests/Defaults/VersioningTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Defaults;

tests/Facade/FacadeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests;

tests/Helper/DisabledTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @package laravel-database-encryption
55
* @link https://github.com/austinheap/laravel-database-encryption
66
* @author Austin Heap <[email protected]>
7-
* @version v0.2.1
7+
* @version v0.2.2
88
*/
99

1010
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/EnabledTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/HeaderPrefixTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @package laravel-database-encryption
55
* @link https://github.com/austinheap/laravel-database-encryption
66
* @author Austin Heap <[email protected]>
7-
* @version v0.2.1
7+
* @version v0.2.2
88
*/
99

1010
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/PrefixTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @package laravel-database-encryption
55
* @link https://github.com/austinheap/laravel-database-encryption
66
* @author Austin Heap <[email protected]>
7-
* @version v0.2.1
7+
* @version v0.2.2
88
*/
99

1010
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/SingletonTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/VersionPartsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/VersioningTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Helper/VersionlessTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @package laravel-database-encryption
55
* @link https://github.com/austinheap/laravel-database-encryption
66
* @author Austin Heap <[email protected]>
7-
* @version v0.2.1
7+
* @version v0.2.2
88
*/
99

1010
namespace AustinHeap\Database\Encryption\Tests\Helper;

tests/Models/DatabaseModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Models;

tests/Models/DummyModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Models;

tests/Models/FakeModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Models;

tests/Models/RealModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Models;

tests/TestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests;

tests/Traits/DatabaseTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

tests/Traits/DirtyTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

tests/Traits/DummyTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

tests/Traits/ExceptionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

tests/Traits/FloatTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

tests/Traits/IntTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package laravel-database-encryption
66
* @link https://github.com/austinheap/laravel-database-encryption
77
* @author Austin Heap <[email protected]>
8-
* @version v0.2.1
8+
* @version v0.2.2
99
*/
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Traits;

0 commit comments

Comments
 (0)