[Web] Update composer libraries

This commit is contained in:
FreddleSpl0it committed 2026-10-28 11:56:29 +01:00
1 parent 9cc8ac2908
commit bd8c784118
1297 files changed
+71585 -24460

No files matched your search

@@ -8,7 +8,7 @@ interface Authorizable
* Determine if the entity has a given ability.
*
* @param iterable|string $abilities
* @param array|mixed $arguments
* @param mixed $arguments
* @return bool
*/
public function can($abilities, $arguments = []);
@@ -7,7 +7,7 @@ interface Gate
/**
* Determine if a given ability has been defined.
*
* @param string $ability
* @param \UnitEnum|string $ability
* @return bool
*/
public function has($ability);
@@ -15,7 +15,7 @@ interface Gate
/**
* Define a new ability.
*
* @param string $ability
* @param \UnitEnum|string $ability
* @param callable|string $callback
* @return $this
*/
@@ -29,7 +29,7 @@ interface Gate
* @param array|null $abilities
* @return $this
*/
public function resource($name, $class, array $abilities = null);
public function resource($name, $class, ?array $abilities = null);
/**
* Define a policy class for a given class type.
@@ -59,8 +59,8 @@ interface Gate
/**
* Determine if all of the given abilities should be granted for the current user.
*
* @param iterable|string $ability
* @param array|mixed $arguments
* @param iterable|\UnitEnum|string $ability
* @param mixed $arguments
* @return bool
*/
public function allows($ability, $arguments = []);
@@ -68,8 +68,8 @@ interface Gate
/**
* Determine if any of the given abilities should be denied for the current user.
*
* @param iterable|string $ability
* @param array|mixed $arguments
* @param iterable|\UnitEnum|string $ability
* @param mixed $arguments
* @return bool
*/
public function denies($ability, $arguments = []);
@@ -77,8 +77,8 @@ interface Gate
/**
* Determine if all of the given abilities should be granted for the current user.
*
* @param iterable|string $abilities
* @param array|mixed $arguments
* @param iterable|\UnitEnum|string $abilities
* @param mixed $arguments
* @return bool
*/
public function check($abilities, $arguments = []);
@@ -86,8 +86,8 @@ interface Gate
/**
* Determine if any one of the given abilities should be granted for the current user.
*
* @param iterable|string $abilities
* @param array|mixed $arguments
* @param iterable|\UnitEnum|string $abilities
* @param mixed $arguments
* @return bool
*/
public function any($abilities, $arguments = []);
@@ -95,8 +95,8 @@ interface Gate
/**
* Determine if the given ability should be granted for the current user.
*
* @param string $ability
* @param array|mixed $arguments
* @param \UnitEnum|string $ability
* @param mixed $arguments
* @return \Illuminate\Auth\Access\Response
*
* @throws \Illuminate\Auth\Access\AuthorizationException
@@ -106,8 +106,8 @@ interface Gate
/**
* Inspect the user for the given ability.
*
* @param string $ability
* @param array|mixed $arguments
* @param \UnitEnum|string $ability
* @param mixed $arguments
* @return \Illuminate\Auth\Access\Response
*/
public function inspect($ability, $arguments = []);
@@ -116,7 +116,7 @@ interface Gate
* Get the raw result from the authorization callback.
*
* @param string $ability
* @param array|mixed $arguments
* @param mixed $arguments
* @return mixed
*
* @throws \Illuminate\Auth\Access\AuthorizationException
@@ -18,6 +18,13 @@ interface Authenticatable
*/
public function getAuthIdentifier();
/**
* Get the name of the password attribute for the user.
*
* @return string
*/
public function getAuthPasswordName();
/**
* Get the password for the user.
*
@@ -51,7 +51,7 @@ interface Guard
* Set the current user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
* @return $this
*/
public function setUser(Authenticatable $user);
}
@@ -48,7 +48,7 @@ interface PasswordBroker
* @param \Closure|null $callback
* @return string
*/
public function sendResetLink(array $credentials, Closure $callback = null);
public function sendResetLink(array $credentials, ?Closure $callback = null);
/**
* Reset the password for the given token.
@@ -35,7 +35,7 @@ interface StatefulGuard extends Guard
*
* @param mixed $id
* @param bool $remember
* @return \Illuminate\Contracts\Auth\Authenticatable|bool
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function loginUsingId($id, $remember = false);
@@ -43,7 +43,7 @@ interface StatefulGuard extends Guard
* Log the given user ID into the application without sessions or cookies.
*
* @param mixed $id
* @return \Illuminate\Contracts\Auth\Authenticatable|bool
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function onceUsingId($id);
@@ -19,7 +19,7 @@ interface UserProvider
* @param string $token
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function retrieveByToken($identifier, $token);
public function retrieveByToken($identifier, #[\SensitiveParameter] $token);
/**
* Update the "remember me" token for the given user in storage.
@@ -28,7 +28,7 @@ interface UserProvider
* @param string $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token);
public function updateRememberToken(Authenticatable $user, #[\SensitiveParameter] $token);
/**
* Retrieve a user by the given credentials.
@@ -36,7 +36,7 @@ interface UserProvider
* @param array $credentials
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function retrieveByCredentials(array $credentials);
public function retrieveByCredentials(#[\SensitiveParameter] array $credentials);
/**
* Validate a user against the given credentials.
@@ -45,5 +45,15 @@ interface UserProvider
* @param array $credentials
* @return bool
*/
public function validateCredentials(Authenticatable $user, array $credentials);
public function validateCredentials(Authenticatable $user, #[\SensitiveParameter] array $credentials);
/**
* Rehash the user's password if required and supported.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
* @param bool $force
* @return void
*/
public function rehashPasswordIfRequired(Authenticatable $user, #[\SensitiveParameter] array $credentials, bool $force = false);
}
@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Contracts\Broadcasting;
interface ShouldRescue
{
//
}
@@ -44,7 +44,7 @@ interface Dispatcher
* Retrieve the handler for a command.
*
* @param mixed $command
* @return bool|mixed
* @return mixed
*/
public function getCommandHandler($command);
@@ -18,6 +18,8 @@ interface Lock
* @param int $seconds
* @param callable|null $callback
* @return mixed
*
* @throws \Illuminate\Contracts\Cache\LockTimeoutException
*/
public function block($seconds, $callback = null);
@@ -7,7 +7,7 @@ interface Store
/**
* Retrieve an item from the cache by key.
*
* @param string|array $key
* @param string $key
* @return mixed
*/
public function get($key);
@@ -0,0 +1,19 @@
<?php
namespace Illuminate\Contracts\Concurrency;
use Closure;
use Illuminate\Support\Defer\DeferredCallback;
interface Driver
{
/**
* Run the given tasks concurrently and return an array containing the results.
*/
public function run(Closure|array $tasks): array;
/**
* Defer the execution of the given tasks.
*/
public function defer(Closure|array $tasks): DeferredCallback;
}
@@ -7,6 +7,16 @@ use Psr\Container\ContainerInterface;
interface Container extends ContainerInterface
{
/**
* {@inheritdoc}
*
* @template TClass of object
*
* @param string|class-string<TClass> $id
* @return ($id is class-string<TClass> ? TClass : mixed)
*/
public function get(string $id);
/**
* Determine if the given abstract type has been bound.
*
@@ -30,7 +40,7 @@ interface Container extends ContainerInterface
* Assign a set of tags to a given binding.
*
* @param array|string $abstracts
* @param array|mixed ...$tags
* @param mixed ...$tags
* @return void
*/
public function tag($abstracts, $tags);
@@ -46,7 +56,7 @@ interface Container extends ContainerInterface
/**
* Register a binding with the container.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @param bool $shared
* @return void
@@ -65,7 +75,7 @@ interface Container extends ContainerInterface
/**
* Register a binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @param bool $shared
* @return void
@@ -75,7 +85,7 @@ interface Container extends ContainerInterface
/**
* Register a shared binding in the container.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
@@ -84,7 +94,7 @@ interface Container extends ContainerInterface
/**
* Register a shared binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
@@ -93,7 +103,7 @@ interface Container extends ContainerInterface
/**
* Register a scoped binding in the container.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
@@ -102,7 +112,7 @@ interface Container extends ContainerInterface
/**
* Register a scoped binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
@@ -111,7 +121,7 @@ interface Container extends ContainerInterface
/**
* "Extend" an abstract type in the container.
*
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure $closure
* @return void
*
@@ -122,9 +132,11 @@ interface Container extends ContainerInterface
/**
* Register an existing instance as shared in the container.
*
* @param string $abstract
* @param mixed $instance
* @return mixed
* @template TInstance of mixed
*
* @param \Closure|string $abstract
* @param TInstance $instance
* @return TInstance
*/
public function instance($abstract, $instance);
@@ -132,7 +144,7 @@ interface Container extends ContainerInterface
* Add a contextual binding to the container.
*
* @param string $concrete
* @param string $abstract
* @param \Closure|string $abstract
* @param \Closure|string $implementation
* @return void
*/
@@ -149,8 +161,10 @@ interface Container extends ContainerInterface
/**
* Get a closure to resolve the given type from the container.
*
* @param string $abstract
* @return \Closure
* @template TClass of object
*
* @param string|class-string<TClass> $abstract
* @return ($abstract is class-string<TClass> ? \Closure(): TClass : \Closure(): mixed)
*/
public function factory($abstract);
@@ -164,9 +178,11 @@ interface Container extends ContainerInterface
/**
* Resolve the given type from the container.
*
* @param string $abstract
* @template TClass of object
*
* @param string|class-string<TClass> $abstract
* @param array $parameters
* @return mixed
* @return ($abstract is class-string<TClass> ? TClass : mixed)
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
@@ -197,7 +213,7 @@ interface Container extends ContainerInterface
* @param \Closure|null $callback
* @return void
*/
public function beforeResolving($abstract, Closure $callback = null);
public function beforeResolving($abstract, ?Closure $callback = null);
/**
* Register a new resolving callback.
@@ -206,7 +222,7 @@ interface Container extends ContainerInterface
* @param \Closure|null $callback
* @return void
*/
public function resolving($abstract, Closure $callback = null);
public function resolving($abstract, ?Closure $callback = null);
/**
* Register a new after resolving callback.
@@ -215,5 +231,5 @@ interface Container extends ContainerInterface
* @param \Closure|null $callback
* @return void
*/
public function afterResolving($abstract, Closure $callback = null);
public function afterResolving($abstract, ?Closure $callback = null);
}
@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Contracts\Container;
interface ContextualAttribute
{
//
}
@@ -16,7 +16,7 @@ interface ContextualBindingBuilder
* Define the implementation for the contextual binding.
*
* @param \Closure|string|array $implementation
* @return void
* @return $this
*/
public function give($implementation);
@@ -24,7 +24,7 @@ interface ContextualBindingBuilder
* Define tagged services to be used as the implementation for the contextual binding.
*
* @param string $tag
* @return void
* @return $this
*/
public function giveTagged($tag);
@@ -33,7 +33,7 @@ interface ContextualBindingBuilder
*
* @param string $key
* @param mixed $default
* @return void
* @return $this
*/
public function giveConfig($key, $default = null);
}
@@ -0,0 +1,10 @@
<?php
namespace Illuminate\Contracts\Container;
/**
* @method static newInstance(): static
*/
interface SelfBuilding
{
}
@@ -21,7 +21,7 @@ interface Factory
public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
/**
* Create a cookie that lasts "forever" (five years).
* Create a cookie that lasts "forever" (400 days).
*
* @param string $name
* @param string $value
@@ -0,0 +1,16 @@
<?php
namespace Illuminate\Contracts\Database;
use Throwable;
interface ConcurrencyErrorDetector
{
/**
* Determine if the given exception was caused by a concurrency error such as a deadlock or serialization failure.
*
* @param \Throwable $e
* @return bool
*/
public function causedByConcurrencyError(Throwable $e): bool;
}
@@ -7,7 +7,7 @@ interface Castable
/**
* Get the name of the caster class to use when casting from / to this cast target.
*
* @param array $arguments
* @param string[] $arguments
* @return class-string<CastsAttributes|CastsInboundAttributes>|CastsAttributes|CastsInboundAttributes
*/
public static function castUsing(array $arguments);
@@ -12,7 +12,7 @@ interface CastsInboundAttributes
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $value
* @param array $attributes
* @param array<string, mixed> $attributes
* @return mixed
*/
public function set(Model $model, string $key, mixed $value, array $attributes);
@@ -0,0 +1,19 @@
<?php
namespace Illuminate\Contracts\Database\Eloquent;
use Illuminate\Database\Eloquent\Model;
interface ComparesCastableAttributes
{
/**
* Determine if the given values are equal.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $firstValue
* @param mixed $secondValue
* @return bool
*/
public function compare(Model $model, string $key, mixed $firstValue, mixed $secondValue);
}
@@ -12,7 +12,7 @@ interface SerializesCastableAttributes
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $value
* @param array $attributes
* @param array<string, mixed> $attributes
* @return mixed
*/
public function serialize(Model $model, string $key, mixed $value, array $attributes);
@@ -9,7 +9,7 @@ interface SupportsPartialRelations
*
* @param string|null $column
* @param string|\Closure|null $aggregate
* @param string $relation
* @param string|null $relation
* @return $this
*/
public function ofMany($column = 'id', $aggregate = 'MAX', $relation = null);
@@ -0,0 +1,16 @@
<?php
namespace Illuminate\Contracts\Database;
use Throwable;
interface LostConnectionDetector
{
/**
* Determine if the given exception was caused by a lost connection.
*
* @param \Throwable $e
* @return bool
*/
public function causedByLostConnection(Throwable $e): bool;
}
@@ -2,12 +2,19 @@
namespace Illuminate\Contracts\Database;
use Illuminate\Database\Eloquent\Relations\Relation;
class ModelIdentifier
{
/**
* Use the Relation morphMap for a Model's name when serializing.
*/
protected static bool $useMorphMap = false;
/**
* The class name of the model.
*
* @var string
* @var class-string<\Illuminate\Database\Eloquent\Model>|string|null
*/
public $class;
@@ -37,23 +44,26 @@ class ModelIdentifier
/**
* The class name of the model collection.
*
* @var string|null
* @var class-string<\Illuminate\Database\Eloquent\Collection>|null
*/
public $collectionClass;
/**
* Create a new model identifier.
*
* @param string $class
* @param class-string<\Illuminate\Database\Eloquent\Model>|null $class
* @param mixed $id
* @param array $relations
* @param mixed $connection
* @return void
*/
public function __construct($class, $id, array $relations, $connection)
{
$this->id = $id;
if ($class !== null && self::$useMorphMap) {
$class = Relation::getMorphAlias($class);
}
$this->class = $class;
$this->id = $id;
$this->relations = $relations;
$this->connection = $connection;
}
@@ -61,7 +71,7 @@ class ModelIdentifier
/**
* Specify the collection class that should be used when serializing / restoring collections.
*
* @param string|null $collectionClass
* @param class-string<\Illuminate\Database\Eloquent\Collection> $collectionClass
* @return $this
*/
public function useCollectionClass(?string $collectionClass)
@@ -70,4 +80,26 @@ class ModelIdentifier
return $this;
}
/**
* Get the fully-qualified class name of the Model.
*
* @return class-string<\Illuminate\Database\Eloquent\Model>|null
*/
public function getClass(): ?string
{
if (self::$useMorphMap && $this->class !== null) {
return Relation::getMorphedModel($this->class) ?? $this->class;
}
return $this->class;
}
/**
* Indicate whether to use the relational morph-map when serializing Models.
*/
public static function useMorphMap(bool $useMorphMap = true): void
{
static::$useMorphMap = $useMorphMap;
}
}
@@ -0,0 +1,8 @@
<?php
namespace Illuminate\Contracts\Debug;
interface ShouldntReport
{
//
}
@@ -13,7 +13,7 @@ interface Encrypter
*
* @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function encrypt($value, $serialize = true);
public function encrypt(#[\SensitiveParameter] $value, $serialize = true);
/**
* Decrypt the given value.
@@ -32,4 +32,18 @@ interface Encrypter
* @return string
*/
public function getKey();
/**
* Get the current encryption key and all previous encryption keys.
*
* @return array
*/
public function getAllKeys();
/**
* Get the previous encryption keys.
*
* @return array
*/
public function getPreviousKeys();
}
@@ -12,7 +12,7 @@ interface StringEncrypter
*
* @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function encryptString($value);
public function encryptString(#[\SensitiveParameter] $value);
/**
* Decrypt the given string without unserialization.
@@ -7,7 +7,7 @@ interface Factory
/**
* Get a filesystem implementation.
*
* @param string|null $name
* @param \UnitEnum|string|null $name
* @return \Illuminate\Contracts\Filesystem\Filesystem
*/
public function disk($name = null);
@@ -18,6 +18,14 @@ interface Filesystem
*/
const VISIBILITY_PRIVATE = 'private';
/**
* Get the full path to the file that exists at the given relative path.
*
* @param string $path
* @return string
*/
public function path($path);
/**
* Determine if a file exists.
*
@@ -52,6 +60,27 @@ interface Filesystem
*/
public function put($path, $contents, $options = []);
/**
* Store the uploaded file on the disk.
*
* @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
* @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
* @param mixed $options
* @return string|false
*/
public function putFile($path, $file = null, $options = []);
/**
* Store the uploaded file on the disk with a given name.
*
* @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
* @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
* @param string|array|null $name
* @param mixed $options
* @return string|false
*/
public function putFileAs($path, $file, $name = null, $options = []);
/**
* Write a new file using a stream.
*
@@ -144,7 +173,7 @@ interface Filesystem
*
* @param string|null $directory
* @param bool $recursive
* @return array
* @return array<string>
*/
public function files($directory = null, $recursive = false);
@@ -152,7 +181,7 @@ interface Filesystem
* Get all of the files from the given directory (recursive).
*
* @param string|null $directory
* @return array
* @return array<string>
*/
public function allFiles($directory = null);
@@ -161,7 +190,7 @@ interface Filesystem
*
* @param string|null $directory
* @param bool $recursive
* @return array
* @return array<string>
*/
public function directories($directory = null, $recursive = false);
@@ -169,7 +198,7 @@ interface Filesystem
* Get all (recursive) of the directories within a given directory.
*
* @param string|null $directory
* @return array
* @return array<string>
*/
public function allDirectories($directory = null);
@@ -19,7 +19,7 @@ interface Hasher
* @param array $options
* @return string
*/
public function make($value, array $options = []);
public function make(#[\SensitiveParameter] $value, array $options = []);
/**
* Check the given plain value against a hash.
@@ -29,7 +29,7 @@ interface Hasher
* @param array $options
* @return bool
*/
public function check($value, $hashedValue, array $options = []);
public function check(#[\SensitiveParameter] $value, $hashedValue, array $options = []);
/**
* Check if the given hash has been hashed using the given options.
@@ -0,0 +1,59 @@
<?php
namespace Illuminate\Contracts\JsonSchema;
use Closure;
interface JsonSchema
{
/**
* Create a new object schema instance.
*
* @param (Closure(JsonSchema): array<string, \Illuminate\JsonSchema\Types\Type>)|array<string, \Illuminate\JsonSchema\Types\Type> $properties
* @return \Illuminate\JsonSchema\Types\ObjectType
*/
public function object(Closure|array $properties = []);
/**
* Create a new array property instance.
*
* @return \Illuminate\JsonSchema\Types\ArrayType
*/
public function array();
/**
* Create a new string property instance.
*
* @return \Illuminate\JsonSchema\Types\StringType
*/
public function string();
/**
* Create a new integer property instance.
*
* @return \Illuminate\JsonSchema\Types\IntegerType
*/
public function integer();
/**
* Create a new number property instance.
*
* @return \Illuminate\JsonSchema\Types\NumberType
*/
public function number();
/**
* Create a new boolean property instance.
*
* @return \Illuminate\JsonSchema\Types\BooleanType
*/
public function boolean();
/**
* Create a new multi-type union instance.
*
* @param array<int, string> $types
* @return \Illuminate\JsonSchema\Types\UnionType
*/
public function union(array $types);
}
@@ -0,0 +1,9 @@
<?php
namespace Illuminate\Contracts\Log;
use Monolog\Processor\ProcessorInterface;
interface ContextLogProcessor extends ProcessorInterface
{
}
@@ -38,4 +38,14 @@ interface Mailer
* @return \Illuminate\Mail\SentMessage|null
*/
public function send($view, array $data = [], $callback = null);
/**
* Send a new message synchronously using a view.
*
* @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
* @param array $data
* @param \Closure|string|null $callback
* @return \Illuminate\Mail\SentMessage|null
*/
public function sendNow($mailable, array $data = [], $callback = null);
}
@@ -7,7 +7,7 @@ interface Dispatcher
/**
* Send the given notification to the given notifiable entities.
*
* @param \Illuminate\Support\Collection|array|mixed $notifiables
* @param \Illuminate\Support\Collection|mixed $notifiables
* @param mixed $notification
* @return void
*/
@@ -16,9 +16,10 @@ interface Dispatcher
/**
* Send the given notification immediately.
*
* @param \Illuminate\Support\Collection|array|mixed $notifiables
* @param \Illuminate\Support\Collection|mixed $notifiables
* @param mixed $notification
* @param array|null $channels
* @return void
*/
public function sendNow($notifiables, $notification);
public function sendNow($notifiables, $notification, ?array $channels = null);
}
@@ -15,7 +15,7 @@ interface Factory
/**
* Send the given notification to the given notifiable entities.
*
* @param \Illuminate\Support\Collection|array|mixed $notifiables
* @param \Illuminate\Support\Collection|mixed $notifiables
* @param mixed $notification
* @return void
*/
@@ -24,7 +24,7 @@ interface Factory
/**
* Send the given notification immediately.
*
* @param \Illuminate\Support\Collection|array|mixed $notifiables
* @param \Illuminate\Support\Collection|mixed $notifiables
* @param mixed $notification
* @return void
*/
@@ -2,6 +2,13 @@
namespace Illuminate\Contracts\Pagination;
/**
* @template TKey of array-key
*
* @template-covariant TValue
*
* @method $this through(callable(TValue): mixed $callback)
*/
interface CursorPaginator
{
/**
@@ -53,7 +60,7 @@ interface CursorPaginator
/**
* Get all of the items being paginated.
*
* @return array
* @return array<TKey, TValue>
*/
public function items();
@@ -92,6 +99,13 @@ interface CursorPaginator
*/
public function hasPages();
/**
* Determine if there are more items in the data source.
*
* @return bool
*/
public function hasMorePages();
/**
* Get the base path for paginator generated URLs.
*
@@ -2,6 +2,13 @@
namespace Illuminate\Contracts\Pagination;
/**
* @template TKey of array-key
*
* @template-covariant TValue
*
* @extends Paginator<TKey, TValue>
*/
interface LengthAwarePaginator extends Paginator
{
/**
@@ -2,6 +2,13 @@
namespace Illuminate\Contracts\Pagination;
/**
* @template TKey of array-key
*
* @template-covariant TValue
*
* @method $this through(callable(TValue): mixed $callback)
*/
interface Paginator
{
/**
@@ -29,6 +36,13 @@ interface Paginator
*/
public function fragment($fragment = null);
/**
* Add all current query string values to the paginator.
*
* @return $this
*/
public function withQueryString();
/**
* The URL for the next page, or null.
*
@@ -46,7 +60,7 @@ interface Paginator
/**
* Get all of the items being paginated.
*
* @return array
* @return array<TKey, TValue>
*/
public function items();
@@ -7,23 +7,23 @@ use Closure;
interface Pipeline
{
/**
* Set the traveler object being sent on the pipeline.
* Set the object being sent through the pipeline.
*
* @param mixed $traveler
* @param mixed $passable
* @return $this
*/
public function send($traveler);
public function send($passable);
/**
* Set the stops of the pipeline.
* Set the array of pipes.
*
* @param dynamic|array $stops
* @param mixed $pipes
* @return $this
*/
public function through($stops);
public function through($pipes);
/**
* Set the method to call on the stops.
* Set the method to call on the pipes.
*
* @param string $method
* @return $this
@@ -58,7 +58,15 @@ interface InvokedProcess
* Wait for the process to finish.
*
* @param callable|null $output
* @return \Illuminate\Console\Process\ProcessResult
* @return \Illuminate\Process\ProcessResult
*/
public function wait(callable $output = null);
public function wait(?callable $output = null);
/**
* Wait until the given callback returns true.
*
* @param callable|null $output
* @return \Illuminate\Process\ProcessResult
*/
public function waitUntil(?callable $output = null);
}
@@ -39,6 +39,14 @@ interface ProcessResult
*/
public function output();
/**
* Determine if the output contains the given string.
*
* @param string $output
* @return bool
*/
public function seeInOutput(string $output);
/**
* Get the error output of the process.
*
@@ -46,13 +54,21 @@ interface ProcessResult
*/
public function errorOutput();
/**
* Determine if the error output contains the given string.
*
* @param string $output
* @return bool
*/
public function seeInErrorOutput(string $output);
/**
* Throw an exception if the process failed.
*
* @param callable|null $callback
* @return $this
*/
public function throw(callable $callback = null);
public function throw(?callable $callback = null);
/**
* Throw an exception if the process failed and the given condition is true.
@@ -61,5 +77,5 @@ interface ProcessResult
* @param callable|null $callback
* @return $this
*/
public function throwIf(bool $condition, callable $callback = null);
public function throwIf(bool $condition, ?callable $callback = null);
}
@@ -11,7 +11,6 @@ class EntityNotFoundException extends InvalidArgumentException
*
* @param string $type
* @param mixed $id
* @return void
*/
public function __construct($type, $id)
{
+10 -1
View File
@@ -133,7 +133,7 @@ interface Job
public function getName();
/**
* Get the resolved name of the queued job class.
* Get the display name of the queued job class.
*
* Resolves the name of "wrapped" jobs such as class-based handlers.
*
@@ -141,6 +141,15 @@ interface Job
*/
public function resolveName();
/**
* Get the class of the queued job.
*
* Resolves the class of "wrapped" jobs such as class-based handlers.
*
* @return string
*/
public function resolveQueuedJobClass();
/**
* Get the name of the connection the job belongs to.
*
@@ -2,6 +2,12 @@
namespace Illuminate\Contracts\Queue;
/**
* @method int pendingSize(string|null $queue = null)
* @method int delayedSize(string|null $queue = null)
* @method int reservedSize(string|null $queue = null)
* @method int|null creationTimeOfOldestPendingJob(string|null $queue = null)
*/
interface Queue
{
/**
@@ -37,7 +43,6 @@ interface Queue
*
* @param string $payload
* @param string|null $queue
* @param array $options
* @return mixed
*/
public function pushRaw($payload, $queue = null, array $options = []);
@@ -7,7 +7,7 @@ interface Factory
/**
* Get a Redis connection by name.
*
* @param string|null $name
* @param \UnitEnum|string|null $name
* @return \Illuminate\Redis\Connections\Connection
*/
public function connection($name = null);
@@ -67,6 +67,17 @@ interface ResponseFactory
*/
public function stream($callback, $status = 200, array $headers = []);
/**
* Create a new streamed JSON response instance.
*
* @param array $data
* @param int $status
* @param array $headers
* @param int $encodingOptions
* @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
*/
public function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15);
/**
* Create a new streamed response instance as a file download.
*
@@ -112,7 +123,7 @@ interface ResponseFactory
/**
* Create a new redirect response to a named route.
*
* @param string $route
* @param \BackedEnum|string $route
* @param mixed $parameters
* @param int $status
* @param array $headers
@@ -59,6 +59,41 @@ interface UrlGenerator
*/
public function route($name, $parameters = [], $absolute = true);
/**
* Create a signed route URL for a named route.
*
* @param string $name
* @param mixed $parameters
* @param \DateTimeInterface|\DateInterval|int|null $expiration
* @param bool $absolute
* @return string
*
* @throws \InvalidArgumentException
*/
public function signedRoute($name, $parameters = [], $expiration = null, $absolute = true);
/**
* Create a temporary signed route URL for a named route.
*
* @param string $name
* @param \DateTimeInterface|\DateInterval|int $expiration
* @param array $parameters
* @param bool $absolute
* @return string
*/
public function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true);
/**
* Generate an absolute URL with the given query parameters.
*
* @param string $path
* @param array $query
* @param mixed $extra
* @param bool|null $secure
* @return string
*/
public function query($path, $query = [], $extra = [], $secure = null);
/**
* Get the URL to a controller action.
*
@@ -98,6 +98,15 @@ interface Session
*/
public function put($key, $value = null);
/**
* Flash a key / value pair to the session.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function flash(string $key, $value = true);
/**
* Get the CSRF token value.
*
@@ -0,0 +1,13 @@
<?php
namespace Illuminate\Contracts\Support;
interface HasOnceHash
{
/**
* Compute the hash that should be used to represent the object when given to a function using "once".
*
* @return string
*/
public function onceHash();
}
@@ -0,0 +1,17 @@
<?php
namespace Illuminate\Contracts\Validation;
interface CompilableRules
{
/**
* Compile the object into usable rules.
*
* @param string $attribute
* @param mixed $value
* @param mixed $data
* @param mixed $context
* @return \stdClass
*/
public function compile($attribute, $value, $data = null, $context = null);
}
@@ -14,7 +14,7 @@ interface InvokableRule
*
* @param string $attribute
* @param mixed $value
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @return void
*/
public function __invoke(string $attribute, mixed $value, Closure $fail);
@@ -11,7 +11,7 @@ interface ValidationRule
*
* @param string $attribute
* @param mixed $value
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @param \Closure(string, ?string=): \Illuminate\Translation\PotentiallyTranslatedString $fail
* @return void
*/
public function validate(string $attribute, mixed $value, Closure $fail): void;
+2 -2
View File
@@ -14,7 +14,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"psr/container": "^1.1.1|^2.0.1",
"psr/simple-cache": "^1.0|^2.0|^3.0"
},
@@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "10.x-dev"
"dev-master": "12.x-dev"
}
},
"config": {