Skip to content

Commit bb0f788

Browse files
authored
Merge branch 'laravel:9.x' into 9.x
2 parents 7765545 + ec3958d commit bb0f788

File tree

95 files changed

+4566
-296
lines changed

Some content is hidden

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

95 files changed

+4566
-296
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: shivammathur/setup-php@v2
5353
with:
5454
php-version: ${{ matrix.php }}
55-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis-phpredis/[email protected].5, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp
55+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis-phpredis/[email protected].7, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp
5656
ini-values: error_reporting=E_ALL
5757
tools: composer:v2
5858
coverage: none

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/laravel/framework/compare/v9.34.0...9.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v9.37.0...9.x)
4+
5+
6+
## [v9.37.0](https://github.com/laravel/framework/compare/v9.36.4...v9.37.0) - 2022-10-25
7+
8+
### Added
9+
- Added optional verbose output when view caching ([#44673](https://github.com/laravel/framework/pull/44673))
10+
- Allow passing closure to rescue $report parameter ([#44710](https://github.com/laravel/framework/pull/44710))
11+
- Support preloading assets with Vite ([#44096](https://github.com/laravel/framework/pull/44096))
12+
- Added `Illuminate/Mail/Mailables/Content::htmlString()` ([#44703](https://github.com/laravel/framework/pull/44703))
13+
14+
### Fixed
15+
- Fixed model:show registering getAttribute() as a null accessor ([#44683](https://github.com/laravel/framework/pull/44683))
16+
- Fix expectations for output assertions in PendingCommand ([#44723](https://github.com/laravel/framework/pull/44723))
17+
18+
19+
## [v9.36.4](https://github.com/laravel/framework/compare/v9.36.3...v9.36.4) - 2022-10-20
20+
21+
### Added
22+
- Added rawValue to Database Query Builder (and Eloquent as wrapper) ([#44631](https://github.com/laravel/framework/pull/44631))
23+
- Added TransactionCommitting ([#44608](https://github.com/laravel/framework/pull/44608))
24+
- Added dontIncludeSource to CliDumper and HtmlDumper ([#44623](https://github.com/laravel/framework/pull/44623))
25+
- Added `Illuminate/Filesystem/FilesystemAdapter::checksum()` ([#44660](https://github.com/laravel/framework/pull/44660))
26+
- Added handlers for silently discarded and missing attribute violations ([#44664](https://github.com/laravel/framework/pull/44664))
27+
28+
### Reverted
29+
- Reverted ["Let MustVerifyEmail to be used on models without id as primary key"](https://github.com/laravel/framework/pull/44613) ([#44672](https://github.com/laravel/framework/pull/44672))
30+
31+
### Changed
32+
- Create new Json ParameterBag Instance when cloning Request ([#44671](https://github.com/laravel/framework/pull/44671))
33+
- Prevents booting providers when running env:decrypt ([#44654](https://github.com/laravel/framework/pull/44654))
34+
35+
36+
## [v9.36.3](https://github.com/laravel/framework/compare/v9.36.2...v9.36.3) - 2022-10-19
37+
38+
### Reverted
39+
- Reverts micro-optimization on view events ([#44653](https://github.com/laravel/framework/pull/44653))
40+
41+
### Fixed
42+
- Fixes blade not forgetting compiled views on view:clear ([#44643](https://github.com/laravel/framework/pull/44643))
43+
- Fixed `Illuminate/Database/Eloquent/Model::offsetExists()` ([#44642](https://github.com/laravel/framework/pull/44642))
44+
- Forget component's cache and factory between tests ([#44648](https://github.com/laravel/framework/pull/44648))
45+
46+
### Changed
47+
- Bump Testbench dependencies ([#44651](https://github.com/laravel/framework/pull/44651))
48+
49+
50+
## [v9.36.2](https://github.com/laravel/framework/compare/v9.36.1...v9.36.2) - 2022-10-18
51+
52+
### Fixed
53+
- Ensures view creators and composers are called when * is present ([#44636](https://github.com/laravel/framework/pull/44636))
54+
55+
56+
## [v9.36.1](https://github.com/laravel/framework/compare/v9.36.0...v9.36.1) - 2022-10-18
57+
58+
### Fixed
59+
- Fixes livewire components that were using createBladeViewFromString ([#pull](https://github.com/laravel/framework/pull))
60+
61+
62+
## [v9.36.0](https://github.com/laravel/framework/compare/v9.35.1...v9.36.0) - 2022-10-18
63+
64+
### Added
65+
- Added mailable assertions ([#44563](https://github.com/laravel/framework/pull/44563))
66+
- Added `Illuminate/Testing/TestResponse::assertContent()` ([#44580](https://github.com/laravel/framework/pull/44580))
67+
- Added to `Illuminate/Console/Concerns/InteractsWithIO::alert()` `$verbosity` param ([#44614](https://github.com/laravel/framework/pull/44614))
68+
69+
### Optimization
70+
- Makes blade components blazing fast ([#44487](https://github.com/laravel/framework/pull/44487))
71+
72+
### Fixed
73+
- Fixed `Illuminate/Filesystem/Filesystem::relativeLink()` ([#44519](https://github.com/laravel/framework/pull/44519))
74+
- Fixed for `model:show` failing with models that have null timestamp columns ([#44576](https://github.com/laravel/framework/pull/44576))
75+
- Allow Model::shouldBeStrict(false) to disable "strict mode" ([#44627](https://github.com/laravel/framework/pull/44627))
76+
77+
### Changed
78+
- Dont require a host for sqlite connections in php artisan db ([#44585](https://github.com/laravel/framework/pull/44585))
79+
- Let MustVerifyEmail to be used on models without id as primary key ([#44613](https://github.com/laravel/framework/pull/44613))
80+
- Changed `Illuminate/Routing/Route::controllerMiddleware()` ([#44590](https://github.com/laravel/framework/pull/44590))
81+
82+
83+
## [v9.35.1](https://github.com/laravel/framework/compare/v9.35.0...v9.35.1) - 2022-10-11
84+
85+
### Fixed
86+
- Remove check for `$viewFactory->exists($component)` in `Illuminate/View/Compilers/ComponentTagCompiler::componentClass` ([7c6db00](https://github.com/laravel/framework/commit/7c6db000928be240dfc6996537a0fed5b8c68ebb))
87+
88+
89+
## [v9.35.0](https://github.com/laravel/framework/compare/v9.34.0...v9.35.0) - 2022-10-11
90+
91+
### Added
92+
- Allow loading trashed models for resource routes ([#44405](https://github.com/laravel/framework/pull/44405))
93+
- Added `Illuminate/Database/Eloquent/Model::shouldBeStrict()` and other ([#44283](https://github.com/laravel/framework/pull/44283))
94+
- Controller middleware without resolving controller ([#44516](https://github.com/laravel/framework/pull/44516))
95+
- Alternative Mailable Syntax ([#44462](https://github.com/laravel/framework/pull/44462))
96+
97+
### Fixed
98+
- Fix issue with aggregates (withSum, etc.) for pivot columns on self-referencing many-to-many relations ([#44286](https://github.com/laravel/framework/pull/44286))
99+
- Fixes issue using static class properties as blade attributes ([#44473](https://github.com/laravel/framework/pull/44473))
100+
- Traversable should have priority over JsonSerializable in EnumerateValues ([#44456](https://github.com/laravel/framework/pull/44456))
101+
- Fixed `make:cast --inbound` so it's a boolean option, not value ([#44505](https://github.com/laravel/framework/pull/44505))
102+
103+
### Changed
104+
- Testing methods. Making error messages with json_encode more readable ([#44397](https://github.com/laravel/framework/pull/44397))
105+
- Have 'Model::withoutTimestamps()' return the callback's return value ([#44457](https://github.com/laravel/framework/pull/44457))
106+
- only load trashed models on relevant routes ([#44478](https://github.com/laravel/framework/pull/44478))
107+
- Adding additional PHP extensions to shouldBlockPhpUpload Function ([#44512](https://github.com/laravel/framework/pull/44512))
108+
- Register cutInternals casters for particularly noisy objects ([#44514](https://github.com/laravel/framework/pull/44514))
109+
- Use get methods to access application locale ([#44521](https://github.com/laravel/framework/pull/44521))
110+
- return only on non empty response from channels ([09d53ee](https://github.com/laravel/framework/commit/09d53eea674db7daa8bb65aa8fa7f2ca95e62b8d), [3944a3e](https://github.com/laravel/framework/commit/3944a3e34fe860633c77b574bbfbbcdabcf7d1e7))
111+
- Correct channel matching ([#44531](https://github.com/laravel/framework/pull/44531))
112+
- Migrate mail components ([#44527](https://github.com/laravel/framework/pull/44527))
4113

5114

6115
## [v9.34.0](https://github.com/laravel/framework/compare/v9.33.0...v9.34.0) - 2022-10-04

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"fruitcake/php-cors": "^1.2",
2525
"laravel/serializable-closure": "^1.2.2",
2626
"league/commonmark": "^2.2",
27-
"league/flysystem": "^3.0.16",
27+
"league/flysystem": "^3.8.0",
2828
"monolog/monolog": "^2.0",
2929
"nesbot/carbon": "^2.62.1",
3030
"nunomaduro/termwind": "^1.13",
@@ -93,7 +93,7 @@
9393
"league/flysystem-read-only": "^3.3",
9494
"league/flysystem-sftp-v3": "^3.0",
9595
"mockery/mockery": "^1.5.1",
96-
"orchestra/testbench-core": "^7.8",
96+
"orchestra/testbench-core": "^7.11",
9797
"pda/pheanstalk": "^4.0",
9898
"phpstan/phpstan": "^1.4.7",
9999
"phpunit/phpunit": "^9.5.8",

src/Illuminate/Broadcasting/BroadcastManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ protected function resolve($name)
245245
{
246246
$config = $this->getConfig($name);
247247

248+
if (is_null($config)) {
249+
throw new InvalidArgumentException("Broadcast connection [{$name}] is not defined.");
250+
}
251+
248252
if (isset($this->customCreators[$config['driver']])) {
249253
return $this->callCustomCreator($config);
250254
}

src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Illuminate\Contracts\Routing\UrlRoutable;
1212
use Illuminate\Support\Arr;
1313
use Illuminate\Support\Reflector;
14-
use Illuminate\Support\Str;
1514
use ReflectionClass;
1615
use ReflectionFunction;
1716
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -117,7 +116,11 @@ protected function verifyUserCanAccessChannel($request, $channel)
117116

118117
$handler = $this->normalizeChannelHandlerToCallable($callback);
119118

120-
if ($result = $handler($this->retrieveUser($request, $channel), ...$parameters)) {
119+
$result = $handler($this->retrieveUser($request, $channel), ...$parameters);
120+
121+
if ($result === false) {
122+
throw new AccessDeniedHttpException;
123+
} elseif ($result) {
121124
return $this->validAuthenticationResponse($request, $result);
122125
}
123126
}
@@ -368,6 +371,6 @@ protected function retrieveChannelOptions($channel)
368371
*/
369372
protected function channelNameMatchesPattern($channel, $pattern)
370373
{
371-
return Str::is(preg_replace('/\{(.*?)\}/', '*', $pattern), $channel);
374+
return preg_match('/'.preg_replace('/\{(.*?)\}/', '([^\.]+)', $pattern).'$/', $channel);
372375
}
373376
}

src/Illuminate/Console/Concerns/InteractsWithIO.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,17 +364,18 @@ public function warn($string, $verbosity = null)
364364
* Write a string in an alert box.
365365
*
366366
* @param string $string
367+
* @param int|string|null $verbosity
367368
* @return void
368369
*/
369-
public function alert($string)
370+
public function alert($string, $verbosity = null)
370371
{
371372
$length = Str::length(strip_tags($string)) + 12;
372373

373-
$this->comment(str_repeat('*', $length));
374-
$this->comment('* '.$string.' *');
375-
$this->comment(str_repeat('*', $length));
374+
$this->comment(str_repeat('*', $length), $verbosity);
375+
$this->comment('* '.$string.' *', $verbosity);
376+
$this->comment(str_repeat('*', $length), $verbosity);
376377

377-
$this->newLine();
378+
$this->comment('', $verbosity);
378379
}
379380

380381
/**

src/Illuminate/Database/Concerns/ManagesTransactions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function transaction(Closure $callback, $attempts = 1)
4343

4444
try {
4545
if ($this->transactions == 1) {
46+
$this->fireConnectionEvent('committing');
4647
$this->getPdo()->commit();
4748
}
4849

@@ -188,7 +189,8 @@ protected function handleBeginTransactionException(Throwable $e)
188189
*/
189190
public function commit()
190191
{
191-
if ($this->transactions == 1) {
192+
if ($this->transactionLevel() == 1) {
193+
$this->fireConnectionEvent('committing');
192194
$this->getPdo()->commit();
193195
}
194196

src/Illuminate/Database/Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Illuminate\Database\Events\StatementPrepared;
1414
use Illuminate\Database\Events\TransactionBeginning;
1515
use Illuminate\Database\Events\TransactionCommitted;
16+
use Illuminate\Database\Events\TransactionCommitting;
1617
use Illuminate\Database\Events\TransactionRolledBack;
1718
use Illuminate\Database\Query\Builder as QueryBuilder;
1819
use Illuminate\Database\Query\Expression;
@@ -978,6 +979,7 @@ protected function fireConnectionEvent($event)
978979
return $this->events?->dispatch(match ($event) {
979980
'beganTransaction' => new TransactionBeginning($this),
980981
'committed' => new TransactionCommitted($this),
982+
'committing' => new TransactionCommitting($this),
981983
'rollingBack' => new TransactionRolledBack($this),
982984
default => null,
983985
});

src/Illuminate/Database/Console/DbCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function handle()
3434
{
3535
$connection = $this->getConnection();
3636

37-
if (! isset($connection['host'])) {
37+
if (! isset($connection['host']) && $connection['driver'] !== 'sqlite') {
3838
$this->components->error('No host specified for this database connection.');
3939
$this->line(' Use the <options=bold>[--read]</> and <options=bold>[--write]</> options to specify a read or write connection.');
4040
$this->newLine();

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class Builder implements BuilderContract
110110
'max',
111111
'min',
112112
'raw',
113+
'rawValue',
113114
'sum',
114115
'toSql',
115116
];

0 commit comments

Comments
 (0)