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
57
vendor/league/commonmark/src/Normalizer/SlugNormalizer.php
vendored
Normal file
57
vendor/league/commonmark/src/Normalizer/SlugNormalizer.php
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
* (c) Colin O'Dell <colinodell@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace League\CommonMark\Normalizer;
|
||||
|
||||
use League\Config\ConfigurationAwareInterface;
|
||||
use League\Config\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* Creates URL-friendly strings based on the given string input
|
||||
*/
|
||||
final class SlugNormalizer implements TextNormalizerInterface, ConfigurationAwareInterface
|
||||
{
|
||||
/** @psalm-allow-private-mutation */
|
||||
private int $defaultMaxLength = 255;
|
||||
|
||||
public function setConfiguration(ConfigurationInterface $configuration): void
|
||||
{
|
||||
$this->defaultMaxLength = $configuration->get('slug_normalizer/max_length');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
public function normalize(string $text, array $context = []): string
|
||||
{
|
||||
// Add any requested prefix
|
||||
$slug = ($context['prefix'] ?? '') . $text;
|
||||
// Trim whitespace
|
||||
$slug = \trim($slug);
|
||||
// Convert to lowercase
|
||||
$slug = \mb_strtolower($slug, 'UTF-8');
|
||||
// Try replacing whitespace with a dash
|
||||
$slug = \preg_replace('/\s+/u', '-', $slug) ?? $slug;
|
||||
// Try removing characters other than letters, numbers, and marks.
|
||||
$slug = \preg_replace('/[^\p{L}\p{Nd}\p{Nl}\p{M}-]+/u', '', $slug) ?? $slug;
|
||||
// Trim to requested length if given
|
||||
if ($length = $context['length'] ?? $this->defaultMaxLength) {
|
||||
$slug = \mb_substr($slug, 0, $length, 'UTF-8');
|
||||
}
|
||||
|
||||
// @phpstan-ignore-next-line Because it thinks mb_substr() returns false on PHP 7.4
|
||||
return $slug;
|
||||
}
|
||||
}
|
||||
44
vendor/league/commonmark/src/Normalizer/TextNormalizer.php
vendored
Normal file
44
vendor/league/commonmark/src/Normalizer/TextNormalizer.php
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
* (c) Colin O'Dell <colinodell@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\CommonMark\Normalizer;
|
||||
|
||||
/***
|
||||
* Normalize text input using the steps given by the CommonMark spec to normalize labels
|
||||
*
|
||||
* @see https://spec.commonmark.org/0.29/#matches
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TextNormalizer implements TextNormalizerInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-pure
|
||||
*/
|
||||
public function normalize(string $text, array $context = []): string
|
||||
{
|
||||
// Collapse internal whitespace to single space and remove
|
||||
// leading/trailing whitespace
|
||||
$text = \preg_replace('/[ \t\r\n]+/', ' ', \trim($text));
|
||||
\assert(\is_string($text));
|
||||
|
||||
// Is it strictly ASCII? If so, we can use strtolower() instead (faster)
|
||||
if (\mb_check_encoding($text, 'ASCII')) {
|
||||
return \strtolower($text);
|
||||
}
|
||||
|
||||
return \mb_convert_case($text, \MB_CASE_FOLD, 'UTF-8');
|
||||
}
|
||||
}
|
||||
33
vendor/league/commonmark/src/Normalizer/TextNormalizerInterface.php
vendored
Normal file
33
vendor/league/commonmark/src/Normalizer/TextNormalizerInterface.php
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
* (c) Colin O'Dell <colinodell@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace League\CommonMark\Normalizer;
|
||||
|
||||
/**
|
||||
* Creates a normalized version of the given input text
|
||||
*/
|
||||
interface TextNormalizerInterface
|
||||
{
|
||||
/**
|
||||
* @param string $text The text to normalize
|
||||
* @param array<string, mixed> $context Additional context about the text being normalized (optional)
|
||||
*
|
||||
* $context may include (but is not required to include) the following:
|
||||
* - `prefix` - A string prefix to prepend to each normalized result
|
||||
* - `length` - The requested maximum length
|
||||
* - `node` - The node we're normalizing text for
|
||||
*
|
||||
* Implementations do not have to use or respect any information within that $context
|
||||
*/
|
||||
public function normalize(string $text, array $context = []): string;
|
||||
}
|
||||
83
vendor/league/commonmark/src/Normalizer/UniqueSlugNormalizer.php
vendored
Normal file
83
vendor/league/commonmark/src/Normalizer/UniqueSlugNormalizer.php
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
* (c) Colin O'Dell <colinodell@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace League\CommonMark\Normalizer;
|
||||
|
||||
// phpcs:disable Squiz.Strings.DoubleQuoteUsage.ContainsVar
|
||||
final class UniqueSlugNormalizer implements UniqueSlugNormalizerInterface
|
||||
{
|
||||
private TextNormalizerInterface $innerNormalizer;
|
||||
|
||||
/**
|
||||
* Slugs claimed by the surrounding page (in final, normalized form), seeded as if they'd
|
||||
* already been handed out once, so the first colliding slug gets a "-1" suffix.
|
||||
* Unlike regular history, these survive clearHistory().
|
||||
*
|
||||
* @var array<string, int>
|
||||
*/
|
||||
private array $reserved = [];
|
||||
|
||||
/**
|
||||
* Every slug we've handed out, mapped to the next numeric suffix to try for it
|
||||
*
|
||||
* @var array<string, int>
|
||||
*/
|
||||
private array $alreadyUsed;
|
||||
|
||||
/**
|
||||
* @param iterable<string> $reservedSlugs
|
||||
*/
|
||||
public function __construct(TextNormalizerInterface $innerNormalizer, iterable $reservedSlugs = [])
|
||||
{
|
||||
$this->innerNormalizer = $innerNormalizer;
|
||||
|
||||
foreach ($reservedSlugs as $slug) {
|
||||
$this->reserved[$slug] = 1;
|
||||
}
|
||||
|
||||
$this->alreadyUsed = $this->reserved;
|
||||
}
|
||||
|
||||
public function clearHistory(): void
|
||||
{
|
||||
$this->alreadyUsed = $this->reserved;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @psalm-allow-private-mutation
|
||||
*/
|
||||
public function normalize(string $text, array $context = []): string
|
||||
{
|
||||
$normalized = $this->innerNormalizer->normalize($text, $context);
|
||||
|
||||
// If it's not unique, add an incremental number to the end until we get a unique version.
|
||||
// Suffixes are handed out in ascending order and are never given back, so we can pick up
|
||||
// where the previous collision left off instead of re-checking suffixes we know are taken.
|
||||
if (isset($this->alreadyUsed[$normalized])) {
|
||||
$suffix = $this->alreadyUsed[$normalized];
|
||||
while (isset($this->alreadyUsed["$normalized-$suffix"])) {
|
||||
++$suffix;
|
||||
}
|
||||
|
||||
$this->alreadyUsed[$normalized] = $suffix + 1;
|
||||
|
||||
$normalized = "$normalized-$suffix";
|
||||
}
|
||||
|
||||
$this->alreadyUsed[$normalized] = 1;
|
||||
|
||||
return $normalized;
|
||||
}
|
||||
}
|
||||
28
vendor/league/commonmark/src/Normalizer/UniqueSlugNormalizerInterface.php
vendored
Normal file
28
vendor/league/commonmark/src/Normalizer/UniqueSlugNormalizerInterface.php
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
* (c) Colin O'Dell <colinodell@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace League\CommonMark\Normalizer;
|
||||
|
||||
interface UniqueSlugNormalizerInterface extends TextNormalizerInterface
|
||||
{
|
||||
public const DISABLED = false;
|
||||
public const PER_ENVIRONMENT = 'environment';
|
||||
public const PER_DOCUMENT = 'document';
|
||||
|
||||
/**
|
||||
* Called by the Environment whenever the configured scope changes
|
||||
*
|
||||
* Currently, this will only be called PER_DOCUMENT.
|
||||
*/
|
||||
public function clearHistory(): void;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue