Skip to content

Commit 25ddda9

Browse files
committed
Merge branch '4.x' into develop
2 parents 19e4688 + 5749c37 commit 25ddda9

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

init/functions.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -365,20 +365,6 @@ function array_except($array, $keys)
365365
}
366366
}
367367

368-
if (!function_exists('array_first')) {
369-
/**
370-
* array_first returns the first element in an array passing a given truth test
371-
* @param array $array
372-
* @param callable|null $callback
373-
* @param mixed $default
374-
* @return mixed
375-
*/
376-
function array_first($array, $callback = null, $default = null)
377-
{
378-
return Arr::first($array, $callback, $default);
379-
}
380-
}
381-
382368
if (!function_exists('array_flatten')) {
383369
/**
384370
* array_flatten flattens a multi-dimensional array into a single level
@@ -432,20 +418,6 @@ function array_has($array, $keys)
432418
}
433419
}
434420

435-
if (!function_exists('array_last')) {
436-
/**
437-
* array_last returns the last element in an array passing a given truth test
438-
* @param array $array
439-
* @param callable|null $callback
440-
* @param mixed $default
441-
* @return mixed
442-
*/
443-
function array_last($array, $callback = null, $default = null)
444-
{
445-
return Arr::last($array, $callback, $default);
446-
}
447-
}
448-
449421
if (!function_exists('array_only')) {
450422
/**
451423
* array_only gets a subset of the items from the given array

src/Composer/ComposerManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ public static function instance(): static
4343
{
4444
try {
4545
return App::make('core.composer');
46-
} catch (\Illuminate\Contracts\Container\BindingResolutionException $e) {
47-
return new static();
46+
}
47+
catch (Exception $ex) {
48+
return new static;
4849
}
4950
}
5051

src/Database/Traits/SortableRelation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function initializeSortableRelation()
6262
*/
6363
protected function defineSortableRelations()
6464
{
65-
$interactsWithPivot = ['belongsToMany'];
65+
$interactsWithPivot = ['belongsToMany', 'morphToMany'];
6666
$sortableRelations = [];
6767

6868
foreach ($interactsWithPivot as $type) {

0 commit comments

Comments
 (0)