Skip to content

Commit

Permalink
Add Laravel 6.0 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
EcoinTest committed Sep 18, 2019
1 parent a8c9c68 commit f53a74e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
Binary file added .phpintel/9a61876eeb183760807a2dc585ba338f
Binary file not shown.
Binary file added .phpintel/dc5064f39c91477a8d52fa1b186d34c0
Binary file not shown.
Binary file added .phpintel/index
Binary file not shown.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/Cloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
22 changes: 11 additions & 11 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,42 +73,42 @@ 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();
$table->timestamps();
});

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();
});
}
Expand Down

0 comments on commit f53a74e

Please sign in to comment.