Phase 0: Fundament für Inhaus
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3) - Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung - Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü - Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person - Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“ - Benutzerverwaltung im Admin, Zugang vorläufig über is_admin - vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/ - PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung - VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7197eaebf2
commit
9c0f8de791
15771 changed files with 1564103 additions and 5 deletions
140
vendor/symfony/uid/Factory/MockUuidFactory.php
vendored
Normal file
140
vendor/symfony/uid/Factory/MockUuidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Uid\Exception\LogicException;
|
||||
use Symfony\Component\Uid\TimeBasedUidInterface;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Uid\UuidV1;
|
||||
use Symfony\Component\Uid\UuidV3;
|
||||
use Symfony\Component\Uid\UuidV4;
|
||||
use Symfony\Component\Uid\UuidV5;
|
||||
use Symfony\Component\Uid\UuidV6;
|
||||
|
||||
class MockUuidFactory extends UuidFactory
|
||||
{
|
||||
private \Iterator $sequence;
|
||||
|
||||
/**
|
||||
* @param iterable<string|Uuid> $uuids
|
||||
*/
|
||||
public function __construct(
|
||||
iterable $uuids,
|
||||
private Uuid|string|null $timeBasedNode = null,
|
||||
private Uuid|string|null $nameBasedNamespace = null,
|
||||
) {
|
||||
$this->sequence = match (true) {
|
||||
\is_array($uuids) => new \ArrayIterator($uuids),
|
||||
$uuids instanceof \Iterator => $uuids,
|
||||
$uuids instanceof \Traversable => new \IteratorIterator($uuids),
|
||||
};
|
||||
}
|
||||
|
||||
public function create(): Uuid
|
||||
{
|
||||
if (!$this->sequence->valid()) {
|
||||
throw new LogicException('No more UUIDs in sequence.');
|
||||
}
|
||||
$uuid = $this->sequence->current();
|
||||
$this->sequence->next();
|
||||
|
||||
return match (true) {
|
||||
$uuid instanceof Uuid => $uuid,
|
||||
\is_string($uuid) => Uuid::fromString($uuid),
|
||||
default => throw new InvalidArgumentException(\sprintf('Next UUID in sequence is not a valid UUID string or object: "%s" given.', get_debug_type($uuid))),
|
||||
};
|
||||
}
|
||||
|
||||
public function randomBased(): RandomBasedUuidFactory
|
||||
{
|
||||
return new class($this->create(...)) extends RandomBasedUuidFactory {
|
||||
public function __construct(
|
||||
private \Closure $create,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(): UuidV4
|
||||
{
|
||||
if (!($uuid = ($this->create)()) instanceof UuidV4) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence is not a UuidV4: "%s" given.', get_debug_type($uuid)));
|
||||
}
|
||||
|
||||
return $uuid;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public function timeBased(Uuid|string|null $node = null): TimeBasedUuidFactory
|
||||
{
|
||||
if (\is_string($node ??= $this->timeBasedNode)) {
|
||||
$node = Uuid::fromString($node);
|
||||
}
|
||||
|
||||
return new class($this->create(...), $node) extends TimeBasedUuidFactory {
|
||||
public function __construct(
|
||||
private \Closure $create,
|
||||
private ?Uuid $node = null,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(?\DateTimeInterface $time = null): Uuid&TimeBasedUidInterface
|
||||
{
|
||||
$uuid = ($this->create)();
|
||||
|
||||
if (!($uuid instanceof Uuid && $uuid instanceof TimeBasedUidInterface)) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence is not a Uuid and TimeBasedUidInterface: "%s" given.', get_debug_type($uuid)));
|
||||
}
|
||||
|
||||
if (null !== $time && $uuid->getDateTime() != $time) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence does not match the expected time: "%s" != "%s".', $uuid->getDateTime()->format('@U.uT'), $time->format('@U.uT')));
|
||||
}
|
||||
|
||||
if (null !== $this->node && ($uuid instanceof UuidV1 || $uuid instanceof UuidV6) && $uuid->getNode() !== substr($this->node->toRfc4122(), -12)) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence does not match the expected node: "%s" != "%s".', $uuid->getNode(), substr($this->node->toRfc4122(), -12)));
|
||||
}
|
||||
|
||||
return $uuid;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public function nameBased(Uuid|string|null $namespace = null): NameBasedUuidFactory
|
||||
{
|
||||
if (null === $namespace ??= $this->nameBasedNamespace) {
|
||||
throw new LogicException(\sprintf('A namespace should be defined when using "%s()".', __METHOD__));
|
||||
}
|
||||
|
||||
return new class($this->create(...), $namespace) extends NameBasedUuidFactory {
|
||||
public function __construct(
|
||||
private \Closure $create,
|
||||
private Uuid|string $namespace,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(string $name): UuidV5|UuidV3
|
||||
{
|
||||
if (!($uuid = ($this->create)()) instanceof UuidV5 && !$uuid instanceof UuidV3) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence is not a UuidV5 or UuidV3: "%s".', get_debug_type($uuid)));
|
||||
}
|
||||
|
||||
$factory = new UuidFactory(nameBasedClass: $uuid::class, nameBasedNamespace: $this->namespace);
|
||||
|
||||
if ($uuid->toRfc4122() !== $expectedUuid = $factory->nameBased()->create($name)->toRfc4122()) {
|
||||
throw new InvalidArgumentException(\sprintf('Next UUID in sequence does not match the expected named UUID: "%s" != "%s".', $uuid->toRfc4122(), $expectedUuid));
|
||||
}
|
||||
|
||||
return $uuid;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
41
vendor/symfony/uid/Factory/NameBasedUuidFactory.php
vendored
Normal file
41
vendor/symfony/uid/Factory/NameBasedUuidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Uid\UuidV3;
|
||||
use Symfony\Component\Uid\UuidV5;
|
||||
|
||||
class NameBasedUuidFactory
|
||||
{
|
||||
public function __construct(
|
||||
private string $class,
|
||||
private Uuid $namespace,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(string $name): UuidV5|UuidV3
|
||||
{
|
||||
switch ($class = $this->class) {
|
||||
case UuidV5::class: return Uuid::v5($this->namespace, $name);
|
||||
case UuidV3::class: return Uuid::v3($this->namespace, $name);
|
||||
}
|
||||
|
||||
if (is_subclass_of($class, UuidV5::class)) {
|
||||
$uuid = Uuid::v5($this->namespace, $name);
|
||||
} else {
|
||||
$uuid = Uuid::v3($this->namespace, $name);
|
||||
}
|
||||
|
||||
return new $class($uuid);
|
||||
}
|
||||
}
|
||||
32
vendor/symfony/uid/Factory/RandomBasedUuidFactory.php
vendored
Normal file
32
vendor/symfony/uid/Factory/RandomBasedUuidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\UuidV4;
|
||||
|
||||
class RandomBasedUuidFactory
|
||||
{
|
||||
/**
|
||||
* @param class-string $class
|
||||
*/
|
||||
public function __construct(
|
||||
private string $class,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(): UuidV4
|
||||
{
|
||||
$class = $this->class;
|
||||
|
||||
return new $class();
|
||||
}
|
||||
}
|
||||
38
vendor/symfony/uid/Factory/TimeBasedUuidFactory.php
vendored
Normal file
38
vendor/symfony/uid/Factory/TimeBasedUuidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\TimeBasedUidInterface;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
class TimeBasedUuidFactory
|
||||
{
|
||||
/**
|
||||
* @param class-string<Uuid&TimeBasedUidInterface> $class
|
||||
*/
|
||||
public function __construct(
|
||||
private string $class,
|
||||
private ?Uuid $node = null,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(?\DateTimeInterface $time = null): Uuid&TimeBasedUidInterface
|
||||
{
|
||||
$class = $this->class;
|
||||
|
||||
if (null === $time && null === $this->node) {
|
||||
return new $class();
|
||||
}
|
||||
|
||||
return new $class($class::generate($time, $this->node));
|
||||
}
|
||||
}
|
||||
22
vendor/symfony/uid/Factory/UlidFactory.php
vendored
Normal file
22
vendor/symfony/uid/Factory/UlidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\Ulid;
|
||||
|
||||
class UlidFactory
|
||||
{
|
||||
public function create(?\DateTimeInterface $time = null): Ulid
|
||||
{
|
||||
return new Ulid(null === $time ? null : Ulid::generate($time));
|
||||
}
|
||||
}
|
||||
99
vendor/symfony/uid/Factory/UuidFactory.php
vendored
Normal file
99
vendor/symfony/uid/Factory/UuidFactory.php
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Uid\Factory;
|
||||
|
||||
use Symfony\Component\Uid\Exception\LogicException;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Uid\UuidV1;
|
||||
use Symfony\Component\Uid\UuidV4;
|
||||
use Symfony\Component\Uid\UuidV5;
|
||||
use Symfony\Component\Uid\UuidV7;
|
||||
|
||||
class UuidFactory
|
||||
{
|
||||
private string $defaultClass;
|
||||
private string $timeBasedClass;
|
||||
private string $nameBasedClass;
|
||||
private string $randomBasedClass;
|
||||
private ?Uuid $timeBasedNode;
|
||||
private ?Uuid $nameBasedNamespace;
|
||||
|
||||
public function __construct(string|int $defaultClass = UuidV7::class, string|int $timeBasedClass = UuidV7::class, string|int $nameBasedClass = UuidV5::class, string|int $randomBasedClass = UuidV4::class, Uuid|string|null $timeBasedNode = null, Uuid|string|null $nameBasedNamespace = null)
|
||||
{
|
||||
if (null !== $timeBasedNode && !$timeBasedNode instanceof Uuid) {
|
||||
$timeBasedNode = Uuid::fromString($timeBasedNode);
|
||||
}
|
||||
|
||||
if (null !== $nameBasedNamespace) {
|
||||
$nameBasedNamespace = $this->getNamespace($nameBasedNamespace);
|
||||
}
|
||||
|
||||
$this->defaultClass = is_numeric($defaultClass) ? Uuid::class.'V'.$defaultClass : $defaultClass;
|
||||
$this->timeBasedClass = is_numeric($timeBasedClass) ? Uuid::class.'V'.$timeBasedClass : $timeBasedClass;
|
||||
$this->nameBasedClass = is_numeric($nameBasedClass) ? Uuid::class.'V'.$nameBasedClass : $nameBasedClass;
|
||||
$this->randomBasedClass = is_numeric($randomBasedClass) ? Uuid::class.'V'.$randomBasedClass : $randomBasedClass;
|
||||
$this->timeBasedNode = $timeBasedNode;
|
||||
$this->nameBasedNamespace = $nameBasedNamespace;
|
||||
}
|
||||
|
||||
public function create(): Uuid
|
||||
{
|
||||
$class = $this->defaultClass;
|
||||
|
||||
return new $class();
|
||||
}
|
||||
|
||||
public function randomBased(): RandomBasedUuidFactory
|
||||
{
|
||||
return new RandomBasedUuidFactory($this->randomBasedClass);
|
||||
}
|
||||
|
||||
public function timeBased(Uuid|string|null $node = null): TimeBasedUuidFactory
|
||||
{
|
||||
$node ??= $this->timeBasedNode;
|
||||
|
||||
if (null !== $node && !$node instanceof Uuid) {
|
||||
$node = Uuid::fromString($node);
|
||||
}
|
||||
|
||||
return new TimeBasedUuidFactory($this->timeBasedClass, $node);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws LogicException When no namespace is defined
|
||||
*/
|
||||
public function nameBased(Uuid|string|null $namespace = null): NameBasedUuidFactory
|
||||
{
|
||||
$namespace ??= $this->nameBasedNamespace;
|
||||
|
||||
if (null === $namespace) {
|
||||
throw new LogicException(\sprintf('A namespace should be defined when using "%s()".', __METHOD__));
|
||||
}
|
||||
|
||||
return new NameBasedUuidFactory($this->nameBasedClass, $this->getNamespace($namespace));
|
||||
}
|
||||
|
||||
private function getNamespace(Uuid|string $namespace): Uuid
|
||||
{
|
||||
if ($namespace instanceof Uuid) {
|
||||
return $namespace;
|
||||
}
|
||||
|
||||
return match ($namespace) {
|
||||
'dns' => new UuidV1(Uuid::NAMESPACE_DNS),
|
||||
'url' => new UuidV1(Uuid::NAMESPACE_URL),
|
||||
'oid' => new UuidV1(Uuid::NAMESPACE_OID),
|
||||
'x500' => new UuidV1(Uuid::NAMESPACE_X500),
|
||||
default => Uuid::fromString($namespace),
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue