glastree_on_gitea

This commit is contained in:
2026-05-26 08:14:29 +02:00
commit 0bed099d05
9556 changed files with 1186307 additions and 0 deletions
@@ -0,0 +1,19 @@
<?php
namespace Illuminate\Routing\Exceptions;
use RuntimeException;
class BackedEnumCaseNotFoundException extends RuntimeException
{
/**
* Create a new exception instance.
*
* @param string $backedEnumClass
* @param string $case
*/
public function __construct($backedEnumClass, $case)
{
parent::__construct("Case [{$case}] not found on Backed Enum [{$backedEnumClass}].");
}
}
@@ -0,0 +1,16 @@
<?php
namespace Illuminate\Routing\Exceptions;
use Symfony\Component\HttpKernel\Exception\HttpException;
class InvalidSignatureException extends HttpException
{
/**
* Create a new exception instance.
*/
public function __construct()
{
parent::__construct(403, 'Invalid signature.');
}
}
@@ -0,0 +1,31 @@
<?php
namespace Illuminate\Routing\Exceptions;
use Exception;
class MissingRateLimiterException extends Exception
{
/**
* Create a new exception for invalid named rate limiter.
*
* @param string $limiter
* @return static
*/
public static function forLimiter(string $limiter)
{
return new static("Rate limiter [{$limiter}] is not defined.");
}
/**
* Create a new exception for an invalid rate limiter based on a model property.
*
* @param string $limiter
* @param class-string $model
* @return static
*/
public static function forLimiterAndUser(string $limiter, string $model)
{
return new static("Rate limiter [{$model}::{$limiter}] is not defined.");
}
}
@@ -0,0 +1,49 @@
<?php
namespace Illuminate\Routing\Exceptions;
use Illuminate\Http\Response;
use RuntimeException;
use Throwable;
class StreamedResponseException extends RuntimeException
{
/**
* The actual exception thrown during the stream.
*
* @var \Throwable
*/
public $originalException;
/**
* Create a new exception instance.
*
* @param \Throwable $originalException
*/
public function __construct(Throwable $originalException)
{
$this->originalException = $originalException;
parent::__construct($originalException->getMessage());
}
/**
* Render the exception.
*
* @return \Illuminate\Http\Response
*/
public function render()
{
return new Response('');
}
/**
* Get the actual exception thrown during the stream.
*
* @return \Throwable
*/
public function getInnerException()
{
return $this->originalException;
}
}
@@ -0,0 +1,37 @@
<?php
namespace Illuminate\Routing\Exceptions;
use Exception;
use Illuminate\Routing\Route;
use Illuminate\Support\Str;
class UrlGenerationException extends Exception
{
/**
* Create a new exception for missing route parameters.
*
* @param \Illuminate\Routing\Route $route
* @param array $parameters
* @return static
*/
public static function forMissingParameters(Route $route, array $parameters = [])
{
$parameterLabel = Str::plural('parameter', count($parameters));
$message = sprintf(
'Missing required %s for [Route: %s] [URI: %s]',
$parameterLabel,
$route->getName(),
$route->uri()
);
if ($parameters !== []) {
$message .= sprintf(' [Missing %s: %s]', $parameterLabel, implode(', ', $parameters));
}
$message .= '.';
return new static($message);
}
}