mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Update composer
This commit is contained in:
parent
330cdbe615
commit
0c83c9a678
442 changed files with 9523 additions and 10793 deletions
|
@ -25,8 +25,14 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
|
|||
/**
|
||||
* @param string[] $allowedMethods
|
||||
*/
|
||||
public function __construct(array $allowedMethods, string $message = '', int $code = 0, ?\Throwable $previous = null)
|
||||
public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, ?\Throwable $previous = null)
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
$this->allowedMethods = array_map('strtoupper', $allowedMethods);
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
@ -37,7 +43,7 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
|
|||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedMethods(): array
|
||||
public function getAllowedMethods()
|
||||
{
|
||||
return $this->allowedMethods;
|
||||
}
|
||||
|
|
|
@ -19,39 +19,4 @@ namespace Symfony\Component\Routing\Exception;
|
|||
*/
|
||||
class MissingMandatoryParametersException extends \InvalidArgumentException implements ExceptionInterface
|
||||
{
|
||||
private string $routeName = '';
|
||||
private array $missingParameters = [];
|
||||
|
||||
/**
|
||||
* @param string[] $missingParameters
|
||||
* @param int $code
|
||||
*/
|
||||
public function __construct(string $routeName = '', $missingParameters = null, $code = 0, ?\Throwable $previous = null)
|
||||
{
|
||||
if (\is_array($missingParameters)) {
|
||||
$this->routeName = $routeName;
|
||||
$this->missingParameters = $missingParameters;
|
||||
$message = sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', $missingParameters), $routeName);
|
||||
} else {
|
||||
trigger_deprecation('symfony/routing', '6.1', 'Construction of "%s" with an exception message is deprecated, provide the route name and an array of missing parameters instead.', __CLASS__);
|
||||
$message = $routeName;
|
||||
$previous = $code instanceof \Throwable ? $code : null;
|
||||
$code = (int) $missingParameters;
|
||||
}
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getMissingParameters(): array
|
||||
{
|
||||
return $this->missingParameters;
|
||||
}
|
||||
|
||||
public function getRouteName(): string
|
||||
{
|
||||
return $this->routeName;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue