From 68cbfbdbac5de2a5367165dd02619b7406e2ca64 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Fri, 26 Feb 2021 18:47:58 +0100 Subject: [PATCH 1/2] Preparing the develop branch --- .github/workflows/run-tests.yml | 4 ++-- .scrutinizer.yml | 2 +- composer.json | 19 +++++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dff4929..52c44ae 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0] + php: [7.4, 8.0] dependency-version: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} @@ -31,7 +31,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.composer/cache/files - key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + key: dependencies-laravel-9-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 8a9285f..69d4755 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -22,7 +22,7 @@ checks: tools: external_code_coverage: timeout: 600 - runs: 6 + runs: 4 php_code_sniffer: enabled: true config: diff --git a/composer.json b/composer.json index 7bcab96..cf37817 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,13 @@ "require": { "php": "^7.3|^8.0", "ext-json": "*", - "arcanedev/support": "^8.0" + "arcanedev/support": "^9.0" }, "require-dev": { - "laravel/framework": "^8.19", + "laravel/framework": "^9.0", "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.4", - "phpunit/phpunit": "^9.3.3", + "orchestra/testbench-core": "^7.0", + "phpunit/phpunit": "^9.3", "predis/predis": "^1.1.1" }, "autoload": { @@ -40,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-develop": "8.x-dev" + "dev-develop": "9.x-dev" }, "laravel": { "providers": [ @@ -55,5 +55,12 @@ }, "suggest": { "illuminate/redis": "This package allows you to persist the settings into a redis server." - } + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true } From 7229c75a8ff242646d2fa5fbc17f8d252686370b Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Fri, 11 Mar 2022 21:41:32 +0100 Subject: [PATCH 2/2] Adding Laravel 9 support --- .github/workflows/run-tests.yml | 6 +++--- README.md | 4 ++-- _docs/0-Home.md | 20 ------------------- _docs/1-Installation-and-Setup.md | 3 +++ composer.json | 6 +++--- ...015_00_00_000000_create_settings_table.php | 9 ++------- 6 files changed, 13 insertions(+), 35 deletions(-) delete mode 100644 _docs/0-Home.md diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 52c44ae..6f69c3d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.0] + php: [8.0, 8.1] dependency-version: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} @@ -31,15 +31,15 @@ jobs: uses: actions/cache@v2 with: path: ~/.composer/cache/files - key: dependencies-laravel-9-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: xdebug tools: composer:v2 + coverage: pcov - name: Install dependencies run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction diff --git a/README.md b/README.md index ff184cb..bfc415e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelSettin ### Features - * Laravel `5.2` to `8.x` are supported. + * Laravel `5.2` to `9.x` are supported. * Multiple store drivers: `array`, `json`, `database`, `redis`. * Easy setup & configuration. * Well documented & IDE Friendly. @@ -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%208.x-orange.svg?style=flat-square +[badge_laravel]: https://img.shields.io/badge/Laravel-5.2%20to%209.x-orange.svg?style=flat-square [badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelSettings/run-tests?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 diff --git a/_docs/0-Home.md b/_docs/0-Home.md deleted file mode 100644 index b134dc0..0000000 --- a/_docs/0-Home.md +++ /dev/null @@ -1,20 +0,0 @@ -# LaravelSettings - -This package allows you to store/persists your settings data. - -Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelSettings/releases), [license](LICENSE.md), and [contribution guidelines](CONTRIBUTING.md). - -### Features - - * Laravel `5.2` to `8.x` are supported. - * Multiple store drivers: `array`, `json`, `database`, `redis`. - * Easy setup & configuration. - * Well documented & IDE Friendly. - * Well tested with maximum code quality. - * Made with :heart: & :coffee:. - -## Table of contents - - 1. [Installation and Setup](1-Installation-and-Setup.md) - 2. [Configuration](2-Configuration.md) - 3. [Usage](3-Usage.md) diff --git a/_docs/1-Installation-and-Setup.md b/_docs/1-Installation-and-Setup.md index 1f5775a..dfd0965 100644 --- a/_docs/1-Installation-and-Setup.md +++ b/_docs/1-Installation-and-Setup.md @@ -10,6 +10,7 @@ | Laravel | LaravelSettings | |:-----------------------------|:----------------------------------------------| +| ![Laravel v9.x][laravel_9_x] | ![LaravelSettings v9.x][laravel_settings_9_x] | | ![Laravel v8.x][laravel_8_x] | ![LaravelSettings v8.x][laravel_settings_8_x] | | ![Laravel v7.x][laravel_7_x] | ![LaravelSettings v7.x][laravel_settings_7_x] | | ![Laravel v6.x][laravel_6_x] | ![LaravelSettings v6.x][laravel_settings_6_x] | @@ -21,6 +22,7 @@ | ![Laravel v5.3][laravel_5_3] | ![LaravelSettings v0.x][laravel_settings_0_x] | | ![Laravel v5.2][laravel_5_2] | ![LaravelSettings v0.x][laravel_settings_0_x] | +[laravel_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "Laravel v9.x" [laravel_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "Laravel v8.x" [laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.x" [laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.x" @@ -32,6 +34,7 @@ [laravel_5_3]: https://img.shields.io/badge/version-5.3-blue.svg?style=flat-square "Laravel v5.3" [laravel_5_2]: https://img.shields.io/badge/version-5.2-blue.svg?style=flat-square "Laravel v5.2" +[laravel_settings_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "LaravelSettings v9.x" [laravel_settings_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "LaravelSettings v8.x" [laravel_settings_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "LaravelSettings v7.x" [laravel_settings_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "LaravelSettings v6.x" diff --git a/composer.json b/composer.json index cf37817..e1c0269 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "type": "library", "license": "MIT", "require": { - "php": "^7.3|^8.0", + "php": "^8.0", "ext-json": "*", "arcanedev/support": "^9.0" }, @@ -24,8 +24,8 @@ "laravel/framework": "^9.0", "mockery/mockery": "^1.4.2", "orchestra/testbench-core": "^7.0", - "phpunit/phpunit": "^9.3", - "predis/predis": "^1.1.1" + "phpunit/phpunit": "^9.5.10", + "predis/predis": "^1.1.9" }, "autoload": { "psr-4": { diff --git a/database/migrations/2015_00_00_000000_create_settings_table.php b/database/migrations/2015_00_00_000000_create_settings_table.php index a54764d..6f74343 100644 --- a/database/migrations/2015_00_00_000000_create_settings_table.php +++ b/database/migrations/2015_00_00_000000_create_settings_table.php @@ -5,12 +5,7 @@ use Arcanedev\Support\Database\Migration; use Illuminate\Database\Schema\Blueprint; -/** - * Class CreateSettingsTable - * - * @author ARCANEDEV - */ -class CreateSettingsTable extends Migration +return new class extends Migration { /* ----------------------------------------------------------------- | Constructor @@ -45,4 +40,4 @@ public function up(): void $table->unique(['user_id', 'key']); }); } -} +};