[TASK] Update doctrine/dbal to ~2.8.0 68/59668/10
authorBenni Mack <benni@typo3.org>
Sun, 30 Sep 2018 23:06:46 +0000 (01:06 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 9 Feb 2019 12:38:30 +0000 (13:38 +0100)
doctrine/dbal 2.7.x will reach end of life before core
v9 is out of support. We should upgrade to at least 2.8:

composer req doctrine/dbal:~2.8.0

https://www.doctrine-project.org/2018/07/12/common-2-9-and-dbal-2-8-and-orm-2-6-2.html

Also needs a typo3/testing-framework raise:

composer req --dev typo3/testing-framework:~5.0.5

Needed core changes:
- DBAL does not add "OFFSET 0" if nothing given (test change only)
- SQLite does not need "PRIMARY KEY" if autoincrement is given (in DefaultTcaSchema)

Resolves: #86490
Releases: master, 9.5
Change-Id: I28014d252a57f7f421242e35086c63a0a824ed04
Reviewed-on: https://review.typo3.org/59668
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
composer.json
composer.lock
typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php
typo3/sysext/core/Tests/Unit/Database/ConnectionTest.php
typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaSqliteTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaTest.php
typo3/sysext/core/composer.json

index 8dd193e..8f91971 100644 (file)
@@ -39,7 +39,7 @@
                "ext-xml": "*",
                "cogpowered/finediff": "~0.3.1",
                "doctrine/annotations": "^1.3",
-               "doctrine/dbal": "~2.7.1",
+               "doctrine/dbal": "~2.8.0",
                "doctrine/instantiator": "^1.1",
                "doctrine/lexer": "^1.0",
                "guzzlehttp/guzzle": "^6.3.0",
@@ -73,7 +73,7 @@
                "friendsofphp/php-cs-fixer": "^2.12.2",
                "phpspec/prophecy": "^1.7.5",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "~5.0.4"
+               "typo3/testing-framework": "~5.0.5"
        },
        "suggest": {
                "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
index 59cbe89..6368175 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "ae4664b4ee7bf0aa9a614d355d67db78",
+    "content-hash": "a58147693f1569040b45a1b41a7396cc",
     "packages": [
         {
             "name": "cogpowered/finediff",
             "time": "2018-08-21T18:01:43+00:00"
         },
         {
-            "name": "doctrine/collections",
-            "version": "v1.5.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/collections.git",
-                "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
-                "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.1"
-            },
-            "require-dev": {
-                "doctrine/coding-standard": "~0.1@dev",
-                "phpunit/phpunit": "^5.7"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Doctrine\\Common\\Collections\\": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com"
-                },
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com"
-                }
-            ],
-            "description": "Collections Abstraction library",
-            "homepage": "http://www.doctrine-project.org",
-            "keywords": [
-                "array",
-                "collections",
-                "iterator"
-            ],
-            "time": "2017-07-22T10:37:32+00:00"
-        },
-        {
-            "name": "doctrine/common",
-            "version": "v2.9.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/common.git",
-                "reference": "a210246d286c77d2b89040f8691ba7b3a713d2c1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/common/zipball/a210246d286c77d2b89040f8691ba7b3a713d2c1",
-                "reference": "a210246d286c77d2b89040f8691ba7b3a713d2c1",
-                "shasum": ""
-            },
-            "require": {
-                "doctrine/annotations": "^1.0",
-                "doctrine/cache": "^1.0",
-                "doctrine/collections": "^1.0",
-                "doctrine/event-manager": "^1.0",
-                "doctrine/inflector": "^1.0",
-                "doctrine/lexer": "^1.0",
-                "doctrine/persistence": "^1.0",
-                "doctrine/reflection": "^1.0",
-                "php": "^7.1"
-            },
-            "require-dev": {
-                "doctrine/coding-standard": "^1.0",
-                "phpunit/phpunit": "^6.3",
-                "squizlabs/php_codesniffer": "^3.0",
-                "symfony/phpunit-bridge": "^4.0.5"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.9.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Doctrine\\Common\\": "lib/Doctrine/Common"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com"
-                },
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com"
-                },
-                {
-                    "name": "Marco Pivetta",
-                    "email": "ocramius@gmail.com"
-                }
-            ],
-            "description": "Common Library for Doctrine projects",
-            "homepage": "https://www.doctrine-project.org",
-            "keywords": [
-                "annotations",
-                "collections",
-                "eventmanager",
-                "persistence",
-                "spl"
-            ],
-            "time": "2018-07-12T21:16:12+00:00"
-        },
-        {
             "name": "doctrine/dbal",
-            "version": "v2.7.2",
+            "version": "v2.8.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "c0e5736016a51b427a8cba8bc470fbea78165819"
+                "reference": "a9019c1e3232eacace373a6ba957a85b66a255c1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/c0e5736016a51b427a8cba8bc470fbea78165819",
-                "reference": "c0e5736016a51b427a8cba8bc470fbea78165819",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/a9019c1e3232eacace373a6ba957a85b66a255c1",
+                "reference": "a9019c1e3232eacace373a6ba957a85b66a255c1",
                 "shasum": ""
             },
             "require": {
-                "doctrine/common": "^2.7.1",
+                "doctrine/cache": "^1.0",
+                "doctrine/event-manager": "^1.0",
                 "ext-pdo": "*",
                 "php": "^7.1"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^4.0",
-                "phpunit/phpunit": "^7.0",
+                "jetbrains/phpstorm-stubs": "^2018.1.2",
+                "phpstan/phpstan": "^0.10.1",
+                "phpunit/phpunit": "^7.1.2",
                 "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
-                "symfony/console": "^2.0.5||^3.0",
+                "symfony/console": "^2.0.5|^3.0|^4.0",
                 "symfony/phpunit-bridge": "^3.4.5|^4.0.5"
             },
             "suggest": {
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.7.x-dev"
+                    "dev-master": "2.8.x-dev",
+                    "dev-develop": "3.0.x-dev"
                 }
             },
             "autoload": {
                 "persistence",
                 "queryobject"
             ],
-            "time": "2018-07-13T04:49:01+00:00"
+            "time": "2018-12-04T06:44:25+00:00"
         },
         {
             "name": "doctrine/event-manager",
             "time": "2018-06-11T11:59:03+00:00"
         },
         {
-            "name": "doctrine/inflector",
-            "version": "v1.3.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/inflector.git",
-                "reference": "5527a48b7313d15261292c149e55e26eae771b0a"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
-                "reference": "5527a48b7313d15261292c149e55e26eae771b0a",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.1"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^6.2"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com"
-                },
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com"
-                }
-            ],
-            "description": "Common String Manipulations with regard to casing and singular/plural rules.",
-            "homepage": "http://www.doctrine-project.org",
-            "keywords": [
-                "inflection",
-                "pluralize",
-                "singularize",
-                "string"
-            ],
-            "time": "2018-01-09T20:05:19+00:00"
-        },
-        {
             "name": "doctrine/instantiator",
             "version": "1.1.0",
             "source": {
             "time": "2014-09-09T13:34:57+00:00"
         },
         {
-            "name": "doctrine/persistence",
-            "version": "v1.0.1",
+            "name": "guzzlehttp/guzzle",
+            "version": "6.3.3",
             "source": {
                 "type": "git",
-                "url": "https://github.com/doctrine/persistence.git",
-                "reference": "af1ec238659a83e320f03e0e454e200f689b4b97"
+                "url": "https://github.com/guzzle/guzzle.git",
+                "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/persistence/zipball/af1ec238659a83e320f03e0e454e200f689b4b97",
-                "reference": "af1ec238659a83e320f03e0e454e200f689b4b97",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+                "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
                 "shasum": ""
             },
             "require": {
-                "doctrine/annotations": "^1.0",
-                "doctrine/cache": "^1.0",
-                "doctrine/collections": "^1.0",
-                "doctrine/event-manager": "^1.0",
-                "doctrine/reflection": "^1.0",
-                "php": "^7.1"
-            },
-            "conflict": {
-                "doctrine/common": "<2.9@dev"
+                "guzzlehttp/promises": "^1.0",
+                "guzzlehttp/psr7": "^1.4",
+                "php": ">=5.5"
             },
             "require-dev": {
-                "doctrine/coding-standard": "^4.0",
-                "phpstan/phpstan": "^0.8",
-                "phpunit/phpunit": "^7.0"
+                "ext-curl": "*",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+                "psr/log": "^1.0"
+            },
+            "suggest": {
+                "psr/log": "Required for using the Log middleware"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Doctrine\\Common\\": "lib/Doctrine/Common"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com"
-                },
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com"
-                },
-                {
-                    "name": "Marco Pivetta",
-                    "email": "ocramius@gmail.com"
-                }
-            ],
-            "description": "Doctrine Persistence abstractions.",
-            "homepage": "https://doctrine-project.org/projects/persistence.html",
-            "keywords": [
-                "persistence"
-            ],
-            "time": "2018-07-12T12:37:50+00:00"
-        },
-        {
-            "name": "doctrine/reflection",
-            "version": "v1.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/reflection.git",
-                "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/reflection/zipball/02538d3f95e88eb397a5f86274deb2c6175c2ab6",
-                "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6",
-                "shasum": ""
-            },
-            "require": {
-                "doctrine/annotations": "^1.0",
-                "ext-tokenizer": "*",
-                "php": "^7.1"
-            },
-            "require-dev": {
-                "doctrine/coding-standard": "^4.0",
-                "doctrine/common": "^2.8",
-                "phpstan/phpstan": "^0.9.2",
-                "phpstan/phpstan-phpunit": "^0.9.4",
-                "phpunit/phpunit": "^7.0",
-                "squizlabs/php_codesniffer": "^3.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Doctrine\\Common\\": "lib/Doctrine/Common"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com"
-                },
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com"
-                },
-                {
-                    "name": "Marco Pivetta",
-                    "email": "ocramius@gmail.com"
-                }
-            ],
-            "description": "Doctrine Reflection component",
-            "homepage": "https://www.doctrine-project.org/projects/reflection.html",
-            "keywords": [
-                "reflection"
-            ],
-            "time": "2018-06-14T14:45:07+00:00"
-        },
-        {
-            "name": "guzzlehttp/guzzle",
-            "version": "6.3.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
-                "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
-                "shasum": ""
-            },
-            "require": {
-                "guzzlehttp/promises": "^1.0",
-                "guzzlehttp/psr7": "^1.4",
-                "php": ">=5.5"
-            },
-            "require-dev": {
-                "ext-curl": "*",
-                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
-                "psr/log": "^1.0"
-            },
-            "suggest": {
-                "psr/log": "Required for using the Log middleware"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "6.3-dev"
+                    "dev-master": "6.3-dev"
                 }
             },
             "autoload": {
             "time": "2018-04-11T15:42:36+00:00"
         },
         {
+            "name": "doctrine/collections",
+            "version": "v1.5.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/collections.git",
+                "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
+                "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "~0.1@dev",
+                "phpunit/phpunit": "^5.7"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Doctrine\\Common\\Collections\\": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                }
+            ],
+            "description": "Collections Abstraction library",
+            "homepage": "http://www.doctrine-project.org",
+            "keywords": [
+                "array",
+                "collections",
+                "iterator"
+            ],
+            "time": "2017-07-22T10:37:32+00:00"
+        },
+        {
+            "name": "doctrine/common",
+            "version": "v2.9.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/common.git",
+                "reference": "a210246d286c77d2b89040f8691ba7b3a713d2c1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/common/zipball/a210246d286c77d2b89040f8691ba7b3a713d2c1",
+                "reference": "a210246d286c77d2b89040f8691ba7b3a713d2c1",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/annotations": "^1.0",
+                "doctrine/cache": "^1.0",
+                "doctrine/collections": "^1.0",
+                "doctrine/event-manager": "^1.0",
+                "doctrine/inflector": "^1.0",
+                "doctrine/lexer": "^1.0",
+                "doctrine/persistence": "^1.0",
+                "doctrine/reflection": "^1.0",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^1.0",
+                "phpunit/phpunit": "^6.3",
+                "squizlabs/php_codesniffer": "^3.0",
+                "symfony/phpunit-bridge": "^4.0.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.9.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Common\\": "lib/Doctrine/Common"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                },
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com"
+                }
+            ],
+            "description": "Common Library for Doctrine projects",
+            "homepage": "https://www.doctrine-project.org",
+            "keywords": [
+                "annotations",
+                "collections",
+                "eventmanager",
+                "persistence",
+                "spl"
+            ],
+            "time": "2018-07-12T21:16:12+00:00"
+        },
+        {
+            "name": "doctrine/inflector",
+            "version": "v1.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/inflector.git",
+                "reference": "5527a48b7313d15261292c149e55e26eae771b0a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
+                "reference": "5527a48b7313d15261292c149e55e26eae771b0a",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                }
+            ],
+            "description": "Common String Manipulations with regard to casing and singular/plural rules.",
+            "homepage": "http://www.doctrine-project.org",
+            "keywords": [
+                "inflection",
+                "pluralize",
+                "singularize",
+                "string"
+            ],
+            "time": "2018-01-09T20:05:19+00:00"
+        },
+        {
+            "name": "doctrine/persistence",
+            "version": "v1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/persistence.git",
+                "reference": "af1ec238659a83e320f03e0e454e200f689b4b97"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/persistence/zipball/af1ec238659a83e320f03e0e454e200f689b4b97",
+                "reference": "af1ec238659a83e320f03e0e454e200f689b4b97",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/annotations": "^1.0",
+                "doctrine/cache": "^1.0",
+                "doctrine/collections": "^1.0",
+                "doctrine/event-manager": "^1.0",
+                "doctrine/reflection": "^1.0",
+                "php": "^7.1"
+            },
+            "conflict": {
+                "doctrine/common": "<2.9@dev"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^4.0",
+                "phpstan/phpstan": "^0.8",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Common\\": "lib/Doctrine/Common"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                },
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com"
+                }
+            ],
+            "description": "Doctrine Persistence abstractions.",
+            "homepage": "https://doctrine-project.org/projects/persistence.html",
+            "keywords": [
+                "persistence"
+            ],
+            "time": "2018-07-12T12:37:50+00:00"
+        },
+        {
+            "name": "doctrine/reflection",
+            "version": "v1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/reflection.git",
+                "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/reflection/zipball/02538d3f95e88eb397a5f86274deb2c6175c2ab6",
+                "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/annotations": "^1.0",
+                "ext-tokenizer": "*",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^4.0",
+                "doctrine/common": "^2.8",
+                "phpstan/phpstan": "^0.9.2",
+                "phpstan/phpstan-phpunit": "^0.9.4",
+                "phpunit/phpunit": "^7.0",
+                "squizlabs/php_codesniffer": "^3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Common\\": "lib/Doctrine/Common"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                },
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com"
+                }
+            ],
+            "description": "Doctrine Reflection component",
+            "homepage": "https://www.doctrine-project.org/projects/reflection.html",
+            "keywords": [
+                "reflection"
+            ],
+            "time": "2018-06-14T14:45:07+00:00"
+        },
+        {
             "name": "facebook/webdriver",
             "version": "1.6.0",
             "source": {
         },
         {
             "name": "typo3/testing-framework",
-            "version": "5.0.4",
+            "version": "5.0.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/TYPO3/testing-framework.git",
-                "reference": "3b69abce0899ba75cdc36a6fc5b9f05c8d7b09e7"
+                "reference": "297cbb8f6ab9adfbdedcd07d0a8f9e5b95ecd9df"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/3b69abce0899ba75cdc36a6fc5b9f05c8d7b09e7",
-                "reference": "3b69abce0899ba75cdc36a6fc5b9f05c8d7b09e7",
+                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/297cbb8f6ab9adfbdedcd07d0a8f9e5b95ecd9df",
+                "reference": "297cbb8f6ab9adfbdedcd07d0a8f9e5b95ecd9df",
                 "shasum": ""
             },
             "require": {
                 "tests",
                 "typo3"
             ],
-            "time": "2019-01-17T14:51:59+00:00"
+            "time": "2019-02-08T14:42:16+00:00"
         }
     ],
     "aliases": [],
index 21050a8..a78c7b0 100644 (file)
@@ -16,7 +16,9 @@ namespace TYPO3\CMS\Core\Database\Schema;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Doctrine\DBAL\Platforms\SqlitePlatform;
 use Doctrine\DBAL\Schema\Table;
+use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -76,7 +78,10 @@ class DefaultTcaSchema
                         'autoincrement' => true,
                     ]
                 );
-                $tables[$tablePosition]->setPrimaryKey(['uid']);
+                // SQLite does not need primary key, only needs autoincrement on integer fields
+                if (!$this->tableRunsOnSqlite($tableName)) {
+                    $tables[$tablePosition]->setPrimaryKey(['uid']);
+                }
             }
 
             // pid column and prepare parent key if pid is not defined
@@ -684,4 +689,16 @@ class DefaultTcaSchema
     {
         return '`' . $identifier . '`';
     }
+
+    /**
+     * SQLite does not need primary key, only needs autoincrement on integer fields
+     * See https://github.com/doctrine/dbal/pull/3141
+     * @param string $tableName
+     * @return bool
+     */
+    protected function tableRunsOnSqlite(string $tableName): bool
+    {
+        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($tableName);
+        return $connection->getDatabasePlatform() instanceof SqlitePlatform;
+    }
 }
index 120ddfe..651a503 100644 (file)
@@ -376,7 +376,7 @@ class ConnectionTest extends UnitTestCase
             ],
             'limit' => [
                 [['*'], 'aTable', [], [], [], 1],
-                'SELECT * FROM "aTable" LIMIT 1 OFFSET 0',
+                'SELECT * FROM "aTable" LIMIT 1',
                 [],
             ],
             'offset' => [
diff --git a/typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaSqliteTest.php b/typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaSqliteTest.php
new file mode 100644 (file)
index 0000000..161f6b6
--- /dev/null
@@ -0,0 +1,830 @@
+<?php
+declare(strict_types = 1);
+
+namespace TYPO3\CMS\Core\Tests\Unit\Database\Schema;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use Doctrine\DBAL\Schema\Column;
+use Doctrine\DBAL\Schema\Index;
+use Doctrine\DBAL\Schema\SchemaException;
+use Doctrine\DBAL\Schema\Table;
+use Doctrine\DBAL\Types\Type;
+use TYPO3\CMS\Core\Database\Schema\DefaultTcaSchema;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ */
+class DefaultTcaSchemaSqliteTest extends UnitTestCase
+{
+    /**
+     * @var DefaultTcaSchema
+     */
+    protected $subject;
+
+    public function setUp()
+    {
+        parent::setUp();
+        $this->subject = $this->getAccessibleMock(DefaultTcaSchema::class, ['tableRunsOnSqlite']);
+        $this->subject->method('tableRunsOnSqlite')->willReturn(true);
+    }
+
+    /**
+     * @test
+     */
+    public function enrichKeepsGivenTablesArrayWithEmptyTca()
+    {
+        $GLOBALS['TCA'] = [];
+        $this->assertEquals([], $this->subject->enrich([]));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddColumnIfExists()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+
+        $table = new Table('aTable');
+        $table->addColumn('uid', 'integer');
+        $table->addColumn('pid', 'integer');
+        $input[] = $table;
+
+        $table = new Table('aTable');
+        $table->addColumn('uid', 'integer');
+        $table->addColumn('pid', 'integer');
+        $expected[] = $table;
+
+        $this->assertEquals($expected, $this->subject->enrich($input));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddColumnIfTableExistsMultipleTimesAndUidExists()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+
+        $table = new Table('aTable');
+        $table->addColumn('foo', 'integer');
+        $input[] = $table;
+        $table = new Table('aTable');
+        $table->addColumn('uid', 'integer');
+        $table->addColumn('pid', 'integer');
+        $input[] = $table;
+
+        $table = new Table('aTable');
+        $table->addColumn('foo', 'integer');
+        $expected[] = $table;
+        $table = new Table('aTable');
+        $table->addColumn('uid', 'integer');
+        $table->addColumn('pid', 'integer');
+        $expected[] = $table;
+
+        $this->assertEquals($expected, $this->subject->enrich($input));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsFieldToFirstTableDefinitionOfThatName()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+
+        $table = new Table('aTable');
+        $table->addColumn('foo', 'integer');
+        $input[] = $table;
+        $table = new Table('aTable');
+        $table->addColumn('bar', 'integer');
+        $input[] = $table;
+
+        $result = $this->subject->enrich($input);
+
+        $this->assertInstanceOf(Column::class, $result[0]->getColumn('uid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsUidAndNoPrimaryKey()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+        $result = $this->subject->enrich([]);
+        $expectedUidColumn = new Column(
+            'uid',
+            Type::getType('integer'),
+            [
+                'notnull' => true,
+                'unsigned' => true,
+                'autoincrement' => true,
+            ]
+        );
+        $this->assertEquals($expectedUidColumn, $result[0]->getColumn('uid'));
+        $this->assertNull($result[0]->getPrimaryKey());
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsPid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+        $result = $this->subject->enrich([]);
+        $expectedPidColumn = new Column(
+            'pid',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedPidColumn, $result[0]->getColumn('pid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsSignedPidWithEnabledWorkspace()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedPidColumn = new Column(
+            'pid',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => false,
+            ]
+        );
+        $this->assertEquals($expectedPidColumn, $result[0]->getColumn('pid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsTstamp()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'tstamp' => 'updatedon',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`updatedon`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('updatedon'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsCrdate()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'crdate' => 'createdon',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`createdon`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('createdon'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsCruserid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'cruser_id' => 'createdby',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`createdby`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('createdby'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsDeleted()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'delete' => 'deleted',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`deleted`',
+            Type::getType('smallint'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('deleted'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsDisabled()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'enablecolumns' => [
+                'disabled' => 'disabled',
+            ]
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`disabled`',
+            Type::getType('smallint'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('disabled'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsStarttime()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'enablecolumns' => [
+                'starttime' => 'starttime',
+            ]
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`starttime`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('starttime'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsEndtime()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'enablecolumns' => [
+                'endtime' => 'endtime',
+            ]
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`endtime`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('endtime'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsFegroup()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'enablecolumns' => [
+                'fe_group' => 'fe_group',
+            ]
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`fe_group`',
+            Type::getType('string'),
+            [
+                'default' => '0',
+                'notnull' => true,
+                'length' => 255,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('fe_group'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsSorting()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'sortby' => 'sorting',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`sorting`',
+            Type::getType('integer'),
+            [
+                'default' => '0',
+                'notnull' => true,
+                'unsigned' => false,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('sorting'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsParentKey()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [];
+        $result = $this->subject->enrich([]);
+        $expectedIndex = new Index('parent', ['pid']);
+        $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsParentKeyWithDelete()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'delete' => 'deleted',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedIndex = new Index('parent', ['pid', 'deleted']);
+        $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsParentKeyWithDisabled()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'enablecolumns' => [
+                'disabled' => 'disabled',
+            ],
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedIndex = new Index('parent', ['pid', 'disabled']);
+        $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsParentKeyInCorrectOrder()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'delete' => 'deleted',
+            'enablecolumns' => [
+                'disabled' => 'disabled',
+            ],
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedIndex = new Index('parent', ['pid', 'deleted', 'disabled']);
+        $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsSysLanguageUid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'languageField' => 'sys_language_uid',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`sys_language_uid`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => false,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('sys_language_uid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsL10nParent()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'languageField' => 'sys_language_uid',
+            'transOrigPointerField' => 'l10n_parent',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`l10n_parent`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('l10n_parent'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddL10nParentIfLanguageFieldIsNotDefined()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'transOrigPointerField' => 'l10n_parent',
+        ];
+        $result = $this->subject->enrich([]);
+        $this->expectException(SchemaException::class);
+        $result[0]->getColumn('l10n_parent');
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsDescription()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'descriptionColumn' => 'rowDescription',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`rowDescription`',
+            Type::getType('text'),
+            [
+                'notnull' => false,
+                'length' => 65535,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('rowDescription'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsEditlock()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'editlock' => 'editlock'
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`editlock`',
+            Type::getType('smallint'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('editlock'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsL10nSource()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'languageField' => 'sys_language_uid',
+            'translationSource' => 'l10n_source',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`l10n_source`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('l10n_source'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddL10nSourceIfLanguageFieldIsNotDefined()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'translationSource' => 'l10n_source',
+        ];
+        $result = $this->subject->enrich([]);
+        $this->expectException(SchemaException::class);
+        $result[0]->getColumn('l10n_source');
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsL10nState()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'languageField' => 'sys_language_uid',
+            'transOrigPointerField' => 'l10n_parent',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`l10n_state`',
+            Type::getType('text'),
+            [
+                'notnull' => false,
+                'length' => 65535,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('l10n_state'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddL10nStateIfLanguageFieldIsNotDefined()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'transOrigPointerField' => 'l10n_parent',
+        ];
+        $result = $this->subject->enrich([]);
+        $this->expectException(SchemaException::class);
+        $result[0]->getColumn('l10n_state');
+    }
+
+    /**
+     * @test
+     */
+    public function enrichDoesNotAddL10nStateIfTransOrigPointerFieldIsNotDefined()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'languageField' => 'sys_language_uid',
+        ];
+        $result = $this->subject->enrich([]);
+        $this->expectException(SchemaException::class);
+        $result[0]->getColumn('l10n_state');
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3origUid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'origUid' => 't3_origuid',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3_origuid`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3_origuid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsL10nDiffsource()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'transOrigDiffSourceField' => 'l18n_diffsource',
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`l18n_diffsource`',
+            Type::getType('blob'),
+            [
+                'length' => 16777215,
+                'notnull' => false,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('l18n_diffsource'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verOid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_oid`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_oid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verId()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_id`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_id'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verWsid()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_wsid`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_wsid'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verState()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_state`',
+            Type::getType('smallint'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => false,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_state'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verStage()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_stage`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => false,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_stage'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verCount()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_count`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_count'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verTstamp()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_tstamp`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_tstamp'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verMoveId()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedColumn = new Column(
+            '`t3ver_move_id`',
+            Type::getType('integer'),
+            [
+                'default' => 0,
+                'notnull' => true,
+                'unsigned' => true,
+            ]
+        );
+        $this->assertEquals($expectedColumn, $result[0]->getColumn('t3ver_move_id'));
+    }
+
+    /**
+     * @test
+     */
+    public function enrichAddsT3verOidIndex()
+    {
+        $GLOBALS['TCA']['aTable']['ctrl'] = [
+            'versioningWS' => true,
+        ];
+        $result = $this->subject->enrich([]);
+        $expectedIndex = new Index('t3ver_oid', ['t3ver_oid', 't3ver_wsid']);
+        $this->assertEquals($expectedIndex, $result[0]->getIndex('t3ver_oid'));
+    }
+}
index 6f30e7b..735c330 100644 (file)
@@ -30,12 +30,24 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 class DefaultTcaSchemaTest extends UnitTestCase
 {
     /**
+     * @var DefaultTcaSchema
+     */
+    protected $subject;
+
+    public function setUp()
+    {
+        parent::setUp();
+        $this->subject = $this->getAccessibleMock(DefaultTcaSchema::class, ['tableRunsOnSqlite']);
+        $this->subject->method('tableRunsOnSqlite')->willReturn(false);
+    }
+
+    /**
      * @test
      */
     public function enrichKeepsGivenTablesArrayWithEmptyTca()
     {
         $GLOBALS['TCA'] = [];
-        $this->assertEquals([], (new DefaultTcaSchema())->enrich([]));
+        $this->assertEquals([], $this->subject->enrich([]));
     }
 
     /**
@@ -55,7 +67,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $table->addColumn('pid', 'integer');
         $expected[] = $table;
 
-        $this->assertEquals($expected, (new DefaultTcaSchema())->enrich($input));
+        $this->assertEquals($expected, $this->subject->enrich($input));
     }
 
     /**
@@ -81,7 +93,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $table->addColumn('pid', 'integer');
         $expected[] = $table;
 
-        $this->assertEquals($expected, (new DefaultTcaSchema())->enrich($input));
+        $this->assertEquals($expected, $this->subject->enrich($input));
     }
 
     /**
@@ -98,7 +110,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $table->addColumn('bar', 'integer');
         $input[] = $table;
 
-        $result = (new DefaultTcaSchema())->enrich($input);
+        $result = $this->subject->enrich($input);
 
         $this->assertInstanceOf(Column::class, $result[0]->getColumn('uid'));
     }
@@ -109,7 +121,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
     public function enrichAddsUidAndPrimaryKey()
     {
         $GLOBALS['TCA']['aTable']['ctrl'] = [];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedUidColumn = new Column(
             'uid',
             Type::getType('integer'),
@@ -130,7 +142,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
     public function enrichAddsPid()
     {
         $GLOBALS['TCA']['aTable']['ctrl'] = [];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedPidColumn = new Column(
             'pid',
             Type::getType('integer'),
@@ -151,7 +163,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedPidColumn = new Column(
             'pid',
             Type::getType('integer'),
@@ -172,7 +184,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'tstamp' => 'updatedon',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`updatedon`',
             Type::getType('integer'),
@@ -193,7 +205,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'crdate' => 'createdon',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`createdon`',
             Type::getType('integer'),
@@ -214,7 +226,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'cruser_id' => 'createdby',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`createdby`',
             Type::getType('integer'),
@@ -235,7 +247,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'delete' => 'deleted',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`deleted`',
             Type::getType('smallint'),
@@ -258,7 +270,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'disabled' => 'disabled',
             ]
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`disabled`',
             Type::getType('smallint'),
@@ -281,7 +293,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'starttime' => 'starttime',
             ]
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`starttime`',
             Type::getType('integer'),
@@ -304,7 +316,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'endtime' => 'endtime',
             ]
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`endtime`',
             Type::getType('integer'),
@@ -327,7 +339,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'fe_group' => 'fe_group',
             ]
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`fe_group`',
             Type::getType('string'),
@@ -348,7 +360,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'sortby' => 'sorting',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`sorting`',
             Type::getType('integer'),
@@ -367,7 +379,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
     public function enrichAddsParentKey()
     {
         $GLOBALS['TCA']['aTable']['ctrl'] = [];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedIndex = new Index('parent', ['pid']);
         $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
     }
@@ -380,7 +392,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'delete' => 'deleted',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedIndex = new Index('parent', ['pid', 'deleted']);
         $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
     }
@@ -395,7 +407,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'disabled' => 'disabled',
             ],
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedIndex = new Index('parent', ['pid', 'disabled']);
         $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
     }
@@ -411,7 +423,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
                 'disabled' => 'disabled',
             ],
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedIndex = new Index('parent', ['pid', 'deleted', 'disabled']);
         $this->assertEquals($expectedIndex, $result[0]->getIndex('parent'));
     }
@@ -424,7 +436,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'languageField' => 'sys_language_uid',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`sys_language_uid`',
             Type::getType('integer'),
@@ -446,7 +458,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
             'languageField' => 'sys_language_uid',
             'transOrigPointerField' => 'l10n_parent',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`l10n_parent`',
             Type::getType('integer'),
@@ -467,7 +479,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'transOrigPointerField' => 'l10n_parent',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $this->expectException(SchemaException::class);
         $result[0]->getColumn('l10n_parent');
     }
@@ -480,7 +492,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'descriptionColumn' => 'rowDescription',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`rowDescription`',
             Type::getType('text'),
@@ -500,7 +512,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'editlock' => 'editlock'
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`editlock`',
             Type::getType('smallint'),
@@ -522,7 +534,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
             'languageField' => 'sys_language_uid',
             'translationSource' => 'l10n_source',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`l10n_source`',
             Type::getType('integer'),
@@ -543,7 +555,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'translationSource' => 'l10n_source',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $this->expectException(SchemaException::class);
         $result[0]->getColumn('l10n_source');
     }
@@ -557,7 +569,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
             'languageField' => 'sys_language_uid',
             'transOrigPointerField' => 'l10n_parent',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`l10n_state`',
             Type::getType('text'),
@@ -577,7 +589,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'transOrigPointerField' => 'l10n_parent',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $this->expectException(SchemaException::class);
         $result[0]->getColumn('l10n_state');
     }
@@ -590,7 +602,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'languageField' => 'sys_language_uid',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $this->expectException(SchemaException::class);
         $result[0]->getColumn('l10n_state');
     }
@@ -603,7 +615,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'origUid' => 't3_origuid',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3_origuid`',
             Type::getType('integer'),
@@ -624,7 +636,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'transOrigDiffSourceField' => 'l18n_diffsource',
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`l18n_diffsource`',
             Type::getType('blob'),
@@ -644,7 +656,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_oid`',
             Type::getType('integer'),
@@ -665,7 +677,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_id`',
             Type::getType('integer'),
@@ -686,7 +698,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_wsid`',
             Type::getType('integer'),
@@ -707,7 +719,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_state`',
             Type::getType('smallint'),
@@ -728,7 +740,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_stage`',
             Type::getType('integer'),
@@ -749,7 +761,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_count`',
             Type::getType('integer'),
@@ -770,7 +782,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_tstamp`',
             Type::getType('integer'),
@@ -791,7 +803,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedColumn = new Column(
             '`t3ver_move_id`',
             Type::getType('integer'),
@@ -812,7 +824,7 @@ class DefaultTcaSchemaTest extends UnitTestCase
         $GLOBALS['TCA']['aTable']['ctrl'] = [
             'versioningWS' => true,
         ];
-        $result = (new DefaultTcaSchema())->enrich([]);
+        $result = $this->subject->enrich([]);
         $expectedIndex = new Index('t3ver_oid', ['t3ver_oid', 't3ver_wsid']);
         $this->assertEquals($expectedIndex, $result[0]->getIndex('t3ver_oid'));
     }
index 0cba2e7..9101255 100644 (file)
@@ -21,7 +21,7 @@
                "ext-xml": "*",
                "cogpowered/finediff": "~0.3.1",
                "doctrine/annotations": "^1.3",
-               "doctrine/dbal": "~2.7.1",
+               "doctrine/dbal": "~2.8.0",
                "doctrine/instantiator": "^1.1",
                "doctrine/lexer": "^1.0",
                "guzzlehttp/guzzle": "^6.3.0",
@@ -52,7 +52,7 @@
                "friendsofphp/php-cs-fixer": "^2.12.2",
                "phpspec/prophecy": "^1.7.5",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "~5.0.4"
+               "typo3/testing-framework": "~5.0.5"
        },
        "suggest": {
                "ext-fileinfo": "Used for proper file type detection in the file abstraction layer",