Skip to content

Commit 0d0f55f

Browse files
committed
fix conflicts
2 parents 50205f4 + fc71e91 commit 0d0f55f

25 files changed

+194
-85
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Release Notes for 11.x
22

3-
## [Unreleased](https://github.com/laravel/framework/compare/v11.23.4...11.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v11.23.5...11.x)
4+
5+
## [v11.23.5](https://github.com/laravel/framework/compare/v11.23.4...v11.23.5) - 2024-09-13
6+
7+
* allow recursive Model::withoutTimestamps calls by [@m1guelpf](https://github.com/m1guelpf) in https://github.com/laravel/framework/pull/52768
8+
* [11.x] Fixes out of memory issue running `route:cache` with ServeFile by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/52781
49

510
## [v11.23.4](https://github.com/laravel/framework/compare/v11.23.2...v11.23.4) - 2024-09-12
611

phpstan.types.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ parameters:
22
level: max
33
paths:
44
- types
5+
ignoreErrors:
6+
- identifier: argument.templateType

src/Illuminate/Collections/Collection.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,11 @@ public function getOrPut($key, $value)
486486
/**
487487
* Group an associative array by a field or using a callback.
488488
*
489-
* @param (callable(TValue, TKey): array-key)|array|string $groupBy
489+
* @template TGroupKey of array-key
490+
*
491+
* @param (callable(TValue, TKey): TGroupKey)|array|string $groupBy
490492
* @param bool $preserveKeys
491-
* @return static<array-key, static<array-key, TValue>>
493+
* @return static<TGroupKey, static<($preserveKeys is true ? TKey : int), TValue>>
492494
*/
493495
public function groupBy($groupBy, $preserveKeys = false)
494496
{
@@ -537,8 +539,10 @@ public function groupBy($groupBy, $preserveKeys = false)
537539
/**
538540
* Key an associative array by a field or using a callback.
539541
*
540-
* @param (callable(TValue, TKey): array-key)|array|string $keyBy
541-
* @return static<array-key, TValue>
542+
* @template TNewKey of array-key
543+
*
544+
* @param (callable(TValue, TKey): TNewKey)|array|string $keyBy
545+
* @return static<TNewKey, TValue>
542546
*/
543547
public function keyBy($keyBy)
544548
{

src/Illuminate/Collections/Enumerable.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,17 +518,21 @@ public function get($key, $default = null);
518518
/**
519519
* Group an associative array by a field or using a callback.
520520
*
521-
* @param (callable(TValue, TKey): array-key)|array|string $groupBy
521+
* @template TGroupKey of array-key
522+
*
523+
* @param (callable(TValue, TKey): TGroupKey)|array|string $groupBy
522524
* @param bool $preserveKeys
523-
* @return static<array-key, static<array-key, TValue>>
525+
* @return static<TGroupKey, static<($preserveKeys is true ? TKey : int), TValue>>
524526
*/
525527
public function groupBy($groupBy, $preserveKeys = false);
526528

527529
/**
528530
* Key an associative array by a field or using a callback.
529531
*
530-
* @param (callable(TValue, TKey): array-key)|array|string $keyBy
531-
* @return static<array-key, TValue>
532+
* @template TNewKey of array-key
533+
*
534+
* @param (callable(TValue, TKey): TNewKey)|array|string $keyBy
535+
* @return static<TNewKey, TValue>
532536
*/
533537
public function keyBy($keyBy);
534538

src/Illuminate/Collections/LazyCollection.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,11 @@ public function get($key, $default = null)
544544
/**
545545
* Group an associative array by a field or using a callback.
546546
*
547-
* @param (callable(TValue, TKey): array-key)|array|string $groupBy
547+
* @template TGroupKey of array-key
548+
*
549+
* @param (callable(TValue, TKey): TGroupKey)|array|string $groupBy
548550
* @param bool $preserveKeys
549-
* @return static<array-key, static<array-key, TValue>>
551+
* @return static<TGroupKey, static<($preserveKeys is true ? TKey : int), TValue>>
550552
*/
551553
public function groupBy($groupBy, $preserveKeys = false)
552554
{
@@ -556,8 +558,10 @@ public function groupBy($groupBy, $preserveKeys = false)
556558
/**
557559
* Key an associative array by a field or using a callback.
558560
*
559-
* @param (callable(TValue, TKey): array-key)|array|string $keyBy
560-
* @return static<array-key, TValue>
561+
* @template TNewKey of array-key
562+
*
563+
* @param (callable(TValue, TKey): TNewKey)|array|string $keyBy
564+
* @return static<TNewKey, TValue>
561565
*/
562566
public function keyBy($keyBy)
563567
{

src/Illuminate/Concurrency/ConcurrencyManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function setDefaultInstance($name)
9797
public function getInstanceConfig($name)
9898
{
9999
return $this->app['config']->get(
100-
'concurrency.drivers.'.$name, ['driver' => $name],
100+
'concurrency.driver.'.$name, ['driver' => $name],
101101
);
102102
}
103103
}

src/Illuminate/Concurrency/ProcessDriver.php

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
namespace Illuminate\Concurrency;
44

55
use Closure;
6+
use Illuminate\Console\Application;
67
use Illuminate\Contracts\Concurrency\Driver;
78
use Illuminate\Foundation\Defer\DeferredCallback;
89
use Illuminate\Process\Factory as ProcessFactory;
910
use Illuminate\Process\Pool;
1011
use Illuminate\Support\Arr;
1112
use Laravel\SerializableClosure\SerializableClosure;
12-
use Symfony\Component\Process\PhpExecutableFinder;
1313

1414
class ProcessDriver implements Driver
1515
{
@@ -26,18 +26,13 @@ public function __construct(protected ProcessFactory $processFactory)
2626
*/
2727
public function run(Closure|array $tasks): array
2828
{
29-
$php = $this->phpBinary();
30-
$artisan = $this->artisanBinary();
29+
$command = Application::formatCommandString('invoke-serialized-closure');
3130

32-
$results = $this->processFactory->pool(function (Pool $pool) use ($tasks, $php, $artisan) {
31+
$results = $this->processFactory->pool(function (Pool $pool) use ($tasks, $command) {
3332
foreach (Arr::wrap($tasks) as $task) {
3433
$pool->path(base_path())->env([
3534
'LARAVEL_INVOKABLE_CLOSURE' => serialize(new SerializableClosure($task)),
36-
])->command([
37-
$php,
38-
$artisan,
39-
'invoke-serialized-closure',
40-
]);
35+
])->command($command);
4136
}
4237
})->start()->wait();
4338

@@ -59,35 +54,14 @@ public function run(Closure|array $tasks): array
5954
*/
6055
public function defer(Closure|array $tasks): DeferredCallback
6156
{
62-
$php = $this->phpBinary();
63-
$artisan = $this->artisanBinary();
57+
$command = Application::formatCommandString('invoke-serialized-closure');
6458

65-
return defer(function () use ($tasks, $php, $artisan) {
59+
return defer(function () use ($tasks, $command) {
6660
foreach (Arr::wrap($tasks) as $task) {
6761
$this->processFactory->path(base_path())->env([
6862
'LARAVEL_INVOKABLE_CLOSURE' => serialize(new SerializableClosure($task)),
69-
])->run([
70-
$php,
71-
$artisan,
72-
'invoke-serialized-closure 2>&1 &',
73-
]);
63+
])->run($command.' 2>&1 &');
7464
}
7565
});
7666
}
77-
78-
/**
79-
* Get the PHP binary.
80-
*/
81-
protected function phpBinary(): string
82-
{
83-
return (new PhpExecutableFinder)->find(false) ?: 'php';
84-
}
85-
86-
/**
87-
* Get the Artisan binary.
88-
*/
89-
protected function artisanBinary(): string
90-
{
91-
return defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan';
92-
}
9367
}

src/Illuminate/Database/Connection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,11 @@ public function withoutPretending(Closure $callback)
672672

673673
$this->pretending = false;
674674

675-
$result = $callback();
676-
677-
$this->pretending = true;
678-
679-
return $result;
675+
try {
676+
return $callback();
677+
} finally {
678+
$this->pretending = true;
679+
}
680680
}
681681

682682
/**

src/Illuminate/Database/DetectsLostConnections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ protected function causedByLostConnection(Throwable $e)
5252
'SSL: Connection timed out',
5353
'SQLSTATE[HY000]: General error: 1105 The last transaction was aborted due to Seamless Scaling. Please retry.',
5454
'Temporary failure in name resolution',
55-
'SSL: Broken pipe',
5655
'SQLSTATE[08S01]: Communication link failure',
5756
'SQLSTATE[08006] [7] could not connect to server: Connection refused Is the server running on host',
5857
'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: No route to host',
@@ -71,6 +70,7 @@ protected function causedByLostConnection(Throwable $e)
7170
'SQLSTATE[HY000] [2002] Network is unreachable',
7271
'SQLSTATE[HY000] [2002] The requested address is not valid in its context',
7372
'SQLSTATE[HY000] [2002] A socket operation was attempted to an unreachable network',
73+
'SQLSTATE[HY000] [2002] Operation now in progress',
7474
'SQLSTATE[HY000]: General error: 3989',
7575
'went away',
7676
'No such file or directory',

src/Illuminate/Database/Schema/ForeignKeyDefinition.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ public function restrictOnUpdate()
3434
return $this->onUpdate('restrict');
3535
}
3636

37+
/**
38+
* Indicate that updates should set the foreign key value to null.
39+
*
40+
* @return $this
41+
*/
42+
public function nullOnUpdate()
43+
{
44+
return $this->onUpdate('set null');
45+
}
46+
3747
/**
3848
* Indicate that updates should have "no action".
3949
*

0 commit comments

Comments
 (0)