Skip to content

Commit 3532962

Browse files
Merge branch '5.6'
2 parents 74cf203 + 296fb16 commit 3532962

File tree

19 files changed

+193
-128
lines changed

19 files changed

+193
-128
lines changed

CHANGELOG-5.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release Notes for 5.5.x
22

3+
## [Unreleased]
4+
5+
### Changed
6+
- Only set id on `NotificationFake` if no id is set ([#23474](https://github.com/laravel/framework/pull/23474))
7+
- Removed attribute filling from pivot models ([#23554](https://github.com/laravel/framework/pull/23554))
8+
9+
310
## v5.5.39 (2018-03-09)
411

512
### Fixed

src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
<div class="form-group row">
4545
<label for="password-confirm" class="col-md-4 col-form-label text-md-right">{{ __('Confirm Password') }}</label>
46+
4647
<div class="col-md-6">
4748
<input id="password-confirm" type="password" class="form-control{{ $errors->has('password_confirmation') ? ' is-invalid' : '' }}" name="password_confirmation" required>
4849

src/Illuminate/Console/Scheduling/CallbackEvent.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ public function run(Container $container)
6060
return;
6161
}
6262

63-
register_shutdown_function(function () {
64-
$this->removeMutex();
63+
$pid = getmypid();
64+
65+
register_shutdown_function(function () use ($pid) {
66+
if ($pid === getmypid()) {
67+
$this->removeMutex();
68+
}
6569
});
6670

6771
parent::callBeforeCallbacks($container);

src/Illuminate/Contracts/Broadcasting/ShouldBroadcast.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace Illuminate\Contracts\Broadcasting;
44

5+
use Illuminate\Broadcasting\Channel;
6+
57
interface ShouldBroadcast
68
{
79
/**
810
* Get the channels the event should broadcast on.
911
*
10-
* @return array
12+
* @return Channel|Channel[]
1113
*/
1214
public function broadcastOn();
1315
}

src/Illuminate/Database/Eloquent/Factory.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,12 @@ public function state($class, $state, $attributes)
116116
*
117117
* @param string $class
118118
* @param callable $callback
119+
* @param string $name
119120
* @return $this
120121
*/
121-
public function afterMaking($class, $callback)
122+
public function afterMaking($class, callable $callback, $name = 'default')
122123
{
123-
$this->afterMaking[$class]['default'][] = $callback;
124+
$this->afterMaking[$class][$name][] = $callback;
124125

125126
return $this;
126127
}
@@ -133,23 +134,22 @@ public function afterMaking($class, $callback)
133134
* @param callable $callback
134135
* @return $this
135136
*/
136-
public function afterMakingState($class, $state, $callback)
137+
public function afterMakingState($class, $state, callable $callback)
137138
{
138-
$this->afterMaking[$class][$state][] = $callback;
139-
140-
return $this;
139+
return $this->afterMaking($class, $callback, $state);
141140
}
142141

143142
/**
144143
* Define a callback to run after creating a model.
145144
*
146145
* @param string $class
147146
* @param callable $callback
147+
* @param string $name
148148
* @return $this
149149
*/
150-
public function afterCreating($class, $callback)
150+
public function afterCreating($class, callable $callback, $name = 'default')
151151
{
152-
$this->afterCreating[$class]['default'][] = $callback;
152+
$this->afterCreating[$class][$name][] = $callback;
153153

154154
return $this;
155155
}
@@ -162,11 +162,9 @@ public function afterCreating($class, $callback)
162162
* @param callable $callback
163163
* @return $this
164164
*/
165-
public function afterCreatingState($class, $state, $callback)
165+
public function afterCreatingState($class, $state, callable $callback)
166166
{
167-
$this->afterCreating[$class][$state][] = $callback;
168-
169-
return $this;
167+
return $this->afterCreating($class, $callback, $state);
170168
}
171169

172170
/**

src/Illuminate/Database/Query/Grammars/Grammar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ protected function compileUnions(Builder $query)
652652
*/
653653
protected function compileUnion(array $union)
654654
{
655-
$conjuction = $union['all'] ? ' union all ' : ' union ';
655+
$conjunction = $union['all'] ? ' union all ' : ' union ';
656656

657-
return $conjuction.$union['query']->toSql();
657+
return $conjunction.$union['query']->toSql();
658658
}
659659

660660
/**

src/Illuminate/Database/Query/Grammars/MySqlGrammar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public function compileSelect(Builder $query)
6060
*/
6161
protected function compileUnion(array $union)
6262
{
63-
$conjuction = $union['all'] ? ' union all ' : ' union ';
63+
$conjunction = $union['all'] ? ' union all ' : ' union ';
6464

65-
return $conjuction.'('.$union['query']->toSql().')';
65+
return $conjunction.'('.$union['query']->toSql().')';
6666
}
6767

6868
/**

src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public function compileSelect(Builder $query)
6363
*/
6464
protected function compileUnion(array $union)
6565
{
66-
$conjuction = $union['all'] ? ' union all ' : ' union ';
66+
$conjunction = $union['all'] ? ' union all ' : ' union ';
6767

68-
return $conjuction.'select * from ('.$union['query']->toSql().')';
68+
return $conjunction.'select * from ('.$union['query']->toSql().')';
6969
}
7070

7171
/**

src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function addForeignKeys(Blueprint $blueprint)
8484

8585
// If this foreign key specifies the action to be taken on update we will add
8686
// that to the statement here. We'll append it to this SQL and then return
87-
// the SQL so we can keep adding any other foreign consraints onto this.
87+
// the SQL so we can keep adding any other foreign constraints onto this.
8888
if (! is_null($foreign->onUpdate)) {
8989
$sql .= " on update {$foreign->onUpdate}";
9090
}

src/Illuminate/Foundation/Application.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,7 @@ public function environment()
481481
if (func_num_args() > 0) {
482482
$patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args();
483483

484-
foreach ($patterns as $pattern) {
485-
if (Str::is($pattern, $this['env'])) {
486-
return true;
487-
}
488-
}
489-
490-
return false;
484+
return Str::is($patterns, $this['env']);
491485
}
492486

493487
return $this['env'];

0 commit comments

Comments
 (0)