diff --git a/.phpintel/9a61876eeb183760807a2dc585ba338f b/.phpintel/9a61876eeb183760807a2dc585ba338f new file mode 100644 index 0000000..640e9c8 Binary files /dev/null and b/.phpintel/9a61876eeb183760807a2dc585ba338f differ diff --git a/.phpintel/dc5064f39c91477a8d52fa1b186d34c0 b/.phpintel/dc5064f39c91477a8d52fa1b186d34c0 new file mode 100644 index 0000000..3d6eba7 Binary files /dev/null and b/.phpintel/dc5064f39c91477a8d52fa1b186d34c0 differ diff --git a/.phpintel/index b/.phpintel/index new file mode 100644 index 0000000..a234f15 Binary files /dev/null and b/.phpintel/index differ diff --git a/composer.json b/composer.json index 3c4bdba..19a16b8 100644 --- a/composer.json +++ b/composer.json @@ -9,15 +9,15 @@ } ], "require": { - "php": ">=5.5.0", - "illuminate/support": "4 - 5" + "php": ">=7.0", + "illuminate/support": "^5.5|^6.0" }, "require-dev": { - "phpunit/phpunit": "~4.7", + "phpunit/phpunit": "~8.0", "bkwld/upchuck": "^2.0@dev", - "illuminate/database": "4 - 5", + "illuminate/database": "^5.5|^6.0", "league/flysystem-vfs": "^1.0", - "mockery/mockery": "^0.9.4", + "mockery/mockery": "^1.2.3", "satooshi/php-coveralls": "^1.0" }, "suggest": { diff --git a/src/Cloner.php b/src/Cloner.php index 6f57388..4aea69a 100644 --- a/src/Cloner.php +++ b/src/Cloner.php @@ -168,7 +168,7 @@ protected function duplicatePivotedRelation($relation, $relation_name, $clone) { // Loop trough current relations and attach to clone $relation->get()->each(function ($foreign) use ($clone, $relation_name) { - $pivot_attributes = array_except($foreign->pivot->getAttributes(), [ + $pivot_attributes = Arr::except($foreign->pivot->getAttributes(), [ $foreign->pivot->getRelatedKey(), $foreign->pivot->getForeignKey(), $foreign->pivot->getCreatedAtColumn(), diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index 0f87acd..4af3b91 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -73,26 +73,26 @@ protected function setUpDatabase() { // https://github.com/laracasts/TestDummy/blob/master/tests/FactoryTest.php#L31 protected function migrateTables($connection = 'default') { DB::connection($connection)->getSchemaBuilder()->create('articles', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->string('title'); $table->timestamps(); }); DB::connection($connection)->getSchemaBuilder()->create('authors', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->string('name'); $table->timestamps(); }); DB::connection($connection)->getSchemaBuilder()->create('article_author', function (Blueprint $table) { - $table->increments('id'); - $table->integer('article_id')->unsigned(); - $table->integer('author_id')->unsigned(); + $table->bigIncrements('id'); + $table->bigInteger('article_id')->unsigned(); + $table->bigInteger('author_id')->unsigned(); }); DB::connection($connection)->getSchemaBuilder()->create('photos', function (Blueprint $table) { - $table->increments('id'); - $table->integer('article_id')->unsigned(); + $table->bigIncrements('id'); + $table->bigInteger('article_id')->unsigned(); $table->string('uid'); $table->string('image'); $table->boolean('source')->nullable(); @@ -100,15 +100,15 @@ protected function migrateTables($connection = 'default') { }); DB::connection($connection)->getSchemaBuilder()->create('users', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->string('name'); $table->timestamps(); }); DB::connection($connection)->getSchemaBuilder()->create('article_user', function (Blueprint $table) { - $table->integer('rating')->unsigned(); - $table->integer('user_id')->unsigned(); - $table->integer('article_id')->unsigned(); + $table->bigInteger('rating')->unsigned(); + $table->bigInteger('user_id')->unsigned(); + $table->bigInteger('article_id')->unsigned(); $table->timestamps(); }); }