Skip to content

Commit 4c0c984

Browse files
authored
Merge branch 'laravel:9.x' into 9.x
2 parents ec319da + 98a9954 commit 4c0c984

File tree

115 files changed

+3008
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3008
-267
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ jobs:
3939
strategy:
4040
fail-fast: true
4141
matrix:
42-
php: ['8.0', '8.1']
42+
php: ['8.0', 8.1]
4343
stability: [prefer-lowest, prefer-stable]
44+
include:
45+
- php: 8.2
46+
stability: prefer-stable --ignore-platform-req=php+
4447

4548
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
4649

@@ -107,8 +110,11 @@ jobs:
107110
strategy:
108111
fail-fast: true
109112
matrix:
110-
php: ['8.0', '8.1']
113+
php: ['8.0', 8.1]
111114
stability: [prefer-lowest, prefer-stable]
115+
include:
116+
- php: 8.2
117+
stability: prefer-stable --ignore-platform-req=php+
112118

113119
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows
114120

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/laravel/framework/compare/v9.28.0...9.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v9.30.0...9.x)
4+
5+
6+
## [v9.30.0](https://github.com/laravel/framework/compare/v9.29.0...v9.30.0) - 2022-09-13
7+
8+
### Added
9+
- Added stop_buffering config option to logger ([#44071](https://github.com/laravel/framework/pull/44071))
10+
- Added read-only filesystem adapter decoration as a config option ([#44079](https://github.com/laravel/framework/pull/44079))
11+
- Added scoped filesystem driver ([#44105](https://github.com/laravel/framework/pull/44105))
12+
- Add force option to all make commands ([#44100](https://github.com/laravel/framework/pull/44100))
13+
14+
### Fixed
15+
- Fixed QueryBuilder whereNot with array conditions ([#44083](https://github.com/laravel/framework/pull/44083))
16+
17+
### Changed
18+
- Passing event into viaQueue and viaConnection of Queued Listener ([#44080](https://github.com/laravel/framework/pull/44080))
19+
- Improve testability of batched jobs ([#44075](https://github.com/laravel/framework/pull/44075))
20+
- Allow any kind of whitespace in cron expression ([#44110](https://github.com/laravel/framework/pull/44110))
21+
22+
23+
## [v9.29.0](https://github.com/laravel/framework/compare/v9.28.0...v9.29.0) - 2022-09-09
24+
25+
### Added
26+
- Added RequiredIfAccepted validation rule ([#44035](https://github.com/laravel/framework/pull/44035))
27+
- Added `Illuminate/Foundation/Vite::assetPath()` ([#44037](https://github.com/laravel/framework/pull/44037))
28+
- Added ability to discard Eloquent Model changes ([#43772](https://github.com/laravel/framework/pull/43772))
29+
- Added ability to determine if attachments exist to `Illuminate/Mail/Mailable` ([#43967](https://github.com/laravel/framework/pull/43967))
30+
- Added `Illuminate/Support/Testing/Fakes/BusFake::assertNothingBatched()` ([#44056](https://github.com/laravel/framework/pull/44056))
31+
32+
### Reverted
33+
- Reverted [Fixed RoueGroup::merge to format merged prefixes correctly](https://github.com/laravel/framework/pull/44011). ([#44072](https://github.com/laravel/framework/pull/44072))
34+
35+
### Fixed
36+
- Avoid Passing null to parameter exception on PHP 8.1 ([#43951](https://github.com/laravel/framework/pull/43951))
37+
- Align Remember Me Cookie Duration with CookieJar expiration ([#44026](https://github.com/laravel/framework/pull/44026))
38+
- Fix Stringable typehints with Enumerable ([#44030](https://github.com/laravel/framework/pull/44030))
39+
- Fixed middleware "SetCacheHeaders" with file responses ([#44063](https://github.com/laravel/framework/pull/44063))
40+
41+
### Changed
42+
- Don't use locks for queue job popping for PlanetScale's MySQL-compatible Vitess engine ([#44027](https://github.com/laravel/framework/pull/44027))
43+
- Avoid matching 'use' in custom Stub templates in `Illuminate/Console/GeneratorCommand.php` ([#44049](https://github.com/laravel/framework/pull/44049))
444

545

646
## [v9.28.0](https://github.com/laravel/framework/compare/v9.27.0...v9.28.0) - 2022-09-06

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Laravel is accessible, yet powerful, providing tools needed for large, robust ap
2626

2727
Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The [Laravel documentation](https://laravel.com/docs) is in-depth and complete, making it a breeze to get started learning the framework.
2828

29+
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
30+
2931
If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 1100 video tutorials covering a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
3032

3133
## Contributing

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"symfony/mime": "^6.0",
4242
"symfony/process": "^6.0",
4343
"symfony/routing": "^6.0",
44+
"symfony/uid": "^6.0",
4445
"symfony/var-dumper": "^6.0",
4546
"tijsverkoyen/css-to-inline-styles": "^2.2.2",
4647
"vlucas/phpdotenv": "^5.4.1",
@@ -81,12 +82,15 @@
8182
"illuminate/view": "self.version"
8283
},
8384
"require-dev": {
85+
"ably/ably-php": "^1.0",
8486
"aws/aws-sdk-php": "^3.198.1",
8587
"doctrine/dbal": "^2.13.3|^3.1.4",
8688
"fakerphp/faker": "^1.9.2",
8789
"guzzlehttp/guzzle": "^7.2",
8890
"league/flysystem-aws-s3-v3": "^3.0",
8991
"league/flysystem-ftp": "^3.0",
92+
"league/flysystem-path-prefixing": "^3.3",
93+
"league/flysystem-read-only": "^3.3",
9094
"league/flysystem-sftp-v3": "^3.0",
9195
"mockery/mockery": "^1.4.4",
9296
"orchestra/testbench-core": "^7.1",
@@ -150,6 +154,8 @@
150154
"laravel/tinker": "Required to use the tinker console command (^2.0).",
151155
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).",
152156
"league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).",
157+
"league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).",
158+
"league/flysystem-read-only": "Required to use read-only disks (^3.3)",
153159
"league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).",
154160
"mockery/mockery": "Required to use mocking (^1.4.4).",
155161
"nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",

src/Illuminate/Bus/Batchable.php

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
namespace Illuminate\Bus;
44

5+
use Carbon\CarbonImmutable;
56
use Illuminate\Container\Container;
7+
use Illuminate\Support\Str;
8+
use Illuminate\Support\Testing\Fakes\BatchFake;
69

710
trait Batchable
811
{
@@ -13,13 +16,24 @@ trait Batchable
1316
*/
1417
public $batchId;
1518

19+
/**
20+
* The fake batch, if applicable.
21+
*
22+
* @var \Illuminate\Support\Testing\BatchFake
23+
*/
24+
private $fakeBatch;
25+
1626
/**
1727
* Get the batch instance for the job, if applicable.
1828
*
1929
* @return \Illuminate\Bus\Batch|null
2030
*/
2131
public function batch()
2232
{
33+
if ($this->fakeBatch) {
34+
return $this->fakeBatch;
35+
}
36+
2337
if ($this->batchId) {
2438
return Container::getInstance()->make(BatchRepository::class)->find($this->batchId);
2539
}
@@ -49,4 +63,43 @@ public function withBatchId(string $batchId)
4963

5064
return $this;
5165
}
66+
67+
/**
68+
* Indicate that the job should use a fake batch.
69+
*
70+
* @param string $id
71+
* @param string $name
72+
* @param int $totalJobs
73+
* @param int $pendingJobs
74+
* @param int $failedJobs
75+
* @param array $failedJobIds
76+
* @param array $options
77+
* @return array{0: $this, 1: \Illuminate\Support\Testing\BatchFake}
78+
*/
79+
public function withFakeBatch(string $id = '',
80+
string $name = '',
81+
int $totalJobs = 0,
82+
int $pendingJobs = 0,
83+
int $failedJobs = 0,
84+
array $failedJobIds = [],
85+
array $options = [],
86+
CarbonImmutable $createdAt = null,
87+
?CarbonImmutable $cancelledAt = null,
88+
?CarbonImmutable $finishedAt = null)
89+
{
90+
$this->fakeBatch = new BatchFake(
91+
empty($id) ? (string) Str::uuid() : $id,
92+
$name,
93+
$totalJobs,
94+
$pendingJobs,
95+
$failedJobs,
96+
$failedJobIds,
97+
$options,
98+
$createdAt ?? CarbonImmutable::now(),
99+
$cancelledAt,
100+
$finishedAt,
101+
);
102+
103+
return [$this, $this->fakeBatch];
104+
}
52105
}

src/Illuminate/Collections/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ public function put($key, $value)
974974
/**
975975
* Get one or a specified number of items randomly from the collection.
976976
*
977-
* @param (callable(TValue): int)|int|null $number
977+
* @param (callable(self<TKey, TValue>): int)|int|null $number
978978
* @return static<int, TValue>|TValue
979979
*
980980
* @throws \InvalidArgumentException

src/Illuminate/Collections/Traits/EnumeratesValues.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,7 @@ protected function operatorForWhere($key, $operator = null, $value = null)
10421042
case '>=': return $retrieved >= $value;
10431043
case '===': return $retrieved === $value;
10441044
case '!==': return $retrieved !== $value;
1045+
case '<=>': return $retrieved <=> $value;
10451046
}
10461047
};
10471048
}

src/Illuminate/Console/Scheduling/ManagesFrequencies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ public function timezone($timezone)
546546
*/
547547
protected function spliceIntoPosition($position, $value)
548548
{
549-
$segments = explode(' ', $this->expression);
549+
$segments = preg_split("/\s+/", $this->expression);
550550

551551
$segments[$position - 1] = $value;
552552

src/Illuminate/Console/Scheduling/ScheduleListCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function handle(Schedule $schedule)
145145
*/
146146
private function getCronExpressionSpacing($events)
147147
{
148-
$rows = $events->map(fn ($event) => array_map('mb_strlen', explode(' ', $event->expression)));
148+
$rows = $events->map(fn ($event) => array_map('mb_strlen', preg_split("/\s+/", $event->expression)));
149149

150150
return collect($rows[0] ?? [])->keys()->map(fn ($key) => $rows->max($key));
151151
}
@@ -159,7 +159,7 @@ private function getCronExpressionSpacing($events)
159159
*/
160160
private function formatCronExpression($expression, $spacing)
161161
{
162-
$expressions = explode(' ', $expression);
162+
$expressions = preg_split("/\s+/", $expression);
163163

164164
return collect($spacing)
165165
->map(fn ($length, $index) => str_pad($expressions[$index], $length))
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Illuminate\Contracts\View;
4+
5+
use Exception;
6+
7+
class ViewCompilationException extends Exception
8+
{
9+
//
10+
}

0 commit comments

Comments
 (0)