welcome back to dyb-tech

This commit is contained in:
Daniel Guzman
2024-05-18 02:28:01 +02:00
parent 9513cdba09
commit 9f30bc98c7
6149 changed files with 668407 additions and 0 deletions
@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Configuration\Exception;
use Doctrine\Migrations\Exception\MigrationException;
interface ConfigurationException extends MigrationException
{
}
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Configuration\Exception;
use InvalidArgumentException;
use function sprintf;
final class FileNotFound extends InvalidArgumentException implements ConfigurationException
{
public static function new(string $file): self
{
return new self(sprintf('The "%s" configuration file does not exist.', $file));
}
}
@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Configuration\Exception;
use LogicException;
final class FrozenConfiguration extends LogicException implements ConfigurationException
{
public static function new(): self
{
return new self('The configuration is frozen and cannot be edited anymore.');
}
}
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Configuration\Exception;
use Doctrine\Migrations\Configuration\Connection\ConnectionLoader;
use Doctrine\Migrations\Configuration\EntityManager\EntityManagerLoader;
use InvalidArgumentException;
use function get_debug_type;
use function sprintf;
final class InvalidLoader extends InvalidArgumentException implements ConfigurationException
{
public static function noMultipleConnections(ConnectionLoader $loader): self
{
return new self(sprintf(
'Only one connection is supported by %s',
get_debug_type($loader),
));
}
public static function noMultipleEntityManagers(EntityManagerLoader $loader): self
{
return new self(sprintf(
'Only one entity manager is supported by %s',
get_debug_type($loader),
));
}
}
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Configuration\Exception;
use LogicException;
use function sprintf;
use function var_export;
final class UnknownConfigurationValue extends LogicException implements ConfigurationException
{
public static function new(string $key, mixed $value): self
{
return new self(
sprintf(
'Unknown %s for configuration "%s".',
var_export($value, true),
$key,
),
10,
);
}
}