Skip to content

Commit

Permalink
Merge branch '11.x' into 11.x-install-passport-13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
hafezdivandari committed Aug 2, 2024
2 parents 3ba0b89 + cfe5f84 commit 0fd5277
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ protected function castAttributeAsHashedString($key, #[\SensitiveParameter] $val
return Hash::make($value);
}

/** @phpstan-ignore-next-line */
if (! Hash::verifyConfiguration($value)) {
throw new RuntimeException("Could not verify the hashed value's configuration.");
}
Expand Down
3 changes: 3 additions & 0 deletions src/Illuminate/Hashing/HashManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public function getDefaultDriver()
/**
* Verifies that the configuration is less than or equal to what is configured.
*
* @param array $value
* @return bool
*
* @internal
*/
public function verifyConfiguration($value)
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Log/Context/ContextServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function register()
public function boot()
{
Queue::createPayloadUsing(function ($connection, $queue, $payload) {
/** @phpstan-ignore-next-line */
$context = Context::dehydrate();

return $context === null ? $payload : [
Expand All @@ -36,6 +37,7 @@ public function boot()
});

$this->app['events']->listen(function (JobProcessing $event) {
/** @phpstan-ignore-next-line */
Context::hydrate($event->job->payload()['illuminate:log:context'] ?? null);
});
}
Expand Down
14 changes: 7 additions & 7 deletions types/Support/Facades/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
use function PHPStan\Testing\assertType;

assertType('mixed', Cache::get('key'));
assertType('int', Cache::get('cache', 27));
assertType('int', Cache::get('cache', function (): int {
assertType('mixed', Cache::get('cache', 27));
assertType('mixed', Cache::get('cache', function (): int {
return 26;
}));

assertType('mixed', Cache::pull('key'));
assertType('int', Cache::pull('cache', 28));
assertType('int', Cache::pull('cache', function (): int {
assertType('mixed', Cache::pull('cache', 28));
assertType('mixed', Cache::pull('cache', function (): int {
return 30;
}));
assertType('int', Cache::sear('cache', function (): int {
assertType('mixed', Cache::sear('cache', function (): int {
return 33;
}));
assertType('int', Cache::remember('cache', now(), function (): int {
assertType('mixed', Cache::remember('cache', now(), function (): int {
return 36;
}));
assertType('int', Cache::rememberForever('cache', function (): int {
assertType('mixed', Cache::rememberForever('cache', function (): int {
return 36;
}));

0 comments on commit 0fd5277

Please sign in to comment.