[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

@@ -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;
}
}