Allow PHP-8.2 and up Compatibility instead of just PHP-8.4

This commit is contained in:
johnnyq
2026-06-12 17:06:10 -04:00
parent 2204bd52f4
commit d3a93652f3
220 changed files with 7198 additions and 2635 deletions

View File

@@ -39,6 +39,7 @@ use RuntimeException;
* @method static \Symfony\Component\HttpFoundation\Response|null basic(string $field = 'email', array $extraConditions = [])
* @method static \Symfony\Component\HttpFoundation\Response|null onceBasic(string $field = 'email', array $extraConditions = [])
* @method static bool attemptWhen(array $credentials = [], array|callable|null $callbacks = null, bool $remember = false)
* @method static string hashPasswordForCookie(string $passwordHash)
* @method static void logoutCurrentDevice()
* @method static \Illuminate\Contracts\Auth\Authenticatable|null logoutOtherDevices(string $password)
* @method static void attempting(mixed $callback)

View File

@@ -27,7 +27,7 @@ namespace Illuminate\Support\Facades;
* @method static void include(string $path, string|null $alias = null)
* @method static void aliasInclude(string $path, string|null $alias = null)
* @method static void bindDirective(string $name, callable $handler)
* @method static void directive(string $name, callable $handler, bool $bind = false)
* @method static void directive(string $name, \Closure|callable $handler, bool $bind = false)
* @method static array getCustomDirectives()
* @method static \Illuminate\View\Compilers\BladeCompiler prepareStringsForCompilationUsing(callable $callback)
* @method static void precompiler(callable $precompiler)

View File

@@ -24,7 +24,7 @@ use Illuminate\Support\Testing\Fakes\BusFake;
* @method static \Illuminate\Bus\Dispatcher withoutDispatchingAfterResponses()
* @method static \Illuminate\Support\Testing\Fakes\BusFake except(array|string $jobsToDispatch)
* @method static void assertDispatched(string|\Closure $command, callable|int|null $callback = null)
* @method static void assertDispatchedOnce(string|\Closure $command, int $times = null)
* @method static void assertDispatchedOnce(string|\Closure $command)
* @method static void assertDispatchedTimes(string|\Closure $command, int $times = 1)
* @method static void assertNotDispatched(string|\Closure $command, callable|null $callback = null)
* @method static void assertNothingDispatched()
@@ -38,7 +38,7 @@ use Illuminate\Support\Testing\Fakes\BusFake;
* @method static void assertNothingChained()
* @method static void assertDispatchedWithoutChain(string|\Closure $command, callable|null $callback = null)
* @method static \Illuminate\Support\Testing\Fakes\ChainedBatchTruthTest chainedBatch(\Closure $callback)
* @method static void assertBatched(callable $callback)
* @method static void assertBatched(array|callable $callback)
* @method static void assertBatchCount(int $count)
* @method static void assertNothingBatched()
* @method static void assertNothingPlaced()

View File

@@ -2,6 +2,8 @@
namespace Illuminate\Support\Facades;
use Mockery;
/**
* @method static \Illuminate\Contracts\Cache\Repository store(string|null $name = null)
* @method static \Illuminate\Contracts\Cache\Repository driver(string|null $driver = null)
@@ -16,26 +18,33 @@ namespace Illuminate\Support\Facades;
* @method static void purge(string|null $name = null)
* @method static \Illuminate\Cache\CacheManager extend(string $driver, \Closure $callback)
* @method static \Illuminate\Cache\CacheManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
* @method static bool has(array|string $key)
* @method static bool missing(string $key)
* @method static mixed get(array|string $key, mixed $default = null)
* @method static bool has(\UnitEnum|array|string $key)
* @method static bool missing(\UnitEnum|string $key)
* @method static mixed get(\UnitEnum|array|string $key, mixed $default = null)
* @method static array many(array $keys)
* @method static iterable getMultiple(iterable $keys, mixed $default = null)
* @method static mixed pull(array|string $key, mixed $default = null)
* @method static bool put(array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static bool set(string $key, mixed $value, null|int|\DateInterval $ttl = null)
* @method static mixed pull(\UnitEnum|array|string $key, mixed $default = null)
* @method static string string(\UnitEnum|string $key, \Closure|string|null $default = null)
* @method static int integer(\UnitEnum|string $key, \Closure|int|null $default = null)
* @method static float float(\UnitEnum|string $key, \Closure|float|null $default = null)
* @method static bool boolean(\UnitEnum|string $key, \Closure|bool|null $default = null)
* @method static array array(\UnitEnum|string $key, \Closure|array|null $default = null)
* @method static bool put(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static bool set(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static bool putMany(array $values, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static bool setMultiple(iterable $values, null|int|\DateInterval $ttl = null)
* @method static bool add(string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static int|bool increment(string $key, mixed $value = 1)
* @method static int|bool decrement(string $key, mixed $value = 1)
* @method static bool forever(string $key, mixed $value)
* @method static mixed remember(string $key, \Closure|\DateTimeInterface|\DateInterval|int|null $ttl, \Closure $callback)
* @method static mixed sear(string $key, \Closure $callback)
* @method static mixed rememberForever(string $key, \Closure $callback)
* @method static mixed flexible(string $key, array $ttl, callable $callback, array|null $lock = null, bool $alwaysDefer = false)
* @method static bool forget(string $key)
* @method static bool delete(string $key)
* @method static bool add(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
* @method static int|bool increment(\UnitEnum|string $key, mixed $value = 1)
* @method static int|bool decrement(\UnitEnum|string $key, mixed $value = 1)
* @method static bool forever(\UnitEnum|string $key, mixed $value)
* @method static mixed remember(\UnitEnum|string $key, \Closure|\DateTimeInterface|\DateInterval|int|null $ttl, \Closure $callback)
* @method static mixed sear(\UnitEnum|string $key, \Closure $callback)
* @method static mixed rememberForever(\UnitEnum|string $key, \Closure $callback)
* @method static mixed flexible(\UnitEnum|string $key, array $ttl, callable $callback, array|null $lock = null, bool $alwaysDefer = false)
* @method static mixed withoutOverlapping(\UnitEnum|string $key, callable $callback, int $lockFor = 0, int $waitFor = 10, string|null $owner = null)
* @method static \Illuminate\Cache\Limiters\ConcurrencyLimiterBuilder funnel(\UnitEnum|string $name)
* @method static bool forget(\UnitEnum|array|string $key)
* @method static bool delete(\UnitEnum|array|string $key)
* @method static bool deleteMultiple(iterable $keys)
* @method static bool clear()
* @method static \Illuminate\Cache\TaggedCache tags(mixed $names)
@@ -71,4 +80,27 @@ class Cache extends Facade
{
return 'cache';
}
/**
* Convert the facade into a Mockery spy.
*
* @return \Mockery\MockInterface
*/
public static function spy()
{
if (! static::isMock()) {
$class = static::getMockableClass();
$instance = static::getFacadeRoot();
if ($class && $instance) {
return tap(Mockery::spy($instance)->makePartial(), function ($spy) {
static::swap($spy);
});
}
return tap($class ? Mockery::spy($class) : Mockery::spy(), function ($spy) {
static::swap($spy);
});
}
}
}

View File

@@ -6,9 +6,9 @@ use Illuminate\Concurrency\ConcurrencyManager;
/**
* @method static mixed driver(string|null $name = null)
* @method static \Illuminate\Concurrency\ProcessDriver createProcessDriver(array $config)
* @method static \Illuminate\Concurrency\ForkDriver createForkDriver(array $config)
* @method static \Illuminate\Concurrency\SyncDriver createSyncDriver(array $config)
* @method static \Illuminate\Concurrency\ProcessDriver createProcessDriver()
* @method static \Illuminate\Concurrency\ForkDriver createForkDriver()
* @method static \Illuminate\Concurrency\SyncDriver createSyncDriver()
* @method static string getDefaultInstance()
* @method static void setDefaultInstance(string $name)
* @method static array getInstanceConfig(string $name)

View File

@@ -9,6 +9,7 @@ namespace Illuminate\Support\Facades;
* @method static string encryptString(string $value)
* @method static mixed decrypt(string $payload, bool $unserialize = true)
* @method static string decryptString(string $payload)
* @method static bool appearsEncrypted(mixed $value)
* @method static string getKey()
* @method static array getAllKeys()
* @method static array getPreviousKeys()

View File

@@ -76,6 +76,7 @@ use Illuminate\Database\Console\WipeCommand;
* @method static \PDO|\Closure|null getRawReadPdo()
* @method static \Illuminate\Database\Connection setPdo(\PDO|\Closure|null $pdo)
* @method static \Illuminate\Database\Connection setReadPdo(\PDO|\Closure|null $pdo)
* @method static \Illuminate\Database\Connection setReadPdoConfig(array $config)
* @method static string|null getName()
* @method static string|null getNameWithReadWriteType()
* @method static mixed getConfig(string|null $option = null)
@@ -87,7 +88,7 @@ use Illuminate\Database\Console\WipeCommand;
* @method static \Illuminate\Database\Connection setSchemaGrammar(\Illuminate\Database\Schema\Grammars\Grammar $grammar)
* @method static \Illuminate\Database\Query\Processors\Processor getPostProcessor()
* @method static \Illuminate\Database\Connection setPostProcessor(\Illuminate\Database\Query\Processors\Processor $processor)
* @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
* @method static \Illuminate\Contracts\Events\Dispatcher|null getEventDispatcher()
* @method static \Illuminate\Database\Connection setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $events)
* @method static void unsetEventDispatcher()
* @method static \Illuminate\Database\Connection setTransactionManager(\Illuminate\Database\DatabaseTransactionsManager $manager)
@@ -114,6 +115,7 @@ use Illuminate\Database\Console\WipeCommand;
* @method static void rollBack(int|null $toLevel = null)
* @method static int transactionLevel()
* @method static void afterCommit(callable $callback)
* @method static void afterRollBack(callable $callback)
*
* @see \Illuminate\Database\DatabaseManager
*/

View File

@@ -12,7 +12,7 @@ use Illuminate\Support\Testing\Fakes\EventFake;
* @method static void push(string $event, object|array $payload = [])
* @method static void flush(string $event)
* @method static void subscribe(object|string $subscriber)
* @method static mixed until(string|object $event, mixed $payload = [])
* @method static array|null until(string|object $event, mixed $payload = [])
* @method static array|null dispatch(string|object $event, mixed $payload = [], bool $halt = false)
* @method static array getListeners(string $eventName)
* @method static \Closure makeListener(\Closure|string|array $listener, bool $wildcard = false)
@@ -21,7 +21,7 @@ use Illuminate\Support\Testing\Fakes\EventFake;
* @method static void forgetPushed()
* @method static \Illuminate\Events\Dispatcher setQueueResolver(callable $resolver)
* @method static \Illuminate\Events\Dispatcher setTransactionManagerResolver(callable $resolver)
* @method static mixed defer(callable $callback, array|null $events = null)
* @method static mixed defer(callable $callback, string[]|null $events = null)
* @method static array getRawListeners()
* @method static void macro(string $name, object|callable $macro)
* @method static void mixin(object $mixin, bool $replace = true)
@@ -30,7 +30,7 @@ use Illuminate\Support\Testing\Fakes\EventFake;
* @method static \Illuminate\Support\Testing\Fakes\EventFake except(array|string $eventsToDispatch)
* @method static void assertListening(string $expectedEvent, string|array $expectedListener)
* @method static void assertDispatched(string|\Closure $event, callable|int|null $callback = null)
* @method static void assertDispatchedOnce(string $event, int $times = null)
* @method static void assertDispatchedOnce(string $event)
* @method static void assertDispatchedTimes(string $event, int $times = 1)
* @method static void assertNotDispatched(string|\Closure $event, callable|null $callback = null)
* @method static void assertNothingDispatched()

View File

@@ -247,12 +247,12 @@ abstract class Facade
/**
* Clear a resolved facade instance.
*
* @param string $name
* @param ?string $name
* @return void
*/
public static function clearResolvedInstance($name)
public static function clearResolvedInstance($name = null)
{
unset(static::$resolvedInstance[$name]);
unset(static::$resolvedInstance[$name ?? static::getFacadeAccessor()]);
}
/**

View File

@@ -28,7 +28,7 @@ namespace Illuminate\Support\Facades;
* @method static string dirname(string $path)
* @method static string extension(string $path)
* @method static string|null guessExtension(string $path)
* @method static string type(string $path)
* @method static string|false type(string $path)
* @method static string|false mimeType(string $path)
* @method static int size(string $path)
* @method static int lastModified(string $path)
@@ -39,9 +39,10 @@ namespace Illuminate\Support\Facades;
* @method static bool hasSameHash(string $firstFile, string $secondFile)
* @method static bool isFile(string $file)
* @method static array glob(string $pattern, int $flags = 0)
* @method static \Symfony\Component\Finder\SplFileInfo[] files(string $directory, bool $hidden = false)
* @method static \Symfony\Component\Finder\SplFileInfo[] files(string $directory, bool $hidden = false, array|string|int $depth = 0)
* @method static \Symfony\Component\Finder\SplFileInfo[] allFiles(string $directory, bool $hidden = false)
* @method static array directories(string $directory)
* @method static array directories(string $directory, array|string|int $depth = 0)
* @method static array allDirectories(string $directory)
* @method static void ensureDirectoryExists(string $path, int $mode = 0755, bool $recursive = true)
* @method static bool makeDirectory(string $path, int $mode = 0755, bool $recursive = false, bool $force = false)
* @method static bool moveDirectory(string $from, string $to, bool $overwrite = false)

View File

@@ -5,7 +5,7 @@ namespace Illuminate\Support\Facades;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
/**
* @method static bool has(string|array $ability)
* @method static bool has(\UnitEnum|array|string $ability)
* @method static \Illuminate\Auth\Access\Response allowIf(\Illuminate\Auth\Access\Response|\Closure|bool $condition, string|null $message = null, string|null $code = null)
* @method static \Illuminate\Auth\Access\Response denyIf(\Illuminate\Auth\Access\Response|\Closure|bool $condition, string|null $message = null, string|null $code = null)
* @method static \Illuminate\Auth\Access\Gate define(\UnitEnum|string $ability, callable|array|string $callback)

View File

@@ -65,20 +65,23 @@ use Illuminate\Http\Client\Factory;
* @method static \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware)
* @method static \Illuminate\Http\Client\PendingRequest withRequestMiddleware(callable $middleware)
* @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware)
* @method static \Illuminate\Http\Client\PendingRequest withAttributes(array $attributes)
* @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback)
* @method static \Illuminate\Http\Client\PendingRequest afterResponse(callable|null $callback)
* @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null)
* @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition)
* @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition)
* @method static \Illuminate\Http\Client\PendingRequest dump()
* @method static \Illuminate\Http\Client\PendingRequest dd()
* @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null)
* @method static \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null)
* @method static \Illuminate\Http\Client\Response post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static array pool(callable $callback)
* @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface get(string $url, array|string|null $query = null)
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface head(string $url, array|string|null $query = null)
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
* @method static array pool(callable $callback, int|null $concurrency = null)
* @method static \Illuminate\Http\Client\Batch batch(callable $callback)
* @method static \Illuminate\Http\Client\Response|\Illuminate\Http\Client\Promises\LazyPromise send(string $method, string $url, array $options = [])
* @method static \GuzzleHttp\Client buildClient()
* @method static \GuzzleHttp\Client createClient(\GuzzleHttp\HandlerStack $handlerStack)
* @method static \GuzzleHttp\HandlerStack buildHandlerStack()
@@ -86,7 +89,7 @@ use Illuminate\Http\Client\Factory;
* @method static \Closure buildBeforeSendingHandler()
* @method static \Closure buildRecorderHandler()
* @method static \Closure buildStubHandler()
* @method static \GuzzleHttp\Psr7\RequestInterface runBeforeSendingCallbacks(\GuzzleHttp\Psr7\RequestInterface $request, array $options)
* @method static \Psr\Http\Message\RequestInterface runBeforeSendingCallbacks(\Psr\Http\Message\RequestInterface $request, array $options)
* @method static array mergeOptions(array ...$options)
* @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback)
* @method static bool isAllowedRequestUrl(string $url)
@@ -117,7 +120,7 @@ class Http extends Facade
/**
* Register a stub callable that will intercept requests and be able to return stub responses.
*
* @param \Closure|array $callback
* @param \Closure|array|null $callback
* @return \Illuminate\Http\Client\Factory
*/
public static function fake($callback = null)

View File

@@ -30,7 +30,7 @@ namespace Illuminate\Support\Facades;
* @method static \Illuminate\Log\Logger withContext(array $context = [])
* @method static void listen(\Closure $callback)
* @method static \Psr\Log\LoggerInterface getLogger()
* @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
* @method static \Illuminate\Contracts\Events\Dispatcher|null getEventDispatcher()
* @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $dispatcher)
* @method static \Illuminate\Log\Logger|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
* @method static \Illuminate\Log\Logger|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)

View File

@@ -29,7 +29,7 @@ use Illuminate\Support\Testing\Fakes\MailFake;
* @method static string render(string|array $view, array $data = [])
* @method static \Illuminate\Mail\SentMessage|null send(\Illuminate\Contracts\Mail\Mailable|string|array $view, array $data = [], \Closure|string|null $callback = null)
* @method static \Illuminate\Mail\SentMessage|null sendNow(\Illuminate\Contracts\Mail\Mailable|string|array $mailable, array $data = [], \Closure|string|null $callback = null)
* @method static mixed queue(\Illuminate\Contracts\Mail\Mailable|string|array $view, \BackedEnum|string|null $queue = null)
* @method static mixed queue(\Illuminate\Contracts\Mail\Mailable $view, \BackedEnum|string|null $queue = null)
* @method static mixed onQueue(\BackedEnum|string|null $queue, \Illuminate\Contracts\Mail\Mailable $view)
* @method static mixed queueOn(string $queue, \Illuminate\Contracts\Mail\Mailable $view)
* @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable $view, string|null $queue = null)
@@ -43,6 +43,7 @@ use Illuminate\Support\Testing\Fakes\MailFake;
* @method static bool hasMacro(string $name)
* @method static void flushMacros()
* @method static void assertSent(string|\Closure $mailable, callable|array|string|int|null $callback = null)
* @method static void assertSentTimes(string $mailable, int $times = 1)
* @method static void assertNotOutgoing(string|\Closure $mailable, callable|null $callback = null)
* @method static void assertNotSent(string|\Closure $mailable, callable|array|string|null $callback = null)
* @method static void assertNothingOutgoing()

View File

@@ -4,6 +4,17 @@ namespace Illuminate\Support\Facades;
use Illuminate\Foundation\MaintenanceModeManager;
/**
* @method static string getDefaultDriver()
* @method static mixed driver(string|null $driver = null)
* @method static \Illuminate\Foundation\MaintenanceModeManager extend(string $driver, \Closure $callback)
* @method static array getDrivers()
* @method static \Illuminate\Contracts\Container\Container getContainer()
* @method static \Illuminate\Foundation\MaintenanceModeManager setContainer(\Illuminate\Contracts\Container\Container $container)
* @method static \Illuminate\Foundation\MaintenanceModeManager forgetDrivers()
*
* @see \Illuminate\Foundation\MaintenanceModeManager
*/
class MaintenanceMode extends Facade
{
/**

View File

@@ -20,6 +20,10 @@ use Illuminate\Support\Testing\Fakes\NotificationFake;
* @method static \Illuminate\Contracts\Container\Container getContainer()
* @method static \Illuminate\Notifications\ChannelManager setContainer(\Illuminate\Contracts\Container\Container $container)
* @method static \Illuminate\Notifications\ChannelManager forgetDrivers()
* @method static void macro(string $name, object|callable $macro)
* @method static void mixin(object $mixin, bool $replace = true)
* @method static bool hasMacro(string $name)
* @method static void flushMacros()
* @method static void assertSentOnDemand(string|\Closure $notification, callable|null $callback = null)
* @method static void assertSentTo(mixed $notifiable, string|\Closure $notification, callable|null $callback = null)
* @method static void assertSentOnDemandTimes(string $notification, int $times = 1)
@@ -33,10 +37,6 @@ use Illuminate\Support\Testing\Fakes\NotificationFake;
* @method static bool hasSent(mixed $notifiable, string $notification)
* @method static \Illuminate\Support\Testing\Fakes\NotificationFake serializeAndRestore(bool $serializeAndRestore = true)
* @method static array sentNotifications()
* @method static void macro(string $name, object|callable $macro)
* @method static void mixin(object $mixin, bool $replace = true)
* @method static bool hasMacro(string $name)
* @method static void flushMacros()
*
* @see \Illuminate\Notifications\ChannelManager
* @see \Illuminate\Support\Testing\Fakes\NotificationFake

View File

@@ -7,11 +7,13 @@ namespace Illuminate\Support\Facades;
* @method static void resolveTokenUsing(\Closure|null $resolver)
* @method static void setUpProcess(callable $callback)
* @method static void setUpTestCase(callable $callback)
* @method static void setUpTestDatabaseBeforeMigrating(callable $callback)
* @method static void setUpTestDatabase(callable $callback)
* @method static void tearDownProcess(callable $callback)
* @method static void tearDownTestCase(callable $callback)
* @method static void callSetUpProcessCallbacks()
* @method static void callSetUpTestCaseCallbacks(\Illuminate\Foundation\Testing\TestCase $testCase)
* @method static void callSetUpTestDatabaseBeforeMigratingCallbacks(string $database)
* @method static void callSetUpTestDatabaseCallbacks(string $database)
* @method static void callTearDownProcessCallbacks()
* @method static void callTearDownTestCaseCallbacks(\Illuminate\Foundation\Testing\TestCase $testCase)

View File

@@ -15,6 +15,11 @@ use Illuminate\Support\Testing\Fakes\QueueFake;
* @method static void stopping(mixed $callback)
* @method static bool connected(string|null $name = null)
* @method static \Illuminate\Contracts\Queue\Queue connection(string|null $name = null)
* @method static void pause(string $connection, string $queue)
* @method static void pauseFor(string $connection, string $queue, \DateTimeInterface|\DateInterval|int $ttl)
* @method static void resume(string $connection, string $queue)
* @method static bool isPaused(string $connection, string $queue)
* @method static void withoutInterruptionPolling()
* @method static void extend(string $driver, \Closure $resolver)
* @method static void addConnector(string $driver, \Closure $resolver)
* @method static string getDefaultDriver()
@@ -40,10 +45,13 @@ use Illuminate\Support\Testing\Fakes\QueueFake;
* @method static mixed getJobBackoff(mixed $job)
* @method static mixed getJobExpiration(mixed $job)
* @method static void createPayloadUsing(callable|null $callback)
* @method static array getConfig()
* @method static \Illuminate\Queue\Queue setConfig(array $config)
* @method static \Illuminate\Container\Container getContainer()
* @method static void setContainer(\Illuminate\Container\Container $container)
* @method static \Illuminate\Support\Testing\Fakes\QueueFake except(array|string $jobsToBeQueued)
* @method static void assertPushed(string|\Closure $job, callable|int|null $callback = null)
* @method static void assertPushedTimes(string $job, int $times = 1)
* @method static void assertPushedOn(string $queue, string|\Closure $job, callable|null $callback = null)
* @method static void assertPushedWithChain(string $job, array $expectedChain = [], callable|null $callback = null)
* @method static void assertPushedWithoutChain(string $job, callable|null $callback = null)
@@ -60,6 +68,7 @@ use Illuminate\Support\Testing\Fakes\QueueFake;
* @method static array pushedJobs()
* @method static array rawPushes()
* @method static \Illuminate\Support\Testing\Fakes\QueueFake serializeAndRestore(bool $serializeAndRestore = true)
* @method static void releaseUniqueJobLocks()
*
* @see \Illuminate\Queue\QueueManager
* @see \Illuminate\Queue\Queue
@@ -88,7 +97,7 @@ class Queue extends Facade
public static function fake($jobsToFake = [])
{
$actualQueueManager = static::isFake()
? static::getFacadeRoot()->queue
? tap(static::getFacadeRoot(), fn ($fake) => $fake->releaseUniqueJobLocks())->queue
: static::getFacadeRoot();
return tap(new QueueFake(static::getFacadeApplication(), $jobsToFake, $actualQueueManager), function ($fake) {

View File

@@ -3,8 +3,8 @@
namespace Illuminate\Support\Facades;
/**
* @method static \Illuminate\Cache\RateLimiter for(\BackedEnum|\UnitEnum|string $name, \Closure $callback)
* @method static \Closure|null limiter(\BackedEnum|\UnitEnum|string $name)
* @method static \Illuminate\Cache\RateLimiter for(\UnitEnum|string $name, \Closure $callback)
* @method static \Closure|null limiter(\UnitEnum|string $name)
* @method static mixed attempt(string $key, int $maxAttempts, \Closure $callback, \DateTimeInterface|\DateInterval|int $decaySeconds = 60)
* @method static bool tooManyAttempts(string $key, int $maxAttempts)
* @method static int hit(string $key, \DateTimeInterface|\DateInterval|int $decaySeconds = 60)

View File

@@ -19,9 +19,10 @@ namespace Illuminate\Support\Facades;
* @method static void psubscribe(array|string $channels, \Closure $callback)
* @method static mixed command(string $method, array $parameters = [])
* @method static void listen(\Closure $callback)
* @method static void listenForFailures(\Closure $callback)
* @method static string|null getName()
* @method static \Illuminate\Redis\Connections\Connection setName(string $name)
* @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
* @method static \Illuminate\Contracts\Events\Dispatcher|null getEventDispatcher()
* @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $events)
* @method static void unsetEventDispatcher()
* @method static void macro(string $name, object|callable $macro)
@@ -29,6 +30,279 @@ namespace Illuminate\Support\Facades;
* @method static bool hasMacro(string $name)
* @method static void flushMacros()
* @method static mixed macroCall(string $method, array $parameters)
* @method static string _compress(string $value)
* @method static string _uncompress(string $value)
* @method static string _prefix(string $key)
* @method static string _serialize(mixed $value)
* @method static mixed _unserialize(string $value)
* @method static string _pack(mixed $value)
* @method static mixed _unpack(string $value)
* @method static mixed acl(string $subcmd, string ...$args)
* @method static \Redis|int|false append(string $key, mixed $value)
* @method static \Redis|bool auth(mixed $credentials)
* @method static \Redis|bool bgSave()
* @method static \Redis|bool bgrewriteaof()
* @method static \Redis|array|false waitaof(int $numlocal, int $numreplicas, int $timeout)
* @method static \Redis|int|false bitcount(string $key, int $start = 0, int $end = -1, bool $bybit = false)
* @method static \Redis|int|false bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)
* @method static \Redis|int|false bitpos(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
* @method static \Redis|array|false|null blPop(array|string $key_or_keys, string|int|float $timeout_or_key, mixed ...$extra_args)
* @method static \Redis|array|false|null brPop(array|string $key_or_keys, string|int|float $timeout_or_key, mixed ...$extra_args)
* @method static \Redis|string|false brpoplpush(string $src, string $dst, int|float $timeout)
* @method static \Redis|array|false bzPopMax(array|string $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method static \Redis|array|false bzPopMin(array|string $key, string|int $timeout_or_key, mixed ...$extra_args)
* @method static \Redis|array|false|null bzmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method static \Redis|array|false|null zmpop(array $keys, string $from, int $count = 1)
* @method static \Redis|array|false|null blmpop(float $timeout, array $keys, string $from, int $count = 1)
* @method static \Redis|array|false|null lmpop(array $keys, string $from, int $count = 1)
* @method static bool clearLastError()
* @method static bool close()
* @method static mixed config(string $operation, array|string|null $key_or_settings = null, string|null $value = null)
* @method static bool connect(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
* @method static \Redis|bool copy(string $src, string $dst, array|null $options = null)
* @method static \Redis|int|false dbSize()
* @method static \Redis|string debug(string $key)
* @method static \Redis|int|false decr(string $key, int $by = 1)
* @method static \Redis|int|false decrBy(string $key, int $value)
* @method static \Redis|int|false del(array|string $key, string ...$other_keys)
* @method static \Redis|int|false delifeq(string $key, mixed $value)
* @method static \Redis|bool discard()
* @method static \Redis|string|false dump(string $key)
* @method static \Redis|string|false echo(string $str)
* @method static mixed eval(string $script, array $args = [], int $num_keys = 0)
* @method static mixed eval_ro(string $script_sha, array $args = [], int $num_keys = 0)
* @method static mixed evalsha(string $sha1, array $args = [], int $num_keys = 0)
* @method static mixed evalsha_ro(string $sha1, array $args = [], int $num_keys = 0)
* @method static \Redis|array|false exec()
* @method static \Redis|int|bool exists(mixed $key, mixed ...$other_keys)
* @method static \Redis|bool expire(string $key, int $timeout, string|null $mode = null)
* @method static \Redis|bool expireAt(string $key, int $timestamp, string|null $mode = null)
* @method static \Redis|bool failover(array|null $to = null, bool $abort = false, int $timeout = 0)
* @method static \Redis|int|false expiretime(string $key)
* @method static \Redis|int|false pexpiretime(string $key)
* @method static mixed fcall(string $fn, array $keys = [], array $args = [])
* @method static mixed fcall_ro(string $fn, array $keys = [], array $args = [])
* @method static \Redis|bool flushAll(bool|null $sync = null)
* @method static \Redis|bool flushDB(bool|null $sync = null)
* @method static \Redis|array|string|bool function(string $operation, mixed ...$args)
* @method static \Redis|int|false geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
* @method static \Redis|float|false geodist(string $key, string $src, string $dst, string|null $unit = null)
* @method static \Redis|array|false geohash(string $key, string $member, string ...$other_members)
* @method static \Redis|array|false geopos(string $key, string $member, string ...$other_members)
* @method static mixed georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
* @method static mixed georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
* @method static mixed georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = [])
* @method static mixed georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = [])
* @method static array geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
* @method static \Redis|array|int|false geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
* @method static mixed get(string $key)
* @method static \Redis|array|false getWithMeta(string $key)
* @method static mixed getAuth()
* @method static \Redis|int|false getBit(string $key, int $idx)
* @method static \Redis|string|bool getEx(string $key, array $options = [])
* @method static int getDBNum()
* @method static \Redis|string|bool getDel(string $key)
* @method static string getHost()
* @method static string|null getLastError()
* @method static int getMode()
* @method static mixed getOption(int $option)
* @method static string|null getPersistentID()
* @method static int getPort()
* @method static string|false serverName()
* @method static string|false serverVersion()
* @method static \Redis|string|false getRange(string $key, int $start, int $end)
* @method static \Redis|array|string|int|false lcs(string $key1, string $key2, array|null $options = null)
* @method static float getReadTimeout()
* @method static \Redis|string|false getset(string $key, mixed $value)
* @method static float|false getTimeout()
* @method static array getTransferredBytes()
* @method static void clearTransferredBytes()
* @method static \Redis|int|false hDel(string $key, string $field, string ...$other_fields)
* @method static \Redis|bool hExists(string $key, string $field)
* @method static mixed hGet(string $key, string $member)
* @method static \Redis|array|false hGetAll(string $key)
* @method static mixed hGetWithMeta(string $key, string $member)
* @method static \Redis|int|false hIncrBy(string $key, string $field, int $value)
* @method static \Redis|float|false hIncrByFloat(string $key, string $field, float $value)
* @method static \Redis|array|false hKeys(string $key)
* @method static \Redis|int|false hLen(string $key)
* @method static \Redis|array|false hMget(string $key, array $fields)
* @method static \Redis|array|false hgetex(string $key, array $fields, array|string|null $expiry = null)
* @method static \Redis|int|false hsetex(string $key, array $fields, array|null $expiry = null)
* @method static \Redis|array|false hgetdel(string $key, array $fields)
* @method static \Redis|bool hMset(string $key, array $fieldvals)
* @method static \Redis|array|string|false hRandField(string $key, array|null $options = null)
* @method static \Redis|int|false hSet(string $key, mixed ...$fields_and_vals)
* @method static \Redis|bool hSetNx(string $key, string $field, mixed $value)
* @method static \Redis|int|false hStrLen(string $key, string $field)
* @method static \Redis|array|false hVals(string $key)
* @method static \Redis|array|false hexpire(string $key, int $ttl, array $fields, string|null $mode = null)
* @method static \Redis|array|false hpexpire(string $key, int $ttl, array $fields, string|null $mode = null)
* @method static \Redis|array|false hexpireat(string $key, int $time, array $fields, string|null $mode = null)
* @method static \Redis|array|false hpexpireat(string $key, int $mstime, array $fields, string|null $mode = null)
* @method static \Redis|array|false httl(string $key, array $fields)
* @method static \Redis|array|false hpttl(string $key, array $fields)
* @method static \Redis|array|false hexpiretime(string $key, array $fields)
* @method static \Redis|array|false hpexpiretime(string $key, array $fields)
* @method static \Redis|array|false hpersist(string $key, array $fields)
* @method static \Redis|array|bool hscan(string $key, string|int|null $iterator, string|null $pattern = null, int $count = 0)
* @method static \Redis|int|false expiremember(string $key, string $field, int $ttl, string|null $unit = null)
* @method static \Redis|int|false expirememberat(string $key, string $field, int $timestamp)
* @method static \Redis|int|false incr(string $key, int $by = 1)
* @method static \Redis|int|false incrBy(string $key, int $value)
* @method static \Redis|float|false incrByFloat(string $key, float $value)
* @method static \Redis|array|false info(string ...$sections)
* @method static bool isConnected()
* @method static void keys(string $pattern)
* @method static void lInsert(string $key, string $pos, mixed $pivot, mixed $value)
* @method static \Redis|int|false lLen(string $key)
* @method static \Redis|string|false lMove(string $src, string $dst, string $wherefrom, string $whereto)
* @method static \Redis|string|false blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
* @method static \Redis|array|string|bool lPop(string $key, int $count = 0)
* @method static \Redis|array|int|bool|null lPos(string $key, mixed $value, array|null $options = null)
* @method static \Redis|int|false lPush(string $key, mixed ...$elements)
* @method static \Redis|int|false rPush(string $key, mixed ...$elements)
* @method static \Redis|int|false lPushx(string $key, mixed $value)
* @method static \Redis|int|false rPushx(string $key, mixed $value)
* @method static \Redis|bool lSet(string $key, int $index, mixed $value)
* @method static int lastSave()
* @method static mixed lindex(string $key, int $index)
* @method static \Redis|array|false lrange(string $key, int $start, int $end)
* @method static \Redis|int|false lrem(string $key, mixed $value, int $count = 0)
* @method static \Redis|bool ltrim(string $key, int $start, int $end)
* @method static \Redis|array|false mget(array $keys)
* @method static \Redis|bool migrate(string $host, int $port, array|string $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = null)
* @method static \Redis|bool move(string $key, int $index)
* @method static \Redis|bool mset(array $key_values)
* @method static \Redis|bool msetnx(array $key_values)
* @method static \Redis|bool multi(int $value = 1)
* @method static \Redis|string|int|false object(string $subcommand, string $key)
* @method static bool pconnect(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
* @method static \Redis|bool persist(string $key)
* @method static bool pexpire(string $key, int $timeout, string|null $mode = null)
* @method static \Redis|bool pexpireAt(string $key, int $timestamp, string|null $mode = null)
* @method static \Redis|int pfadd(string $key, array $elements)
* @method static \Redis|int|false pfcount(array|string $key_or_keys)
* @method static \Redis|bool pfmerge(string $dst, array $srckeys)
* @method static \Redis|string|bool ping(string|null $message = null)
* @method static \Redis|bool pipeline()
* @method static \Redis|bool psetex(string $key, int $expire, mixed $value)
* @method static \Redis|int|false pttl(string $key)
* @method static \Redis|int|false publish(string $channel, string $message)
* @method static mixed pubsub(string $command, mixed $arg = null)
* @method static \Redis|array|bool punsubscribe(array $patterns)
* @method static \Redis|array|string|bool rPop(string $key, int $count = 0)
* @method static \Redis|string|false randomKey()
* @method static mixed rawcommand(string $command, mixed ...$args)
* @method static \Redis|bool rename(string $old_name, string $new_name)
* @method static \Redis|bool renameNx(string $key_src, string $key_dst)
* @method static \Redis|bool reset()
* @method static \Redis|bool restore(string $key, int $ttl, string $value, array|null $options = null)
* @method static mixed role()
* @method static \Redis|string|false rpoplpush(string $srckey, string $dstkey)
* @method static \Redis|int|false sAdd(string $key, mixed $value, mixed ...$other_values)
* @method static int sAddArray(string $key, array $values)
* @method static \Redis|array|false sDiff(string $key, string ...$other_keys)
* @method static \Redis|int|false sDiffStore(string $dst, string $key, string ...$other_keys)
* @method static \Redis|array|false sInter(array|string $key, string ...$other_keys)
* @method static \Redis|int|false sintercard(array $keys, int $limit = -1)
* @method static \Redis|int|false sInterStore(array|string $key, string ...$other_keys)
* @method static \Redis|array|false sMembers(string $key)
* @method static \Redis|array|false sMisMember(string $key, string $member, string ...$other_members)
* @method static \Redis|bool sMove(string $src, string $dst, mixed $value)
* @method static \Redis|array|string|false sPop(string $key, int $count = 0)
* @method static mixed sRandMember(string $key, int $count = 0)
* @method static \Redis|array|false sUnion(string $key, string ...$other_keys)
* @method static \Redis|int|false sUnionStore(string $dst, string $key, string ...$other_keys)
* @method static \Redis|bool save()
* @method static array|false scan(string|int|null $iterator, string|null $pattern = null, int $count = 0, string|null $type = null)
* @method static \Redis|int|false scard(string $key)
* @method static mixed script(string $command, mixed ...$args)
* @method static \Redis|bool select(int $db)
* @method static \Redis|string|bool set(string $key, mixed $value, mixed $options = null)
* @method static \Redis|int|false setBit(string $key, int $idx, bool $value)
* @method static \Redis|int|false setRange(string $key, int $index, string $value)
* @method static bool setOption(int $option, mixed $value)
* @method static void setex(string $key, int $expire, mixed $value)
* @method static \Redis|bool setnx(string $key, mixed $value)
* @method static \Redis|bool sismember(string $key, mixed $value)
* @method static \Redis|bool replicaof(string|null $host = null, int $port = 6379)
* @method static \Redis|int|false touch(array|string $key_or_array, string ...$more_keys)
* @method static mixed slowlog(string $operation, int $length = 0)
* @method static mixed sort(string $key, array|null $options = null)
* @method static mixed sort_ro(string $key, array|null $options = null)
* @method static \Redis|int|false srem(string $key, mixed $value, mixed ...$other_values)
* @method static array|false sscan(string $key, string|int|null $iterator, string|null $pattern = null, int $count = 0)
* @method static bool ssubscribe(array $channels, callable $cb)
* @method static \Redis|int|false strlen(string $key)
* @method static \Redis|array|bool sunsubscribe(array $channels)
* @method static \Redis|bool swapdb(int $src, int $dst)
* @method static \Redis|array time()
* @method static \Redis|int|false ttl(string $key)
* @method static \Redis|int|false type(string $key)
* @method static \Redis|int|false unlink(array|string $key, string ...$other_keys)
* @method static \Redis|array|bool unsubscribe(array $channels)
* @method static \Redis|bool unwatch()
* @method static \Redis|bool watch(array|string $key, string ...$other_keys)
* @method static int|false wait(int $numreplicas, int $timeout)
* @method static int|false xack(string $key, string $group, array $ids)
* @method static \Redis|string|false xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
* @method static \Redis|array|bool xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
* @method static \Redis|array|bool xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
* @method static \Redis|int|false xdel(string $key, array $ids)
* @method static mixed xgroup(string $operation, string|null $key = null, string|null $group = null, string|null $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)
* @method static mixed xinfo(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
* @method static \Redis|int|false xlen(string $key)
* @method static \Redis|array|false xpending(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)
* @method static \Redis|array|bool xrange(string $key, string $start, string $end, int $count = -1)
* @method static \Redis|array|bool xread(array $streams, int $count = -1, int $block = -1)
* @method static \Redis|array|bool xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
* @method static \Redis|array|bool xrevrange(string $key, string $end, string $start, int $count = -1)
* @method static \Redis|int|false vadd(string $key, array $values, mixed $element, array|null $options = null)
* @method static \Redis|array|false vsim(string $key, mixed $member, array|null $options = null)
* @method static \Redis|int|false vcard(string $key)
* @method static \Redis|int|false vdim(string $key)
* @method static \Redis|array|false vinfo(string $key)
* @method static \Redis|bool vismember(string $key, mixed $member)
* @method static \Redis|array|false vemb(string $key, mixed $member, bool $raw = false)
* @method static \Redis|array|string|false vrandmember(string $key, int $count = 0)
* @method static \Redis|array|false vrange(string $key, string $min, string $max, int $count = -1)
* @method static \Redis|int|false vrem(string $key, mixed $member)
* @method static \Redis|int|false vsetattr(string $key, mixed $member, array|string $attributes)
* @method static \Redis|array|string|false vgetattr(string $key, mixed $member, bool $decode = true)
* @method static \Redis|array|false vlinks(string $key, mixed $member, bool $withscores = false)
* @method static \Redis|int|false xtrim(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
* @method static \Redis|int|float|false zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
* @method static \Redis|int|false zCard(string $key)
* @method static \Redis|int|false zCount(string $key, string|int $start, string|int $end)
* @method static \Redis|float|false zIncrBy(string $key, float $value, mixed $member)
* @method static \Redis|int|false zLexCount(string $key, string $min, string $max)
* @method static \Redis|array|false zMscore(string $key, mixed $member, mixed ...$other_members)
* @method static \Redis|array|false zPopMax(string $key, int|null $count = null)
* @method static \Redis|array|false zPopMin(string $key, int|null $count = null)
* @method static \Redis|array|false zRange(string $key, string|int $start, string|int $end, array|bool|null $options = null)
* @method static \Redis|array|false zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1)
* @method static \Redis|array|false zRangeByScore(string $key, string $start, string $end, array $options = [])
* @method static \Redis|int|false zrangestore(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = null)
* @method static \Redis|array|string zRandMember(string $key, array|null $options = null)
* @method static \Redis|int|false zRank(string $key, mixed $member)
* @method static \Redis|int|false zRem(mixed $key, mixed $member, mixed ...$other_members)
* @method static \Redis|int|false zRemRangeByLex(string $key, string $min, string $max)
* @method static \Redis|int|false zRemRangeByRank(string $key, int $start, int $end)
* @method static \Redis|int|false zRemRangeByScore(string $key, string $start, string $end)
* @method static \Redis|array|false zRevRange(string $key, int $start, int $end, mixed $scores = null)
* @method static \Redis|array|false zRevRangeByLex(string $key, string $max, string $min, int $offset = -1, int $count = -1)
* @method static \Redis|array|false zRevRangeByScore(string $key, string $max, string $min, array|bool $options = [])
* @method static \Redis|int|false zRevRank(string $key, mixed $member)
* @method static \Redis|float|false zScore(string $key, mixed $member)
* @method static \Redis|array|false zdiff(array $keys, array|null $options = null)
* @method static \Redis|int|false zdiffstore(string $dst, array $keys)
* @method static \Redis|array|false zinter(array $keys, array|null $weights = null, array|null $options = null)
* @method static \Redis|int|false zintercard(array $keys, int $limit = -1)
* @method static \Redis|int|false zinterstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
* @method static \Redis|array|false zscan(string $key, string|int|null $iterator, string|null $pattern = null, int $count = 0)
* @method static \Redis|array|false zunion(array $keys, array|null $weights = null, array|null $options = null)
* @method static \Redis|int|false zunionstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
*
* @see \Illuminate\Redis\RedisManager
*/

View File

@@ -29,10 +29,10 @@ namespace Illuminate\Support\Facades;
* @method static string|null ip()
* @method static array ips()
* @method static string|null userAgent()
* @method static array getAcceptableContentTypes()
* @method static \Illuminate\Http\Request merge(array $input)
* @method static \Illuminate\Http\Request mergeIfMissing(array $input)
* @method static \Illuminate\Http\Request replace(array $input)
* @method static mixed get(string $key, mixed $default = null)
* @method static \Symfony\Component\HttpFoundation\InputBag|mixed json(string|null $key = null, mixed $default = null)
* @method static \Illuminate\Http\Request createFrom(\Illuminate\Http\Request $from, \Illuminate\Http\Request|null $to = null)
* @method static \Illuminate\Http\Request createFromBase(\Symfony\Component\HttpFoundation\Request $request)
@@ -65,6 +65,8 @@ namespace Illuminate\Support\Facades;
* @method static string normalizeQueryString(string|null $qs)
* @method static void enableHttpMethodParameterOverride()
* @method static bool getHttpMethodParameterOverride()
* @method static void setAllowedHttpMethodOverride(string[]|null $methods)
* @method static string[]|null getAllowedHttpMethodOverride()
* @method static bool hasPreviousSession()
* @method static void setSession(\Symfony\Component\HttpFoundation\Session\SessionInterface $session)
* @method static array getClientIps()
@@ -92,8 +94,8 @@ namespace Illuminate\Support\Facades;
* @method static string getRealMethod()
* @method static string|null getMimeType(string $format)
* @method static string[] getMimeTypes(string $format)
* @method static string|null getFormat(string|null $mimeType)
* @method static void setFormat(string|null $format, string|string[] $mimeTypes)
* @method static string|null getFormat(string|null $mimeType, bool $subtypeFallback = null)
* @method static void setFormat(string $format, string|string[] $mimeTypes)
* @method static string|null getRequestFormat(string|null $default = 'html')
* @method static void setRequestFormat(string|null $format)
* @method static string|null getContentTypeFormat()
@@ -115,7 +117,6 @@ namespace Illuminate\Support\Facades;
* @method static string[] getLanguages()
* @method static string[] getCharsets()
* @method static string[] getEncodings()
* @method static string[] getAcceptableContentTypes()
* @method static bool isXmlHttpRequest()
* @method static bool preferSafeContent()
* @method static bool isFromTrustedProxy()
@@ -125,10 +126,12 @@ namespace Illuminate\Support\Facades;
* @method static bool isJson()
* @method static bool expectsJson()
* @method static bool wantsJson()
* @method static bool wantsMarkdown()
* @method static bool accepts(string|array $contentTypes)
* @method static string|null prefers(string|array $contentTypes)
* @method static bool acceptsAnyContentType()
* @method static bool acceptsJson()
* @method static bool acceptsMarkdown()
* @method static bool acceptsHtml()
* @method static bool matchesType(string $actual, string $type)
* @method static string format(string $default = 'html')
@@ -144,7 +147,7 @@ namespace Illuminate\Support\Facades;
* @method static array keys()
* @method static array all(mixed $keys = null)
* @method static mixed input(string|null $key = null, mixed $default = null)
* @method static \Illuminate\Support\Fluent fluent(array|string|null $key = null)
* @method static \Illuminate\Support\Fluent fluent(array|string|null $key = null, array $default = [])
* @method static string|array|null query(string|null $key = null, string|array|null $default = null)
* @method static string|array|null post(string|null $key = null, string|array|null $default = null)
* @method static bool hasCookie(string $key)
@@ -169,8 +172,10 @@ namespace Illuminate\Support\Facades;
* @method static bool boolean(string|null $key = null, bool $default = false)
* @method static int integer(string $key, int $default = 0)
* @method static float float(string $key, float $default = 0)
* @method static float|int clamp(string $key, int|float $min, int|float $max, int|float $default = 0)
* @method static \Illuminate\Support\Carbon|null date(string $key, string|null $format = null, \UnitEnum|string|null $tz = null)
* @method static \BackedEnum|null enum(string $key, string $enumClass, \BackedEnum|null $default = null)
* @method static \Carbon\CarbonInterval|null interval(string $key, \Carbon\Unit|string|null $unit = null)
* @method static \BackedEnum|\BackedEnum|null enum(string $key, string $enumClass, \BackedEnum|null $default = null)
* @method static \BackedEnum[] enums(string $key, string $enumClass)
* @method static array array(array|string|null $key = null)
* @method static \Illuminate\Support\Collection collect(array|string|null $key = null)

View File

@@ -14,7 +14,7 @@ use Illuminate\Console\Scheduling\Schedule as ConsoleSchedule;
* @method static bool serverShouldRun(\Illuminate\Console\Scheduling\Event $event, \DateTimeInterface $time)
* @method static \Illuminate\Support\Collection dueEvents(\Illuminate\Contracts\Foundation\Application $app)
* @method static \Illuminate\Console\Scheduling\Event[] events()
* @method static \Illuminate\Console\Scheduling\Schedule useCache(string $store)
* @method static \Illuminate\Console\Scheduling\Schedule useCache(\UnitEnum|string $store)
* @method static void macro(string $name, object|callable $macro)
* @method static void mixin(object $mixin, bool $replace = true)
* @method static bool hasMacro(string $name)
@@ -76,6 +76,7 @@ use Illuminate\Console\Scheduling\Schedule as ConsoleSchedule;
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes lastDayOfMonth(string $time = '0:0')
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes daysOfMonth(array|int ...$days)
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterly()
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
* @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearly()

View File

@@ -21,6 +21,8 @@ namespace Illuminate\Support\Facades;
* @method static bool hasColumns(string $table, array $columns)
* @method static void whenTableHasColumn(string $table, string $column, \Closure $callback)
* @method static void whenTableDoesntHaveColumn(string $table, string $column, \Closure $callback)
* @method static void whenTableHasIndex(string $table, string|array $index, \Closure $callback, string|null $type = null)
* @method static void whenTableDoesntHaveIndex(string $table, string|array $index, \Closure $callback, string|null $type = null)
* @method static string getColumnType(string $table, string $column, bool $fullDefinition = false)
* @method static array getColumnListing(string $table)
* @method static array getColumns(string $table)
@@ -40,6 +42,8 @@ namespace Illuminate\Support\Facades;
* @method static bool enableForeignKeyConstraints()
* @method static bool disableForeignKeyConstraints()
* @method static mixed withoutForeignKeyConstraints(\Closure $callback)
* @method static void ensureVectorExtensionExists(string|null $schema = null)
* @method static void ensureExtensionExists(string $name, string|null $schema = null)
* @method static string[]|null getCurrentSchemaListing()
* @method static string|null getCurrentSchemaName()
* @method static array parseSchemaAndTable(string $reference, string|bool|null $withDefaultSchema = null)

View File

@@ -8,7 +8,7 @@ namespace Illuminate\Support\Facades;
* @method static int defaultRouteBlockLockSeconds()
* @method static int defaultRouteBlockWaitSeconds()
* @method static array getSessionConfig()
* @method static string getDefaultDriver()
* @method static string|null getDefaultDriver()
* @method static void setDefaultDriver(string $name)
* @method static mixed driver(string|null $driver = null)
* @method static \Illuminate\Session\SessionManager extend(string $driver, \Closure $callback)
@@ -22,27 +22,28 @@ namespace Illuminate\Support\Facades;
* @method static array all()
* @method static array only(array $keys)
* @method static array except(array $keys)
* @method static bool exists(string|array $key)
* @method static bool missing(string|array $key)
* @method static bool has(string|array $key)
* @method static bool hasAny(string|array $key)
* @method static mixed get(string $key, mixed $default = null)
* @method static mixed pull(string $key, mixed $default = null)
* @method static bool exists(\UnitEnum|string|array $key)
* @method static bool missing(\UnitEnum|string|array $key)
* @method static bool has(\UnitEnum|string|array $key)
* @method static bool hasAny(\UnitEnum|string|array $key)
* @method static mixed get(\UnitEnum|string $key, mixed $default = null)
* @method static mixed pull(\UnitEnum|string $key, mixed $default = null)
* @method static bool hasOldInput(string|null $key = null)
* @method static mixed getOldInput(string|null $key = null, mixed $default = null)
* @method static void replace(array $attributes)
* @method static void put(string|array $key, mixed $value = null)
* @method static mixed remember(string $key, \Closure $callback)
* @method static void push(string $key, mixed $value)
* @method static mixed increment(string $key, int $amount = 1)
* @method static int decrement(string $key, int $amount = 1)
* @method static void flash(string $key, mixed $value = true)
* @method static void now(string $key, mixed $value)
* @method static void put(\UnitEnum|string|array $key, mixed $value = null)
* @method static mixed remember(\UnitEnum|string $key, \Closure $callback)
* @method static void push(\UnitEnum|string $key, mixed $value)
* @method static mixed increment(\UnitEnum|string $key, int $amount = 1)
* @method static int decrement(\UnitEnum|string $key, int $amount = 1)
* @method static void flash(\UnitEnum|string $key, mixed $value = true)
* @method static void now(\UnitEnum|string $key, mixed $value)
* @method static void reflash()
* @method static void keep(mixed $keys = null)
* @method static void flashInput(array $value)
* @method static mixed remove(string $key)
* @method static void forget(string|array $keys)
* @method static \Illuminate\Contracts\Cache\Repository cache()
* @method static mixed remove(\UnitEnum|string $key)
* @method static void forget(\UnitEnum|string|array $keys)
* @method static void flush()
* @method static bool invalidate()
* @method static bool regenerate(bool $destroy = false)
@@ -61,6 +62,8 @@ namespace Illuminate\Support\Facades;
* @method static \Illuminate\Support\Uri previousUri()
* @method static string|null previousUrl()
* @method static void setPreviousUrl(string $url)
* @method static string|null previousRoute()
* @method static void setPreviousRoute(string|null $route)
* @method static void passwordConfirmed()
* @method static \SessionHandlerInterface getHandler()
* @method static \SessionHandlerInterface setHandler(\SessionHandlerInterface $handler)

View File

@@ -4,6 +4,8 @@ namespace Illuminate\Support\Facades;
use Illuminate\Filesystem\Filesystem;
use function Illuminate\Support\enum_value;
/**
* @method static \Illuminate\Contracts\Filesystem\Filesystem drive(string|null $name = null)
* @method static \Illuminate\Contracts\Filesystem\Filesystem disk(\UnitEnum|string|null $name = null)
@@ -61,6 +63,7 @@ use Illuminate\Filesystem\Filesystem;
* @method static string|false mimeType(string $path)
* @method static string url(string $path)
* @method static bool providesTemporaryUrls()
* @method static bool providesTemporaryUploadUrls()
* @method static string temporaryUrl(string $path, \DateTimeInterface $expiration, array $options = [])
* @method static array temporaryUploadUrl(string $path, \DateTimeInterface $expiration, array $options = [])
* @method static \League\Flysystem\FilesystemOperator getDriver()
@@ -68,6 +71,7 @@ use Illuminate\Filesystem\Filesystem;
* @method static array getConfig()
* @method static void serveUsing(\Closure $callback)
* @method static void buildTemporaryUrlsUsing(\Closure $callback)
* @method static void buildTemporaryUploadUrlsUsing(\Closure $callback)
* @method static \Illuminate\Filesystem\FilesystemAdapter|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
* @method static \Illuminate\Filesystem\FilesystemAdapter|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
* @method static void macro(string $name, object|callable $macro)
@@ -90,13 +94,13 @@ class Storage extends Facade
/**
* Replace the given disk with a local testing disk.
*
* @param string|null $disk
* @param \UnitEnum|string|null $disk
* @param array $config
* @return \Illuminate\Contracts\Filesystem\Filesystem
* @return \Illuminate\Filesystem\LocalFilesystemAdapter
*/
public static function fake($disk = null, array $config = [])
{
$root = self::getRootPath($disk = $disk ?: static::$app['config']->get('filesystems.default'));
$root = self::getRootPath($disk = enum_value($disk) ?: static::$app['config']->get('filesystems.default'));
if ($token = ParallelTesting::token()) {
$root = "{$root}_test_{$token}";
@@ -108,21 +112,27 @@ class Storage extends Facade
self::buildDiskConfiguration($disk, $config, root: $root)
));
return tap($fake)->buildTemporaryUrlsUsing(function ($path, $expiration) {
return URL::to($path.'?expiration='.$expiration->getTimestamp());
return tap($fake, function ($fake) {
$fake->buildTemporaryUrlsUsing(function ($path, $expiration) {
return URL::to($path.'?expiration='.$expiration->getTimestamp());
});
$fake->buildTemporaryUploadUrlsUsing(function ($path, $expiration) {
return ['url' => URL::to($path.'?expiration='.$expiration->getTimestamp()), 'headers' => []];
});
});
}
/**
* Replace the given disk with a persistent local testing disk.
*
* @param string|null $disk
* @param \UnitEnum|string|null $disk
* @param array $config
* @return \Illuminate\Contracts\Filesystem\Filesystem
* @return \Illuminate\Filesystem\LocalFilesystemAdapter
*/
public static function persistentFake($disk = null, array $config = [])
{
$disk = $disk ?: static::$app['config']->get('filesystems.default');
$disk = enum_value($disk) ?: static::$app['config']->get('filesystems.default');
static::set($disk, $fake = static::createLocalDriver(
self::buildDiskConfiguration($disk, $config, root: self::getRootPath($disk))

View File

@@ -78,6 +78,7 @@ namespace Illuminate\Support\Facades;
* @method static void startPrepend(string $section, string $content = '')
* @method static string stopPrepend()
* @method static string yieldPushContent(string $section, string $default = '')
* @method static bool isStackEmpty(string $section)
* @method static void flushStacks()
* @method static void startTranslation(array $replacements = [])
* @method static string renderTranslation()