composer update

This commit is contained in:
Manish Verma
2018-12-05 10:50:52 +05:30
parent 9eabcacfa7
commit 4addd1e9c6
3328 changed files with 156676 additions and 138988 deletions

View File

@@ -1,40 +1,24 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\DBALException;
use function implode;
use function sprintf;
class SchemaException extends \Doctrine\DBAL\DBALException
class SchemaException extends DBALException
{
const TABLE_DOESNT_EXIST = 10;
const TABLE_ALREADY_EXISTS = 20;
const COLUMN_DOESNT_EXIST = 30;
const COLUMN_ALREADY_EXISTS = 40;
const INDEX_DOESNT_EXIST = 50;
const INDEX_ALREADY_EXISTS = 60;
const SEQUENCE_DOENST_EXIST = 70;
const SEQUENCE_ALREADY_EXISTS = 80;
const INDEX_INVALID_NAME = 90;
const FOREIGNKEY_DOESNT_EXIST = 100;
const NAMESPACE_ALREADY_EXISTS = 110;
public const TABLE_DOESNT_EXIST = 10;
public const TABLE_ALREADY_EXISTS = 20;
public const COLUMN_DOESNT_EXIST = 30;
public const COLUMN_ALREADY_EXISTS = 40;
public const INDEX_DOESNT_EXIST = 50;
public const INDEX_ALREADY_EXISTS = 60;
public const SEQUENCE_DOENST_EXIST = 70;
public const SEQUENCE_ALREADY_EXISTS = 80;
public const INDEX_INVALID_NAME = 90;
public const FOREIGNKEY_DOESNT_EXIST = 100;
public const NAMESPACE_ALREADY_EXISTS = 110;
/**
* @param string $tableName
@@ -43,7 +27,7 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function tableDoesNotExist($tableName)
{
return new self("There is no table with name '".$tableName."' in the schema.", self::TABLE_DOESNT_EXIST);
return new self("There is no table with name '" . $tableName . "' in the schema.", self::TABLE_DOESNT_EXIST);
}
/**
@@ -53,7 +37,10 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function indexNameInvalid($indexName)
{
return new self("Invalid index-name $indexName given, has to be [a-zA-Z0-9_]", self::INDEX_INVALID_NAME);
return new self(
sprintf('Invalid index-name %s given, has to be [a-zA-Z0-9_]', $indexName),
self::INDEX_INVALID_NAME
);
}
/**
@@ -64,7 +51,10 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function indexDoesNotExist($indexName, $table)
{
return new self("Index '$indexName' does not exist on table '$table'.", self::INDEX_DOESNT_EXIST);
return new self(
sprintf("Index '%s' does not exist on table '%s'.", $indexName, $table),
self::INDEX_DOESNT_EXIST
);
}
/**
@@ -75,7 +65,10 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function indexAlreadyExists($indexName, $table)
{
return new self("An index with name '$indexName' was already defined on table '$table'.", self::INDEX_ALREADY_EXISTS);
return new self(
sprintf("An index with name '%s' was already defined on table '%s'.", $indexName, $table),
self::INDEX_ALREADY_EXISTS
);
}
/**
@@ -86,7 +79,10 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function columnDoesNotExist($columnName, $table)
{
return new self("There is no column with name '$columnName' on table '$table'.", self::COLUMN_DOESNT_EXIST);
return new self(
sprintf("There is no column with name '%s' on table '%s'.", $columnName, $table),
self::COLUMN_DOESNT_EXIST
);
}
/**
@@ -109,7 +105,7 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function tableAlreadyExists($tableName)
{
return new self("The table with name '".$tableName."' already exists.", self::TABLE_ALREADY_EXISTS);
return new self("The table with name '" . $tableName . "' already exists.", self::TABLE_ALREADY_EXISTS);
}
/**
@@ -121,7 +117,8 @@ class SchemaException extends \Doctrine\DBAL\DBALException
public static function columnAlreadyExists($tableName, $columnName)
{
return new self(
"The column '".$columnName."' on table '".$tableName."' already exists.", self::COLUMN_ALREADY_EXISTS
"The column '" . $columnName . "' on table '" . $tableName . "' already exists.",
self::COLUMN_ALREADY_EXISTS
);
}
@@ -132,7 +129,7 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function sequenceAlreadyExists($sequenceName)
{
return new self("The sequence '".$sequenceName."' already exists.", self::SEQUENCE_ALREADY_EXISTS);
return new self("The sequence '" . $sequenceName . "' already exists.", self::SEQUENCE_ALREADY_EXISTS);
}
/**
@@ -142,7 +139,7 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function sequenceDoesNotExist($sequenceName)
{
return new self("There exists no sequence with the name '".$sequenceName."'.", self::SEQUENCE_DOENST_EXIST);
return new self("There exists no sequence with the name '" . $sequenceName . "'.", self::SEQUENCE_DOENST_EXIST);
}
/**
@@ -153,22 +150,22 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function foreignKeyDoesNotExist($fkName, $table)
{
return new self("There exists no foreign key with the name '$fkName' on table '$table'.", self::FOREIGNKEY_DOESNT_EXIST);
return new self(
sprintf("There exists no foreign key with the name '%s' on table '%s'.", $fkName, $table),
self::FOREIGNKEY_DOESNT_EXIST
);
}
/**
* @param \Doctrine\DBAL\Schema\Table $localTable
* @param \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey
*
* @return \Doctrine\DBAL\Schema\SchemaException
*/
public static function namedForeignKeyRequired(Table $localTable, ForeignKeyConstraint $foreignKey)
{
return new self(
"The performed schema operation on ".$localTable->getName()." requires a named foreign key, ".
"but the given foreign key from (".implode(", ", $foreignKey->getColumns()).") onto foreign table ".
"'".$foreignKey->getForeignTableName()."' (".implode(", ", $foreignKey->getForeignColumns()).") is currently ".
"unnamed."
'The performed schema operation on ' . $localTable->getName() . ' requires a named foreign key, ' .
'but the given foreign key from (' . implode(', ', $foreignKey->getColumns()) . ') onto foreign table ' .
"'" . $foreignKey->getForeignTableName() . "' (" . implode(', ', $foreignKey->getForeignColumns()) . ') is currently ' .
'unnamed.'
);
}
@@ -179,6 +176,8 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/
public static function alterTableChangeNotSupported($changeName)
{
return new self("Alter table change not supported, given '$changeName'");
return new self(
sprintf("Alter table change not supported, given '%s'", $changeName)
);
}
}