-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3586 from morozov/issues/3263
Get rid of hard-coded default values of maximum field lengths
- Loading branch information
Showing
45 changed files
with
980 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Exception; | ||
|
||
use Doctrine\DBAL\DBALException; | ||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use function sprintf; | ||
|
||
final class ColumnLengthRequired extends DBALException | ||
{ | ||
/** | ||
* @param AbstractPlatform $platform The target platform | ||
* @param string $type The SQL column type | ||
*/ | ||
public static function new(AbstractPlatform $platform, string $type) : self | ||
{ | ||
return new self( | ||
sprintf( | ||
'The "%s" platform requires the length of a %s column to be specified', | ||
$platform->getName(), | ||
$type | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.