Skip to content

Commit

Permalink
Adding Laravel 6.0 support (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc authored Sep 11, 2019
1 parent b6c43bf commit 2089e2a
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 3
runs: 2
php_code_sniffer:
enabled: true
config:
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ language: php
sudo: false

php:
- 7.1.3
- 7.1
- 7.2
- 7.3
- nightly

matrix:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LaravelSettings [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5][badge_laravel]][link-github-repo]
# LaravelSettings [![Packagist License][badge_license]](LICENSE.md) [![For Laravel][badge_laravel]][link-github-repo]

[![Travis Status][badge_build]][link-travis]
[![Coverage Status][badge_coverage]][link-scrutinizer]
Expand All @@ -18,7 +18,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelSettin

### Features

* Laravel `5.2` to `5.8` are supported.
* Laravel `5.2` to `6.0` are supported.
* Multiple store drivers: `array`, `json`, `database`, `redis`.
* Easy setup & configuration.
* Well documented & IDE Friendly.
Expand All @@ -45,7 +45,7 @@ Any ideas are welcome. Feel free to submit any issues or pull requests, please c
- [All Contributors][link-contributors]

[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-settings.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.2%20to%205.8-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.2%20to%206.0-orange.svg?style=flat-square
[badge_build]: https://img.shields.io/travis/ARCANEDEV/LaravelSettings.svg?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelSettings.svg?style=flat-square
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/LaravelSettings.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion _docs/0-Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelSettin

### Features

* Laravel `5.2` to `5.8` are supported.
* Laravel `5.2` to `6.0` are supported.
* Multiple store drivers: `array`, `json`, `database`, `redis`.
* Easy setup & configuration.
* Well documented & IDE Friendly.
Expand Down
26 changes: 12 additions & 14 deletions _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@
2. [Configuration](2-Configuration.md)
3. [Usage](3-Usage.md)

## Server Requirements

The LaravelSettings package has a few system requirements:

- PHP >= 7.0

## Version Compatibility

| LaravelSettings | Laravel |
|:----------------------------------------------|:----------------------------------------------------------|
| ![LaravelSettings v0.x][laravel_settings_0_x] | ![Laravel v5.2][laravel_5_2] ![Laravel v5.3][laravel_5_3] |
| ![LaravelSettings v1.x][laravel_settings_1_x] | ![Laravel v5.4][laravel_5_4] |
| ![LaravelSettings v2.x][laravel_settings_2_x] | ![Laravel v5.5][laravel_5_5] |
| ![LaravelSettings v3.x][laravel_settings_3_x] | ![Laravel v5.6][laravel_5_6] |
| ![LaravelSettings v4.x][laravel_settings_4_x] | ![Laravel v5.7][laravel_5_7] |
| ![LaravelSettings v5.x][laravel_settings_5_x] | ![Laravel v5.8][laravel_5_8] |
| LaravelSettings | Laravel |
|:--------------------------------------------------|:----------------------------------------------------------|
| ![LaravelSettings v0.x][laravel_settings_0_x] | ![Laravel v5.2][laravel_5_2] ![Laravel v5.3][laravel_5_3] |
| ![LaravelSettings v1.x][laravel_settings_1_x] | ![Laravel v5.4][laravel_5_4] |
| ![LaravelSettings v2.x][laravel_settings_2_x] | ![Laravel v5.5][laravel_5_5] |
| ![LaravelSettings v3.x][laravel_settings_3_x] | ![Laravel v5.6][laravel_5_6] |
| ![LaravelSettings v4.x][laravel_settings_4_x] | ![Laravel v5.7][laravel_5_7] |
| ![LaravelSettings v5.x][laravel_settings_5_x] | ![Laravel v5.8][laravel_5_8] |
| ![LaravelSettings v6.0.x][laravel_settings_6_0_x] | ![Laravel v6.0][laravel_6_0] |

[laravel_5_2]: https://img.shields.io/badge/v5.2-supported-brightgreen.svg?style=flat-square "Laravel v5.2"
[laravel_5_3]: https://img.shields.io/badge/v5.3-supported-brightgreen.svg?style=flat-square "Laravel v5.3"
Expand All @@ -30,13 +25,16 @@ The LaravelSettings package has a few system requirements:
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
[laravel_6_0]: https://img.shields.io/badge/v6.0-supported-brightgreen.svg?style=flat-square "Laravel v6.0"

[laravel_settings_0_x]: https://img.shields.io/badge/version-0.*-blue.svg?style=flat-square "LaravelSettings v0.*"
[laravel_settings_1_x]: https://img.shields.io/badge/version-1.*-blue.svg?style=flat-square "LaravelSettings v1.*"
[laravel_settings_2_x]: https://img.shields.io/badge/version-2.*-blue.svg?style=flat-square "LaravelSettings v2.*"
[laravel_settings_3_x]: https://img.shields.io/badge/version-3.*-blue.svg?style=flat-square "LaravelSettings v3.*"
[laravel_settings_4_x]: https://img.shields.io/badge/version-4.*-blue.svg?style=flat-square "LaravelSettings v4.*"
[laravel_settings_5_x]: https://img.shields.io/badge/version-5.*-blue.svg?style=flat-square "LaravelSettings v5.*"
[laravel_settings_6_0_x]: https://img.shields.io/badge/version-6.0.*-blue.svg?style=flat-square "LaravelSettings v6.0.*"

## Composer

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=7.1.3",
"arcanedev/support": "~4.5.0"
"php": ">=7.2.0",
"arcanedev/support": "~5.0.0"
},
"require-dev": {
"orchestra/testbench": "~3.8.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~7.0|~8.0",
"phpunit/phpcov": "~5.0|~6.0",
"orchestra/testbench": "~4.0.0",
"mockery/mockery": "~1.2",
"phpunit/phpunit": "~8.0",
"phpunit/phpcov": "~6.0",
"predis/predis": "~1.1",
"illuminate/redis": "~5.8.0"
"illuminate/redis": "~6.0.0"
},
"autoload": {
"psr-4": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct()
public function up()
{
$this->createSchema(function(Blueprint $table) {
$table->unsignedInteger('user_id')->default(0);
$table->unsignedBigInteger('user_id')->default(0);
$table->string('key');
$table->text('value');
$table->timestamps();
Expand Down
4 changes: 3 additions & 1 deletion helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Arcanedev\LaravelSettings\Contracts\Manager;

if ( ! function_exists('settings')) {
/**
* Get the settings manager instance.
Expand All @@ -10,7 +12,7 @@
*/
function settings($driver = null) {
/** @var \Arcanedev\LaravelSettings\Contracts\Manager $manager */
$manager = app(Arcanedev\LaravelSettings\Contracts\Manager::class);
$manager = app(Manager::class);

return $driver ? $manager->driver($driver) : $manager;
}
Expand Down
10 changes: 4 additions & 6 deletions tests/Stores/AbstractStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@ public function it_can_set_with_nested_keys()
static::assertStoreHasData($store, ['foo' => ['bar' => 'baz']]);
}

/**
* @test
*
* @expectedException \UnexpectedValueException
* @expectedExceptionMessage Non-array segment encountered
*/
/** @test */
public function it_must_throw_an_exception_when_setting_nested_key_on_non_array_member()
{
$this->expectException(\UnexpectedValueException::class);
$this->expectExceptionMessage('Non-array segment encountered');

$store = $this->createStore();

$store->set('foo', 'bar');
Expand Down
8 changes: 3 additions & 5 deletions tests/Stores/JsonStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ private function getFixtureFilePath()
return __DIR__.'/../fixtures/database/json-settings.json';
}

/**
* @test
*
* @expectedException \RuntimeException
*/
/** @test */
public function it_must_throw_an_exception_when_file_is_invalid()
{
$this->expectException(\RuntimeException::class);

/** @var \Arcanedev\LaravelSettings\Stores\JsonStore $store */
$store = $this->createStore();

Expand Down

0 comments on commit 2089e2a

Please sign in to comment.