welcome back to dyb-tech
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\Migrations\Configuration\Exception;
|
||||
|
||||
use Doctrine\Migrations\Exception\MigrationException;
|
||||
|
||||
interface ConfigurationException extends MigrationException
|
||||
{
|
||||
}
|
||||
Vendored
+17
@@ -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));
|
||||
}
|
||||
}
|
||||
Vendored
+15
@@ -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.');
|
||||
}
|
||||
}
|
||||
Vendored
+31
@@ -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),
|
||||
));
|
||||
}
|
||||
}
|
||||
+25
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user