diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-01-04 09:09:53 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-01-04 09:09:53 +0000 |
| commit | ad7be0676435f5484730827e851fd40fe9abe9d1 (patch) | |
| tree | b80841a5b9e533c84ee9116f9a5e13d9148a944d /vendor/doctrine | |
| parent | 2dfebe3f596080dd7c1e6560a14006d9cb3f725f (diff) | |
| download | webtrees-ad7be0676435f5484730827e851fd40fe9abe9d1.tar.gz webtrees-ad7be0676435f5484730827e851fd40fe9abe9d1.tar.bz2 webtrees-ad7be0676435f5484730827e851fd40fe9abe9d1.zip | |
Update vendor dependencies
Diffstat (limited to 'vendor/doctrine')
3 files changed, 21 insertions, 3 deletions
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php index bae6d218cb..91ffd47246 100644 --- a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php @@ -4,6 +4,7 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Platforms\AbstractPlatform; use InvalidArgumentException; +use function array_filter; use function array_keys; use function array_map; use function array_search; @@ -211,6 +212,10 @@ class Index extends AbstractAsset implements Constraint return false; } + if (! $this->hasSameColumnLengths($other)) { + return false; + } + if (! $this->isUnique() && ! $this->isPrimary()) { // this is a special case: If the current key is neither primary or unique, any unique or // primary key will always have the same effect for the index and there cannot be any constraint @@ -336,4 +341,17 @@ class Index extends AbstractAsset implements Constraint return ! $this->hasOption('where') && ! $other->hasOption('where'); } + + /** + * Returns whether the index has the same column lengths as the other + */ + private function hasSameColumnLengths(self $other) : bool + { + $filter = static function (?int $length) : bool { + return $length !== null; + }; + + return array_filter($this->options['lengths'] ?? [], $filter) + === array_filter($other->options['lengths'] ?? [], $filter); + } } diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index 2c058b8bf6..7bcd5533ef 100644 --- a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -312,11 +312,11 @@ class MySqlSchemaManager extends AbstractSchemaManager /** * @return string[]|true[] */ - private function parseCreateOptions(string $string) : array + private function parseCreateOptions(?string $string) : array { $options = []; - if ($string === '') { + if ($string === null || $string === '') { return $options; } diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php index 52802c38f0..c6e44a045e 100644 --- a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php +++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php @@ -14,7 +14,7 @@ class Version /** * Current Doctrine Version. */ - public const VERSION = '2.9.1'; + public const VERSION = '2.9.2'; /** * Compares a Doctrine version with the current one. |
