diff --git a/composer.json b/composer.json index b2ab0f32f8..f18083dba7 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "ext-pdo_sqlite": "*", "doctrine/coding-standard": "^7.0", "doctrine/orm": "^2.6", - "jdorn/sql-formatter": "^1.1", + "doctrine/sql-formatter": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-deprecation-rules": "^0.12", "phpstan/phpstan-phpunit": "^0.12", @@ -35,7 +35,7 @@ "symfony/yaml": "^3.4||^4.0||^5.0" }, "suggest": { - "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", "symfony/yaml": "Allows the use of yaml for migration configuration files." }, "autoload": { diff --git a/composer.lock b/composer.lock index cfa266382b..c8fa9434a3 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "90c29c3fb26c030604ee61762d654ad2", + "content-hash": "1003117ae3477dab1876504f2bfda506", "packages": [ { "name": "doctrine/cache", @@ -90,16 +90,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.10.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8" + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8", + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8", "shasum": "" }, "require": { @@ -111,9 +111,11 @@ "require-dev": { "doctrine/coding-standard": "^6.0", "jetbrains/phpstorm-stubs": "^2019.1", - "phpstan/phpstan": "^0.11.3", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.4.1", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.11" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -178,7 +180,21 @@ "sqlserver", "sqlsrv" ], - "time": "2020-01-04T12:56:21+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-04-20T17:19:26+00:00" }, { "name": "doctrine/event-manager", @@ -474,16 +490,16 @@ }, { "name": "symfony/console", - "version": "v4.4.5", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4fa15ae7be74e53f6ec8c83ed403b97e23b665e9" + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4fa15ae7be74e53f6ec8c83ed403b97e23b665e9", - "reference": "4fa15ae7be74e53f6ec8c83ed403b97e23b665e9", + "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", "shasum": "" }, "require": { @@ -546,20 +562,34 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-02-24T13:10:00+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-30T11:41:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "" }, "require": { @@ -571,7 +601,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -605,20 +635,34 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", - "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", "shasum": "" }, "require": { @@ -627,7 +671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -663,7 +707,21 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/service-contracts", @@ -725,16 +783,16 @@ }, { "name": "symfony/stopwatch", - "version": "v4.4.5", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "abc08d7c48987829bac301347faa10f7e8bbf4fb" + "reference": "e0324d3560e4128270e3f08617480d9233d81cfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/abc08d7c48987829bac301347faa10f7e8bbf4fb", - "reference": "abc08d7c48987829bac301347faa10f7e8bbf4fb", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e0324d3560e4128270e3f08617480d9233d81cfc", + "reference": "e0324d3560e4128270e3f08617480d9233d81cfc", "shasum": "" }, "require": { @@ -771,7 +829,21 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-27T16:54:36+00:00" }, { "name": "zendframework/zend-code", @@ -956,20 +1028,21 @@ }, { "name": "doctrine/annotations", - "version": "v1.8.0", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb", + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb", "shasum": "" }, "require": { "doctrine/lexer": "1.*", + "ext-tokenizer": "*", "php": "^7.1" }, "require-dev": { @@ -979,7 +1052,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -1020,7 +1093,7 @@ "docblock", "parser" ], - "time": "2019-10-01T18:55:10+00:00" + "time": "2020-04-20T09:18:32+00:00" }, { "name": "doctrine/coding-standard", @@ -1590,16 +1663,16 @@ }, { "name": "doctrine/reflection", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/reflection.git", - "reference": "b699ecc7f2784d1e49924fd9858cf1078db6b0e2" + "reference": "55e71912dfcd824b2fdd16f2d9afe15684cfce79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/reflection/zipball/b699ecc7f2784d1e49924fd9858cf1078db6b0e2", - "reference": "b699ecc7f2784d1e49924fd9858cf1078db6b0e2", + "url": "https://api.github.com/repos/doctrine/reflection/zipball/55e71912dfcd824b2fdd16f2d9afe15684cfce79", + "reference": "55e71912dfcd824b2fdd16f2d9afe15684cfce79", "shasum": "" }, "require": { @@ -1664,38 +1737,45 @@ "reflection", "static" ], - "time": "2020-03-21T11:34:59+00:00" + "time": "2020-03-27T11:06:43+00:00" }, { - "name": "jdorn/sql-formatter", - "version": "v1.2.17", + "name": "doctrine/sql-formatter", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/jdorn/sql-formatter.git", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "1ad4f97f10cd0eef7ca7d3f5b7b1cf7e5806786f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/1ad4f97f10cd0eef7ca7d3f5b7b1cf7e5806786f", + "reference": "1ad4f97f10cd0eef7ca7d3f5b7b1cf7e5806786f", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.12.18", + "phpunit/phpunit": "^8.0", + "psalm/plugin-phpunit": "^0.10.0", + "vimeo/psalm": "^3.10" }, + "bin": [ + "bin/sql-formatter" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { - "classmap": [ - "lib" - ] + "psr-4": { + "Doctrine\\SqlFormatter\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1709,12 +1789,12 @@ } ], "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/jdorn/sql-formatter/", + "homepage": "https://github.com/doctrine/sql-formatter/", "keywords": [ "highlight", "sql" ], - "time": "2014-01-12T16:20:24+00:00" + "time": "2020-04-27T09:31:00+00:00" }, { "name": "myclabs/deep-copy", @@ -1868,24 +1948,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -1916,7 +1993,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2082,16 +2159,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.4.3", + "version": "0.4.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "928179efc5368145a8b03cb20d58cb3f3136afae" + "reference": "d8d9d4645379e677466d407034436bb155b11c65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/928179efc5368145a8b03cb20d58cb3f3136afae", - "reference": "928179efc5368145a8b03cb20d58cb3f3136afae", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/d8d9d4645379e677466d407034436bb155b11c65", + "reference": "d8d9d4645379e677466d407034436bb155b11c65", "shasum": "" }, "require": { @@ -2103,7 +2180,7 @@ "jakub-onderka/php-parallel-lint": "^0.9.2", "phing/phing": "^2.16.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.19", "phpstan/phpstan-strict-rules": "^0.12", "phpunit/phpunit": "^6.3", "slevomat/coding-standard": "^4.7.2", @@ -2127,25 +2204,28 @@ "MIT" ], "description": "PHPDoc parser with support for nullable, intersection and generic types", - "time": "2020-01-25T20:42:48+00:00" + "time": "2020-04-13T16:28:46+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.18", + "version": "0.12.19", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286" + "reference": "054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1ce27fe29c8660a27926127d350d53d80c4d4286", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d", + "reference": "054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d", "shasum": "" }, "require": { "php": "^7.1" }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, "bin": [ "phpstan", "phpstan.phar" @@ -2166,7 +2246,21 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-03-22T16:51:47+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2020-04-19T20:35:10+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -2221,21 +2315,21 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.6", + "version": "0.12.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "26394996368b6d033d012547d3197f4e07e23021" + "reference": "7232c17e2493dc598173da784477ce0afb2c4e0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/26394996368b6d033d012547d3197f4e07e23021", - "reference": "26394996368b6d033d012547d3197f4e07e23021", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/7232c17e2493dc598173da784477ce0afb2c4e0e", + "reference": "7232c17e2493dc598173da784477ce0afb2c4e0e", "shasum": "" }, "require": { "php": "~7.1", - "phpstan/phpstan": "^0.12.4" + "phpstan/phpstan": "^0.12.6" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -2273,7 +2367,7 @@ "MIT" ], "description": "PHPUnit extensions and rules for PHPStan", - "time": "2020-01-10T12:07:21+00:00" + "time": "2020-04-17T08:04:10+00:00" }, { "name": "phpstan/phpstan-strict-rules", @@ -2328,16 +2422,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "0.12.4", + "version": "0.12.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "5e4b7ba02f2235271a069deeb88340a210d6c87c" + "reference": "ba69dcd8e57c1a8580bf190e0554bea0fc37fe2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/5e4b7ba02f2235271a069deeb88340a210d6c87c", - "reference": "5e4b7ba02f2235271a069deeb88340a210d6c87c", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/ba69dcd8e57c1a8580bf190e0554bea0fc37fe2f", + "reference": "ba69dcd8e57c1a8580bf190e0554bea0fc37fe2f", "shasum": "" }, "require": { @@ -2394,7 +2488,7 @@ } ], "description": "Symfony Framework extensions and rules for PHPStan", - "time": "2020-01-22T10:19:41+00:00" + "time": "2020-04-15T20:26:41+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2650,16 +2744,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.2", + "version": "8.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8474e22d7d642f665084ba5ec780626cbd1efd23", + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23", "shasum": "" }, "require": { @@ -2729,7 +2823,17 @@ "testing", "xunit" ], - "time": "2020-01-08T08:49:49+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-04-23T04:39:42+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -3348,33 +3452,39 @@ }, { "name": "slevomat/coding-standard", - "version": "6.1.5", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "d767b5e302ff096327466c97fec3cb57f6d16086" + "reference": "b905a82255749de847fd4de607c7a4c8163f058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d767b5e302ff096327466c97fec3cb57f6d16086", - "reference": "d767b5e302ff096327466c97fec3cb57f6d16086", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b905a82255749de847fd4de607c7a4c8163f058d", + "reference": "b905a82255749de847fd4de607c7a4c8163f058d", "shasum": "" }, "require": { "php": "^7.1", - "phpstan/phpdoc-parser": "0.3.5 - 0.4.3", - "squizlabs/php_codesniffer": "^3.5.4" + "phpstan/phpdoc-parser": "0.4.0 - 0.4.4", + "squizlabs/php_codesniffer": "^3.5.5" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "0.6.2", - "grogy/php-parallel-lint": "1.1.0", "phing/phing": "2.16.3", - "phpstan/phpstan": "0.11.19|0.12.9", - "phpstan/phpstan-phpunit": "0.11.2|0.12.6", - "phpstan/phpstan-strict-rules": "0.11.1|0.12.2", - "phpunit/phpunit": "7.5.18|8.5.2" + "php-parallel-lint/php-parallel-lint": "1.2.0", + "phpstan/phpstan": "0.12.19", + "phpstan/phpstan-deprecation-rules": "0.12.2", + "phpstan/phpstan-phpunit": "0.12.8", + "phpstan/phpstan-strict-rules": "0.12.2", + "phpunit/phpunit": "7.5.20|8.5.2|9.1.2" }, "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, "autoload": { "psr-4": { "SlevomatCodingStandard\\": "SlevomatCodingStandard" @@ -3385,20 +3495,30 @@ "MIT" ], "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "time": "2020-02-05T21:17:34+00:00" + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2020-04-28T07:15:08+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.4", + "version": "3.5.5", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dceec07328401de6211037abbb18bda423677e26" + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", - "reference": "dceec07328401de6211037abbb18bda423677e26", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6", + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6", "shasum": "" }, "require": { @@ -3436,20 +3556,20 @@ "phpcs", "standards" ], - "time": "2020-01-30T22:20:29+00:00" + "time": "2020-04-17T01:09:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { @@ -3461,7 +3581,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -3494,20 +3614,34 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/process", - "version": "v4.4.5", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "bf9166bac906c9e69fb7a11d94875e7ced97bcd7" + "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/bf9166bac906c9e69fb7a11d94875e7ced97bcd7", - "reference": "bf9166bac906c9e69fb7a11d94875e7ced97bcd7", + "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", "shasum": "" }, "require": { @@ -3543,20 +3677,34 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-02-07T20:06:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.5", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "94d005c176db2080e98825d98e01e8b311a97a88" + "reference": "ef166890d821518106da3560086bfcbeb4fadfec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/94d005c176db2080e98825d98e01e8b311a97a88", - "reference": "94d005c176db2080e98825d98e01e8b311a97a88", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec", + "reference": "ef166890d821518106da3560086bfcbeb4fadfec", "shasum": "" }, "require": { @@ -3602,7 +3750,21 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-02-03T10:46:43+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-30T11:41:10+00:00" }, { "name": "theseer/tokenizer", @@ -3646,16 +3808,16 @@ }, { "name": "webmozart/assert", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", "shasum": "" }, "require": { @@ -3663,7 +3825,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -3690,7 +3852,7 @@ "check", "validate" ], - "time": "2020-02-14T12:15:55+00:00" + "time": "2020-04-18T12:12:48+00:00" } ], "aliases": [], @@ -3706,5 +3868,6 @@ }, "platform-overrides": { "php": "7.2.2" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/docs/en/reference/generating-migrations.rst b/docs/en/reference/generating-migrations.rst index 0066eab0e6..6ea289a941 100644 --- a/docs/en/reference/generating-migrations.rst +++ b/docs/en/reference/generating-migrations.rst @@ -243,11 +243,11 @@ Formatted SQL ------------- You can optionally pass the ``--formatted`` option if you want the dumped SQL to be formatted. This option uses -the ``jdorn/sql-formatter`` package so you will need to install this package for it to work: +the ``doctrine/sql-formatter`` package so you will need to install this package for it to work: .. code-block:: sh - $ composer require jdorn/sql-formatter + $ composer require doctrine/sql-formatter Ignoring Custom Tables ---------------------- diff --git a/lib/Doctrine/Migrations/Generator/SqlGenerator.php b/lib/Doctrine/Migrations/Generator/SqlGenerator.php index 8c92c126ed..d78ba8b2a7 100644 --- a/lib/Doctrine/Migrations/Generator/SqlGenerator.php +++ b/lib/Doctrine/Migrations/Generator/SqlGenerator.php @@ -7,7 +7,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\Migrations\Configuration\Configuration; use Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration; -use SqlFormatter; +use Doctrine\SqlFormatter\NullHighlighter; +use Doctrine\SqlFormatter\SqlFormatter; use function array_unshift; use function count; use function implode; @@ -56,7 +57,7 @@ public function generate( $maxLength = $lineLength - 18 - 8; // max - php code length - indentation if (strlen($query) > $maxLength) { - $query = SqlFormatter::format($query, false); + $query = (new SqlFormatter(new NullHighlighter()))->format($query); } } diff --git a/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php b/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php index 84ec1a2f95..28f73fcc96 100644 --- a/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php +++ b/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php @@ -8,6 +8,7 @@ use Doctrine\Migrations\Metadata\AvailableMigrationsList; use Doctrine\Migrations\Metadata\ExecutedMigrationsSet; use Doctrine\Migrations\Tools\Console\Exception\InvalidOptionUsage; +use Doctrine\SqlFormatter\SqlFormatter; use OutOfBoundsException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -107,9 +108,9 @@ protected function execute( } if ($formatted) { - if (! class_exists('SqlFormatter')) { + if (! class_exists(SqlFormatter::class)) { throw InvalidOptionUsage::new( - 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require jdorn/sql-formatter".' + 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".' ); } } diff --git a/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php b/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php index 9243dd6879..9faf7ff25e 100644 --- a/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php +++ b/lib/Doctrine/Migrations/Tools/Console/Command/DumpSchemaCommand.php @@ -6,6 +6,7 @@ use Doctrine\Migrations\Tools\Console\Exception\InvalidOptionUsage; use Doctrine\Migrations\Tools\Console\Exception\SchemaDumpRequiresNoMigrations; +use Doctrine\SqlFormatter\SqlFormatter; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -83,9 +84,9 @@ public function execute( $schemaDumper = $this->getDependencyFactory()->getSchemaDumper(); if ($formatted) { - if (! class_exists('SqlFormatter')) { + if (! class_exists(SqlFormatter::class)) { throw InvalidOptionUsage::new( - 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require jdorn/sql-formatter".' + 'The "--formatted" option can only be used if the sql formatter is installed. Please run "composer require doctrine/sql-formatter".' ); } } diff --git a/tests/Doctrine/Migrations/Tests/Generator/SqlGeneratorTest.php b/tests/Doctrine/Migrations/Tests/Generator/SqlGeneratorTest.php index 9f32db7cb7..9f75efacef 100644 --- a/tests/Doctrine/Migrations/Tests/Generator/SqlGeneratorTest.php +++ b/tests/Doctrine/Migrations/Tests/Generator/SqlGeneratorTest.php @@ -8,9 +8,10 @@ use Doctrine\Migrations\Configuration\Configuration; use Doctrine\Migrations\Generator\SqlGenerator; use Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration; +use Doctrine\SqlFormatter\NullHighlighter; +use Doctrine\SqlFormatter\SqlFormatter; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use SqlFormatter; use function sprintf; final class SqlGeneratorTest extends TestCase @@ -109,12 +110,11 @@ private function prepareGeneratedCode(string $expectedCode) : string 'SELECT * FROM migrations_table_name', ]; - $formattedUpdate = SqlFormatter::format($this->sql[2], false); - - $expectedCode = sprintf($expectedCode, $formattedUpdate); - $this->metadataConfig->setTableName('migrations_table_name'); - return $expectedCode; + return sprintf( + $expectedCode, + (new SqlFormatter(new NullHighlighter()))->format($this->sql[2]) + ); } }