Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnabil230 committed Oct 22, 2022
1 parent e7281a9 commit ba67db8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 33 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 2 additions & 3 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: PHPStan
on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
- "**.php"
- "phpstan.neon.dist"

jobs:
phpstan:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: "8.1"
coverage: none

- name: Install composer dependencies
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1, 8.0]
laravel: [9.*]
dependency-version: [prefer-stable]
php: [8.0, 8.1]
laravel: [8.*, 9.*]
stability: [prefer-stable]
include:
- laravel: 8.*
testbench: ^6.25
- laravel: 9.*
testbench: 7.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
Expand All @@ -29,15 +31,15 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matches
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List installed dependencies
run: composer show -D
Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ You can publish the config file with:
php artisan vendor:publish --tag="setting-config"
```

You can publish all files and run the migrations with:

```bash
php artisan setting:install
```

This is the contents of the published config file:

```php
Expand Down Expand Up @@ -65,7 +59,7 @@ return [

'drivers' => [
'database' => [
'driver' => MichaelNabil230\Setting\Stores\DatabaseSettingStore::class,
'driver' => \MichaelNabil230\Setting\Stores\DatabaseSettingStore::class,
'options' => [
'model' => Setting::class,
'table' => 'settings', // name of table in dataBase
Expand All @@ -85,7 +79,7 @@ return [
],

'json' => [
'driver' => MichaelNabil230\Setting\Stores\JsonSettingStore::class,
'driver' => \MichaelNabil230\Setting\Stores\JsonSettingStore::class,
'options' => [
'path' => storage_path('settings.json'),
]
Expand Down Expand Up @@ -274,7 +268,7 @@ return [

'drivers' => [
'database' => [
'driver' => MichaelNabil230\Setting\Stores\DatabaseSettingStore::class,
'driver' => \MichaelNabil230\Setting\Stores\DatabaseSettingStore::class,
'options' => [
'model' => Setting::class,
'table' => 'settings', // name of table in dataBase
Expand All @@ -294,7 +288,7 @@ return [
],

'json' => [
'driver' => MichaelNabil230\Setting\Stores\JsonSettingStore::class,
'driver' => \MichaelNabil230\Setting\Stores\JsonSettingStore::class,
'options' => [
'path' => storage_path('settings.json'),
]
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
],
"require": {
"php": "^8.0",
"spatie/laravel-package-tools": "^1.13.6",
"illuminate/contracts": "^8.73|^9.0"
"illuminate/contracts": "^8.73|^9.0",
"spatie/laravel-package-tools": "1.11.0"
},
"require-dev": {
"laravel/pint": "^1.0",
Expand Down
8 changes: 0 additions & 8 deletions src/SettingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use MichaelNabil230\Setting\Commands\GetSetting;
use MichaelNabil230\Setting\Commands\SetOrUpdateSetting;
use MichaelNabil230\Setting\Stores\SettingStore;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand All @@ -20,13 +19,6 @@ public function configurePackage(Package $package): void
->name('setting')
->hasConfigFile()
->hasMigration('create_settings_table')
->hasInstallCommand(function (InstallCommand $command) {
$command
->publishConfigFile()
->publishMigrations()
->askToRunMigrations()
->askToStarRepoOnGitHub('michaelnabil230/laravel-setting');
})
->hasCommands([
GetSetting::class,
ForgetSetting::class,
Expand Down

0 comments on commit ba67db8

Please sign in to comment.