Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5ee0245
Update CHANGELOG
taylorotwell Sep 4, 2025
d09f134
Ensure cached and uncached routes share same precedence when resolvin…
timacdonald Sep 4, 2025
5a0715f
Re-enable previously commented assertions (#56930)
AhmedAlaa4611 Sep 4, 2025
e294ea0
Reorder .gitignore entries for consistency and readability (#56963)
AhmedAlaa4611 Sep 7, 2025
52e08d9
[12.x] SQLite: Allow setting any pragmas (#56962)
stancl Sep 7, 2025
dd4fa26
refactor: remove unused array from docblock (#56961)
alipowerful7 Sep 7, 2025
ffc9dc0
PendingResourceRegistration withoutMiddleware never returns array (#5…
moshe-autoleadstar Sep 7, 2025
090cbe4
allow fakerphp/faker to not be installed (#56953)
SjorsO Sep 7, 2025
1cdcee4
Fix Validator placeholderHash PHPDoc (#56947)
AhmedAlaa4611 Sep 7, 2025
d5ca717
Handle MariaDB innodb_snapshot_isolation=ON (#56945)
Muffinman Sep 7, 2025
6ce9d6f
[12.x] Add PhpRedis pack ignore numbers option (#56941)
tuandp Sep 7, 2025
fcc38ab
test(support): add edge-case tuples for preg_replace_array (#56937)
realpvz Sep 7, 2025
45b19d9
[12.x] Allow for BackedEnum on dynamic blade component (#56940)
gehrisandro Sep 7, 2025
63d5152
[12.x] Remove one redundant array access (#56931)
vincentvanhoven Sep 7, 2025
bb00401
[12.x] Add withoutGlobalScopesExcept() to keep only specified global …
theHocineSaad Sep 7, 2025
0756f68
Make visibility consistent (#56970)
AhmedAlaa4611 Sep 8, 2025
9f19238
Change list to tuple in PHPDoc block (#56967)
shaedrich Sep 8, 2025
5365db1
aggregate service provider docblocks (#56968)
cosmastech Sep 8, 2025
bbe303e
[12.x] add --whisper option to schedule:work command (#56969)
thojo0 Sep 8, 2025
a46b551
Update Faker suggestion to match skeleton version (#56974)
AhmedAlaa4611 Sep 8, 2025
5425362
refactor: use str_contains() instead of strpos() for clarity (#56979)
arshidkv12 Sep 10, 2025
f680be7
remove unnecessary `with()` helper call (#56975)
browner12 Sep 10, 2025
52a1f6e
Config: Move some items into pragmas (#56980)
AhmedAlaa4611 Sep 10, 2025
3be63bb
Add callback support to takeUntilTimeout in LazyCollection (#56981)
kamilkozak Sep 10, 2025
50539ec
Utilize is_finite() (#56990)
AhmedAlaa4611 Sep 10, 2025
500c8bc
property promotion (#56989)
cosmastech Sep 10, 2025
649ff26
do not use `with()` helper when no second argument is passed (#56986)
browner12 Sep 10, 2025
673e300
fixed wrong type (#56987)
sethsandaru Sep 10, 2025
2088bb8
[12.x] Some quick fixes (#56991)
theHocineSaad Sep 10, 2025
7f67479
tests: Ensure transaction callbacks run in FIFO order (#56973)
realpvz Sep 10, 2025
0d00d04
pass attributes and parent arguments to Factory Sequence as in ->stat…
fritz-c Sep 10, 2025
a7a5004
support `Castable` on `Enum` (#56977)
jrseliga Sep 10, 2025
a986461
add trailling commas in multline method signatures (#56992)
browner12 Sep 10, 2025
22267cb
Improve docblocks for nullable parameters (#56995)
amirhshokri Sep 10, 2025
ef3c8eb
Improve docblocks for nullable parameters (#56996)
amirhshokri Sep 10, 2025
fe49957
Improve docblocks for nullable parameters (#56997)
amirhshokri Sep 10, 2025
49a283a
Revert "Config: Move some items into pragmas (#56980)" (#57003)
taylorotwell Sep 10, 2025
8588e12
[12.x]: Cache Session Driver (#56887)
joaopalopes24 Sep 10, 2025
57a9c1d
Update facade docblocks
taylorotwell Sep 10, 2025
6a90969
[12.x] Add support for #[UseResource(...)] and #[UseResourceCollectio…
Lukasss93 Sep 10, 2025
5831ccb
Fix Arr::array default to use empty array
ahmedsaed27 Sep 11, 2025
cd0e56d
Style: format Arr and SupportArrTest with Pint
ahmedsaed27 Sep 11, 2025
3377b66
Style: format Arr and SupportArrTest with Pint
ahmedsaed27 Sep 11, 2025
dc89d0c
Style: format Arr and SupportArrTest with Pint
ahmedsaed27 Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.DS_Store
.phpunit.result.cache
/.fleet
/.idea
/.phpunit.cache
/phpunit.xml
/.vscode
/vendor
composer.phar
composer.lock
.DS_Store
Thumbs.db
/phpunit.xml
/.idea
/.fleet
/.vscode
.phpunit.result.cache
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Release Notes for 12.x

## [Unreleased](https://github.com/laravel/framework/compare/v12.28.0...12.x)
## [Unreleased](https://github.com/laravel/framework/compare/v12.28.1...12.x)

## [v12.28.1](https://github.com/laravel/framework/compare/v12.28.0...v12.28.1) - 2025-09-04

* [12.x] Rename `group` to `messageGroup` property by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/56919
* Fix PHP_CLI_SERVER_WORKERS inside laravel/sail by [@akyrey](https://github.com/akyrey) in https://github.com/laravel/framework/pull/56923
* Allow RouteRegistrar to be Macroable by [@moshe-autoleadstar](https://github.com/moshe-autoleadstar) in https://github.com/laravel/framework/pull/56921
* [12.x] Fix SesV2Transport docblock by [@dwightwatson](https://github.com/dwightwatson) in https://github.com/laravel/framework/pull/56917
* [12.x] Prevent unnecessary query logging on exceptions with a custom renderer by [@luanfreitasdev](https://github.com/luanfreitasdev) in https://github.com/laravel/framework/pull/56874
* [12.x] Reduce meaningless intermediate variables by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/56927

## [v12.28.0](https://github.com/laravel/framework/compare/v12.27.1...v12.28.0) - 2025-09-03

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).",
"brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).",
"filp/whoops": "Required for friendly error pages in development (^2.14.3).",
"laravel/tinker": "Required to use the tinker console command (^2.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).",
Expand Down
5 changes: 5 additions & 0 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
'serialize' => false,
],

'session' => [
'driver' => 'session',
'key' => env('SESSION_CACHE_KEY', '_cache'),
],

'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION'),
Expand Down
1 change: 1 addition & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'journal_mode' => null,
'synchronous' => null,
'transaction_mode' => 'DEFERRED',
'pragmas' => [],
],

'mysql' => [
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected function authorizeOnDemand($condition, $message, $code, $allowWhenResp
$response = $condition;
}

return with($response instanceof Response ? $response : new Response(
return ($response instanceof Response ? $response : new Response(
(bool) $response === $allowWhenResponseIs, $message, $code
))->authorize();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Broadcasting/BroadcastEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function middleware(): array
/**
* Handle a job failure.
*
* @param \Throwable $e
* @param \Throwable|null $e
* @return void
*/
public function failed(?Throwable $e = null): void
Expand Down
143 changes: 89 additions & 54 deletions src/Illuminate/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,82 @@ protected function createArrayDriver(array $config)
return $this->repository(new ArrayStore($config['serialize'] ?? false), $config);
}

/**
* Create an instance of the database cache driver.
*
* @param array $config
* @return \Illuminate\Cache\Repository
*/
protected function createDatabaseDriver(array $config)
{
$connection = $this->app['db']->connection($config['connection'] ?? null);

$store = new DatabaseStore(
$connection,
$config['table'],
$this->getPrefix($config),
$config['lock_table'] ?? 'cache_locks',
$config['lock_lottery'] ?? [2, 100],
$config['lock_timeout'] ?? 86400,
);

return $this->repository(
$store->setLockConnection(
$this->app['db']->connection($config['lock_connection'] ?? $config['connection'] ?? null)
),
$config
);
}

/**
* Create an instance of the DynamoDB cache driver.
*
* @param array $config
* @return \Illuminate\Cache\Repository
*/
protected function createDynamodbDriver(array $config)
{
$client = $this->newDynamodbClient($config);

return $this->repository(
new DynamoDbStore(
$client,
$config['table'],
$config['attributes']['key'] ?? 'key',
$config['attributes']['value'] ?? 'value',
$config['attributes']['expiration'] ?? 'expires_at',
$this->getPrefix($config)
),
$config
);
}

/**
* Create new DynamoDb Client instance.
*
* @return \Aws\DynamoDb\DynamoDbClient
*/
protected function newDynamodbClient(array $config)
{
$dynamoConfig = [
'region' => $config['region'],
'version' => 'latest',
'endpoint' => $config['endpoint'] ?? null,
];

if (! empty($config['key']) && ! empty($config['secret'])) {
$dynamoConfig['credentials'] = Arr::only(
$config, ['key', 'secret']
);

if (! empty($config['token'])) {
$dynamoConfig['credentials']['token'] = $config['token'];
}
}

return new DynamoDbClient($dynamoConfig);
}

/**
* Create an instance of the file cache driver.
*
Expand Down Expand Up @@ -235,79 +311,38 @@ protected function createRedisDriver(array $config)
}

/**
* Create an instance of the database cache driver.
* Create an instance of the session cache driver.
*
* @param array $config
* @return \Illuminate\Cache\Repository
*/
protected function createDatabaseDriver(array $config)
protected function createSessionDriver(array $config)
{
$connection = $this->app['db']->connection($config['connection'] ?? null);

$store = new DatabaseStore(
$connection,
$config['table'],
$this->getPrefix($config),
$config['lock_table'] ?? 'cache_locks',
$config['lock_lottery'] ?? [2, 100],
$config['lock_timeout'] ?? 86400,
);

return $this->repository(
$store->setLockConnection(
$this->app['db']->connection($config['lock_connection'] ?? $config['connection'] ?? null)
new SessionStore(
$this->getSession(),
$config['key'] ?? '_cache',
),
$config
);
}

/**
* Create an instance of the DynamoDB cache driver.
* Get the session store implementation.
*
* @param array $config
* @return \Illuminate\Cache\Repository
*/
protected function createDynamodbDriver(array $config)
{
$client = $this->newDynamodbClient($config);

return $this->repository(
new DynamoDbStore(
$client,
$config['table'],
$config['attributes']['key'] ?? 'key',
$config['attributes']['value'] ?? 'value',
$config['attributes']['expiration'] ?? 'expires_at',
$this->getPrefix($config)
),
$config
);
}

/**
* Create new DynamoDb Client instance.
* @return \Illuminate\Contracts\Session\Session
*
* @return \Aws\DynamoDb\DynamoDbClient
* @throws \InvalidArgumentException
*/
protected function newDynamodbClient(array $config)
protected function getSession()
{
$dynamoConfig = [
'region' => $config['region'],
'version' => 'latest',
'endpoint' => $config['endpoint'] ?? null,
];

if (! empty($config['key']) && ! empty($config['secret'])) {
$dynamoConfig['credentials'] = Arr::only(
$config, ['key', 'secret']
);
$session = $this->app['session'] ?? null;

if (! empty($config['token'])) {
$dynamoConfig['credentials']['token'] = $config['token'];
}
if (! $session) {
throw new InvalidArgumentException('Session store requires session manager to be available in container.');
}

return new DynamoDbClient($dynamoConfig);
return $session;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ protected function serialize($value)
*/
protected function shouldBeStoredWithoutSerialization($value): bool
{
return is_numeric($value) && ! in_array($value, [INF, -INF]) && ! is_nan($value);
return is_numeric($value) && is_finite($value);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/RedisTagSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RedisTagSet extends TagSet
*
* @param string $key
* @param int|null $ttl
* @param string $updateWhen
* @param string|null $updateWhen
* @return void
*/
public function addEntry(string $key, ?int $ttl = null, $updateWhen = null)
Expand Down
Loading
Loading