Skip to content

Commit f678516

Browse files
committed
fix conflicts
2 parents 182027d + 0607db0 commit f678516

File tree

8 files changed

+44
-8
lines changed

8 files changed

+44
-8
lines changed

CHANGELOG-5.4.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
- Added `tap()` method to query builder ([#18284](https://github.com/laravel/framework/pull/18284))
1313
- Added `orderByDesc()` methods to query builder ([#18292](https://github.com/laravel/framework/pull/18292))
1414
- Added `Container::makeWith()` method ([#18271](https://github.com/laravel/framework/pull/18271), [#18320](https://github.com/laravel/framework/pull/18320))
15+
- Added `InteractsWithDatabase::assertSoftDeleted()` ([#18328](https://github.com/laravel/framework/pull/18328), [2d4e1f0](https://github.com/laravel/framework/commit/2d4e1f0fe0bae3c7e3304317a69d619e71e476cc), [f89f917](https://github.com/laravel/framework/commit/f89f917b256ad79df786c688b11247ce1e48299a))
16+
- Added ability to set queue parameters inside queued listeners ([#18375](https://github.com/laravel/framework/pull/18375), [cf461e2](https://github.com/laravel/framework/commit/cf461e23b6123ba6ed084d2fb8e8306482973b88))
17+
- Added `-q` shorthand for `make:listener --queued` ([#18362](https://github.com/laravel/framework/pull/18362))
18+
- Added `Model::setKeyType()` ([#18354](https://github.com/laravel/framework/pull/18354))
19+
- Output migration name before starting a migration or rollback ([#18379](https://github.com/laravel/framework/pull/18379), [e47e8b1](https://github.com/laravel/framework/commit/e47e8b16c1e65d752943faaa65db14ca323f5feb))
1520

1621
### Changed
1722
- Throw exception when `bootstrap/cache` directory is not writable ([#18188](https://github.com/laravel/framework/pull/18188), [b4f0005](https://github.com/laravel/framework/commit/b4f000516166b0694e842d64f5b2fde1167d4690))
@@ -26,13 +31,18 @@
2631
- Prevent `make:auth` from overwriting existing views ([#18319](https://github.com/laravel/framework/pull/18319), [bef8f35](https://github.com/laravel/framework/commit/bef8f35694b7c22516a27929dbfc4c49032f78c6))
2732
- Ensure Mailable view data is not overridden by order of operations ([#18322](https://github.com/laravel/framework/pull/18322))
2833
- Use `getAuthIdentifier()` method in broadcasters ([#18351](https://github.com/laravel/framework/pull/18351))
34+
- Use atomic cache operation when checking for event overlaps ([8ebb5b8](https://github.com/laravel/framework/commit/8ebb5b859ae8f2382a1836a83a47542de234d63a))
35+
- Return pretty JSON response from `HasInDatabase::failureDescription()` ([#18377](https://github.com/laravel/framework/pull/18377))
2936

3037
### Fixed
3138
- Fixed an issue with slots when passed content equals `null` ([#18246](https://github.com/laravel/framework/pull/18246))
3239
- Do require `Closure` in `orWhereHas()` ([#18277](https://github.com/laravel/framework/pull/18277))
3340
- Let PHP parse `@includeWhen` directive ([#18285](https://github.com/laravel/framework/pull/18285))
3441
- Only include `.php` files when loading database factories ([#18336](https://github.com/laravel/framework/pull/18336))
3542
- Fixed PHP 5.6 issue in `FileFactory::generateImage()` ([#18345](https://github.com/laravel/framework/pull/18345))
43+
- Allow `ImplicitRouteBinding` to match camelcase method parameter names ([#18307](https://github.com/laravel/framework/pull/18307), [4ae31a1](https://github.com/laravel/framework/commit/4ae31a154f81c2d76c7397dbdebfcac0e74e4ccd))
44+
- Fixing weird behaviour of `Connection::getConfig()` when `null` was passed ([#18356](https://github.com/laravel/framework/pull/18356))
45+
- Attempt to solve an issue with using `required_*` rules while the `ConvertEmptyStringToNull` middleware is applied ([#18376](https://github.com/laravel/framework/pull/18376))
3646

3747

3848
## v5.4.15 (2017-03-02)

src/Illuminate/Database/Eloquent/Concerns/HasEvents.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ protected function fireModelEvent($event, $halt = true)
136136
// returns a result we can return that result, or we'll call the string events.
137137
$method = $halt ? 'until' : 'fire';
138138

139-
$result = $this->fireCustomModelEvent($event, $method);
139+
$result = $this->filterModelEventResults(
140+
$this->fireCustomModelEvent($event, $method)
141+
);
140142

141143
if ($result === false) {
142144
return false;
@@ -167,6 +169,23 @@ protected function fireCustomModelEvent($event, $method)
167169
}
168170
}
169171

172+
/**
173+
* Filter the model event results.
174+
*
175+
* @param mixed $result
176+
* @return mixed
177+
*/
178+
protected function filterModelEventResults($result)
179+
{
180+
if (is_array($result)) {
181+
$result = array_filter($result, function ($response) {
182+
return ! is_null($response);
183+
});
184+
}
185+
186+
return $result;
187+
}
188+
170189
/**
171190
* Register a saving model event with the dispatcher.
172191
*

src/Illuminate/Database/Migrations/Migrator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ protected function runUp($file, $batch, $pretend)
172172
return $this->pretendToRun($migration, 'up');
173173
}
174174

175+
$this->note("<comment>Migrating:</comment> {$name}");
176+
175177
$this->runMigration($migration, 'up');
176178

177179
// Once we have run a migrations class, we will log that it was run in this
@@ -317,6 +319,8 @@ protected function runDown($file, $migration, $pretend)
317319
$name = $this->getMigrationName($file)
318320
);
319321

322+
$this->note("<comment>Rolling back:</comment> {$name}");
323+
320324
if ($pretend) {
321325
return $this->pretendToRun($instance, 'down');
322326
}

src/Illuminate/Foundation/Console/ListenerMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function getOptions()
113113
return [
114114
['event', 'e', InputOption::VALUE_REQUIRED, 'The event class being listened for.'],
115115

116-
['queued', 'q', InputOption::VALUE_NONE, 'Indicates the event listener should be queued.'],
116+
['queued', null, InputOption::VALUE_NONE, 'Indicates the event listener should be queued.'],
117117
];
118118
}
119119
}

src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function failureDescription($table)
6363
{
6464
return sprintf(
6565
"a row in the table [%s] matches the attributes %s.\n\n%s",
66-
$table, $this->toString(), $this->getAdditionalInfo($table)
66+
$table, $this->toString(JSON_PRETTY_PRINT), $this->getAdditionalInfo($table)
6767
);
6868
}
6969

@@ -93,10 +93,11 @@ protected function getAdditionalInfo($table)
9393
/**
9494
* Get a string representation of the object.
9595
*
96+
* @param int $options
9697
* @return string
9798
*/
98-
public function toString()
99+
public function toString($options = 0)
99100
{
100-
return json_encode($this->data);
101+
return json_encode($this->data, $options);
101102
}
102103
}

src/Illuminate/Support/Facades/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @method static int|null id()
1212
* @method static bool validate(array $credentials = [])
1313
* @method static void setUser(\Illuminate\Contracts\Auth\Authenticatable $user)
14-
* @method static bool attempt(array $credentials = [], bool $remember = false, bool $login = true)
14+
* @method static bool attempt(array $credentials = [], bool $remember = false)
1515
* @method static bool once(array $credentials = [])
1616
* @method static void login(\Illuminate\Contracts\Auth\Authenticatable $user, bool $remember = false)
1717
* @method static \Illuminate\Contracts\Auth\Authenticatable loginUsingId(mixed $id, bool $remember = false)

src/Illuminate/Support/Facades/Event.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Support\Facades;
44

5+
use Illuminate\Database\Eloquent\Model;
56
use Illuminate\Support\Testing\Fakes\EventFake;
67

78
/**
@@ -16,7 +17,9 @@ class Event extends Facade
1617
*/
1718
public static function fake()
1819
{
19-
static::swap(new EventFake);
20+
static::swap($fake = new EventFake);
21+
22+
Model::setEventDispatcher($fake);
2023
}
2124

2225
/**

tests/Foundation/FoundationInteractsWithDatabaseTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public function testDontSeeInDatabaseDoesNotFindResults()
8989

9090
/**
9191
* @expectedException \PHPUnit\Framework\ExpectationFailedException
92-
* @expectedExceptionMessage a row in the table [products] does not match the attributes {"title":"Spark"}
9392
*/
9493
public function testDontSeeInDatabaseFindsResults()
9594
{

0 commit comments

Comments
 (0)