diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml
new file mode 100644
index 0000000..560c42b
--- /dev/null
+++ b/.github/workflows/composer-normalize.yml
@@ -0,0 +1,22 @@
+name: normalize composer.json
+
+on:
+ push:
+ paths:
+ - 'composer.json'
+
+jobs:
+ normalize:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git checkout
+ uses: actions/checkout@v2
+
+ - name: normalize composer.json
+ run: |
+ composer global require ergebnis/composer-normalize
+ composer normalize
+
+ - uses: stefanzweifel/git-auto-commit-action@v4.0.0
+ with:
+ commit_message: normalize composer.json
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 5947968..82d62c5 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -10,7 +10,7 @@ jobs:
matrix:
os: [ubuntu-latest]
php: [7.4]
- laravel: [6.*]
+ laravel: [7.*, 6.*]
dependency-version: [prefer-lowest, prefer-stable]
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77d8625..13ae1da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
# Changelog
-All notable changes to `laravel-sync-one-to-many` will be documented in this file
+All notable changes to `eloquent-sync-one-to-many` will be documented in this file
+
+## 0.2.0 - 2020-04-06
+
+- add Laravel 7 support
## 0.1.0 - 2013-03-04
diff --git a/composer.json b/composer.json
index 965261c..6a8238f 100644
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,6 @@
{
"name": "elbgoods/eloquent-sync-one-to-many",
+ "type": "library",
"description": "",
"keywords": [
"elbgoods",
@@ -7,27 +8,37 @@
],
"homepage": "https://github.com/elbgoods/laravel-sync-one-to-many",
"license": "MIT",
- "type": "library",
"authors": [
{
"name": "Niclas Schirrmeister",
"email": "nschirrmeister@elbgoods.de",
"role": "Developer"
- }, {
+ },
+ {
"name": "Tom Witkowski",
"email": "twitkowski@elbgoods.de",
+ "homepage": "https://gummibeer.de",
"role": "Developer"
}
],
"require": {
"php": "^7.4",
- "illuminate/support": "^6.0"
+ "illuminate/support": "^6.0 || ^7.0"
},
"require-dev": {
- "elbgoods/ci-test-tools": "^1.6",
- "orchestra/database": "^4.3",
- "orchestra/testbench": "^4.0",
- "phpunit/phpunit": "^8.0"
+ "bamarni/composer-bin-plugin": "^1.3",
+ "orchestra/testbench": "^4.0 || ^5.0",
+ "phpunit/phpunit": "^8.0 || ^9.0"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Elbgoods\\SyncOneToMany\\SyncOneToManyServiceProvider"
+ ]
+ }
},
"autoload": {
"psr-4": {
@@ -36,30 +47,27 @@
},
"autoload-dev": {
"psr-4": {
- "Elbgoods\\SyncOneToMany\\Tests\\": "tests"
+ "Elbgoods\\SyncOneToMany\\Tests\\": "tests",
+ "Elbgoods\\CiTestTools\\": "vendor-bin/elbgoods/vendor/elbgoods/ci-test-tools/src"
}
},
"scripts": {
+ "post-install-cmd": [
+ "@composer bin all install --ansi"
+ ],
+ "post-update-cmd": [
+ "@composer bin all update --ansi"
+ ],
+ "bin": "echo 'bin not installed'",
"test": [
"vendor/bin/phpunit",
"vendor/bin/php-cs-test",
- "vendor/bin/php-tlint-test .",
+ "vendor/bin/php-tlint-test ./src",
"vendor/bin/php-md-test ./src",
"vendor/bin/php-insights-test",
- "vendor/bin/php-mn-test",
+ "vendor/bin/php-mn-test ./src",
"vendor/bin/php-stan-test"
],
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
-
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "laravel": {
- "providers": [
- "Elbgoods\\SyncOneToMany\\SyncOneToManyServiceProvider"
- ]
- }
}
}
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 97496f0..bd9094b 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -1,6 +1,6 @@
includes:
- - ./vendor/nunomaduro/larastan/extension.neon
- - ./vendor/elbgoods/ci-test-tools/configs/phpstan.neon.dist
+ - ./vendor-bin/elbgoods/vendor/nunomaduro/larastan/extension.neon
+ - ./vendor-bin/elbgoods/vendor/elbgoods/ci-test-tools/configs/phpstan.neon.dist
parameters:
paths:
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f2eebe0..1304bb0 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -19,4 +19,8 @@
src/
+
+
+
+
diff --git a/tests/TestCase.php b/tests/TestCase.php
index c5e2135..2fc111f 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -29,17 +29,6 @@ protected function getPackageProviders($app)
];
}
- protected function getEnvironmentSetUp($app)
- {
- // Setup default database to use sqlite :memory:
- $app['config']->set('database.default', 'testbench');
- $app['config']->set('database.connections.testbench', [
- 'driver' => 'sqlite',
- 'database' => ':memory:',
- 'prefix' => '',
- ]);
- }
-
protected function assertAttached(array $expectedIds, array $syncResult): void
{
$this->assertArrayHasKey('attached', $syncResult);
diff --git a/vendor-bin/elbgoods/composer.json b/vendor-bin/elbgoods/composer.json
new file mode 100644
index 0000000..f442f82
--- /dev/null
+++ b/vendor-bin/elbgoods/composer.json
@@ -0,0 +1,5 @@
+{
+ "require-dev": {
+ "elbgoods/ci-test-tools": "^1.9.2"
+ }
+}