Skip to content

Commit

Permalink
Merge branch '5.8' of github.com:laravel/framework into 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 1, 2019
2 parents bc884bb + 39f266d commit 0062459
Show file tree
Hide file tree
Showing 37 changed files with 190 additions and 75 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG-5.8.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Release Notes for 5.8.x

## [Unreleased](https://github.com/laravel/framework/compare/v5.8.0...5.8)
## [Unreleased](https://github.com/laravel/framework/compare/v5.8.2...5.8)


## [v5.8.2 (2019-02-27)](https://github.com/laravel/framework/compare/v5.8.1...v5.8.2)

### Fixed
- Fixed quoted environment variable parsing ([#27691](https://github.com/laravel/framework/pull/27691))


## [v5.8.1 (2019-02-27)](https://github.com/laravel/framework/compare/v5.8.0...v5.8.1)

### Added
- Added `Illuminate\View\FileViewFinder::setPaths()` ([#27678](https://github.com/laravel/framework/pull/27678))

### Changed
- Return fake objects from facades ([#27680](https://github.com/laravel/framework/pull/27680))

### Reverted
- reverted changes related to the `Facade` ([63d87d7](https://github.com/laravel/framework/commit/63d87d78e08cc502947f07ebbfa4993955339c5a))


## [v5.8.0 (2019-02-26)](https://github.com/laravel/framework/compare/5.7...v5.8.0)
Expand Down
8 changes: 6 additions & 2 deletions src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,20 @@ class Gate implements GateContract
* @param array $policies
* @param array $beforeCallbacks
* @param array $afterCallbacks
* @param callable $guessPolicyNamesUsingCallback
* @return void
*/
public function __construct(Container $container, callable $userResolver, array $abilities = [],
array $policies = [], array $beforeCallbacks = [], array $afterCallbacks = [])
array $policies = [], array $beforeCallbacks = [], array $afterCallbacks = [],
callable $guessPolicyNamesUsingCallback = null)
{
$this->policies = $policies;
$this->container = $container;
$this->abilities = $abilities;
$this->userResolver = $userResolver;
$this->afterCallbacks = $afterCallbacks;
$this->beforeCallbacks = $beforeCallbacks;
$this->guessPolicyNamesUsingCallback = $guessPolicyNamesUsingCallback;
}

/**
Expand Down Expand Up @@ -700,7 +703,8 @@ public function forUser($user)

return new static(
$this->container, $callback, $this->abilities,
$this->policies, $this->beforeCallbacks, $this->afterCallbacks
$this->policies, $this->beforeCallbacks, $this->afterCallbacks,
$this->guessPolicyNamesUsingCallback
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Notifications/NotificationSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected function queueNotification($notifiables, $notification)
foreach ($notifiables as $notifiable) {
$notificationId = Str::uuid()->toString();

foreach ($original->via($notifiable) as $channel) {
foreach ((array) $original->via($notifiable) as $channel) {
$notification = clone $original;

$notification->id = $notificationId;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RouteCollection implements Countable, IteratorAggregate
protected $routes = [];

/**
* An flattened array of all of the routes.
* A flattened array of all of the routes.
*
* @var array
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Illuminate/Support/MessageBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public function merge($messages)
*/
public function has($key)
{
if ($this->isEmpty()) {
return false;
}

if (is_null($key)) {
return $this->any();
}
Expand All @@ -128,6 +132,10 @@ public function has($key)
*/
public function hasAny($keys = [])
{
if ($this->isEmpty()) {
return false;
}

$keys = is_array($keys) ? $keys : func_get_args();

foreach ($keys as $key) {
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ function env($key, $default = null)
return;
}

if (preg_match('/([\'"])(.*)\1/', $value, $matches)) {
if (preg_match('/\A([\'"])(.*)\1\z/', $value, $matches)) {
return $matches[2];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFlightsTable extends Migration
Expand All @@ -12,7 +13,7 @@ class CreateFlightsTable extends Migration
*/
public function up()
{
Schema::create('flights', function ($table) {
Schema::create('flights', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
});
Expand Down
3 changes: 2 additions & 1 deletion tests/Integration/Auth/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Auth\Events\Authenticated;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Tests\Integration\Auth\Fixtures\AuthenticationTestUser;

/**
Expand All @@ -38,7 +39,7 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('email');
$table->string('username');
Expand Down
7 changes: 4 additions & 3 deletions tests/Integration/Database/EloquentBelongsToManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Database\Eloquent\ModelNotFoundException;
Expand All @@ -21,19 +22,19 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('posts', function ($table) {
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->timestamps();
});

Schema::create('tags', function ($table) {
Schema::create('tags', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->timestamps();
});

Schema::create('posts_tags', function ($table) {
Schema::create('posts_tags', function (Blueprint $table) {
$table->integer('post_id');
$table->integer('tag_id');
$table->string('flag')->default('');
Expand Down
3 changes: 2 additions & 1 deletion tests/Integration/Database/EloquentBelongsToTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Tests\Integration\Database\DatabaseTestCase;

/**
Expand All @@ -16,7 +17,7 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('slug')->nullable();
$table->unsignedInteger('parent_id')->nullable();
Expand Down
3 changes: 2 additions & 1 deletion tests/Integration/Database/EloquentCollectionFreshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;

/**
* @group integration
Expand All @@ -14,7 +15,7 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('email');
});
Expand Down
7 changes: 4 additions & 3 deletions tests/Integration/Database/EloquentCustomPivotCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\Relations\Pivot;

/**
Expand All @@ -15,17 +16,17 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('email');
});

Schema::create('projects', function ($table) {
Schema::create('projects', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
});

Schema::create('project_users', function ($table) {
Schema::create('project_users', function (Blueprint $table) {
$table->integer('user_id');
$table->integer('project_id');
$table->text('permissions');
Expand Down
7 changes: 4 additions & 3 deletions tests/Integration/Database/EloquentDeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
Expand All @@ -29,20 +30,20 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('posts', function ($table) {
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->nullable();
$table->timestamps();
});

Schema::create('comments', function ($table) {
Schema::create('comments', function (Blueprint $table) {
$table->increments('id');
$table->string('body')->nullable();
$table->integer('post_id');
$table->timestamps();
});

Schema::create('roles', function ($table) {
Schema::create('roles', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();
Expand Down
13 changes: 7 additions & 6 deletions tests/Integration/Database/EloquentFactoryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factory;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\Collection;

/**
Expand Down Expand Up @@ -107,36 +108,36 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email');
});

Schema::create('profiles', function ($table) {
Schema::create('profiles', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
});

Schema::create('teams', function ($table) {
Schema::create('teams', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('owner_id');
});

Schema::create('team_users', function ($table) {
Schema::create('team_users', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('team_id');
$table->unsignedInteger('user_id');
});

Schema::connection('alternative-connection')->create('users', function ($table) {
Schema::connection('alternative-connection')->create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email');
});

Schema::create('servers', function ($table) {
Schema::create('servers', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('tags');
Expand Down
9 changes: 5 additions & 4 deletions tests/Integration/Database/EloquentHasManyThroughTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Tests\Integration\Database\DatabaseTestCase;

Expand All @@ -17,26 +18,26 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('users', function ($table) {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('slug')->nullable();
$table->integer('team_id')->nullable();
$table->string('name');
});

Schema::create('teams', function ($table) {
Schema::create('teams', function (Blueprint $table) {
$table->increments('id');
$table->integer('owner_id')->nullable();
$table->string('owner_slug')->nullable();
});

Schema::create('categories', function ($table) {
Schema::create('categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('parent_id')->nullable();
$table->softDeletes();
});

Schema::create('products', function ($table) {
Schema::create('products', function (Blueprint $table) {
$table->increments('id');
$table->integer('category_id');
});
Expand Down
7 changes: 4 additions & 3 deletions tests/Integration/Database/EloquentLazyEagerLoadingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Tests\Integration\Database\DatabaseTestCase;

/**
Expand All @@ -16,16 +17,16 @@ protected function setUp(): void
{
parent::setUp();

Schema::create('one', function ($table) {
Schema::create('one', function (Blueprint $table) {
$table->increments('id');
});

Schema::create('two', function ($table) {
Schema::create('two', function (Blueprint $table) {
$table->increments('id');
$table->integer('one_id');
});

Schema::create('three', function ($table) {
Schema::create('three', function (Blueprint $table) {
$table->increments('id');
$table->integer('one_id');
});
Expand Down
Loading

0 comments on commit 0062459

Please sign in to comment.