diff --git a/composer.json b/composer.json index 40c7ac9..70f3362 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "bower-asset/typeahead.js": "0.10.*" }, "require-dev": { - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "~4.5", "twig/twig": "*", "smarty/smarty": "~3.1", "imagine/imagine": "0.5.*", diff --git a/composer.lock b/composer.lock index ae8bcbf..8cccc8a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c3090fa59c9356e92b35f8b13b0348de", + "hash": "6f81c77925e8946ece8cd3a4d536f88c", "packages": [ { "name": "bower-asset/bootstrap", - "version": "v3.3.1", + "version": "v3.3.4", "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "9a7e365c2c4360335d25246dac11afb1f577210a" + "reference": "a10eb60bc0b07b747fa0c4ebd8821eb7307bd07f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/9a7e365c2c4360335d25246dac11afb1f577210a", - "reference": "9a7e365c2c4360335d25246dac11afb1f577210a", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/a10eb60bc0b07b747fa0c4ebd8821eb7307bd07f", + "reference": "a10eb60bc0b07b747fa0c4ebd8821eb7307bd07f", "shasum": "" }, "require": { @@ -32,7 +32,8 @@ "dist/fonts/glyphicons-halflings-regular.eot", "dist/fonts/glyphicons-halflings-regular.svg", "dist/fonts/glyphicons-halflings-regular.ttf", - "dist/fonts/glyphicons-halflings-regular.woff" + "dist/fonts/glyphicons-halflings-regular.woff", + "dist/fonts/glyphicons-halflings-regular.woff2" ], "bower-asset-ignore": [ "/.*", @@ -59,23 +60,23 @@ }, { "name": "bower-asset/jquery", - "version": "2.1.1", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/jquery/jquery.git", - "reference": "4dec426aa2a6cbabb1b064319ba7c272d594a688" + "reference": "8f2a9d9272d6ed7f32d3a484740ab342c02541e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jquery/jquery/zipball/4dec426aa2a6cbabb1b064319ba7c272d594a688", - "reference": "4dec426aa2a6cbabb1b064319ba7c272d594a688", + "url": "https://api.github.com/repos/jquery/jquery/zipball/8f2a9d9272d6ed7f32d3a484740ab342c02541e0", + "reference": "8f2a9d9272d6ed7f32d3a484740ab342c02541e0", "shasum": "" }, "require-dev": { "bower-asset/qunit": "1.14.0", "bower-asset/requirejs": "2.1.10", "bower-asset/sinon": "1.8.1", - "bower-asset/sizzle": "1.10.19" + "bower-asset/sizzle": "2.1.1-patch2" }, "type": "bower-asset-library", "extra": { @@ -102,16 +103,16 @@ }, { "name": "bower-asset/jquery-ui", - "version": "1.11.2", + "version": "1.11.4", "source": { "type": "git", "url": "https://github.com/components/jqueryui.git", - "reference": "396781474d936959061271505f506b78398fe6a2" + "reference": "c34f8dbf3ba57b3784b93f26119f436c0e8288e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/components/jqueryui/zipball/396781474d936959061271505f506b78398fe6a2", - "reference": "396781474d936959061271505f506b78398fe6a2", + "url": "https://api.github.com/repos/components/jqueryui/zipball/c34f8dbf3ba57b3784b93f26119f436c0e8288e1", + "reference": "c34f8dbf3ba57b3784b93f26119f436c0e8288e1", "shasum": "" }, "require": { @@ -127,16 +128,16 @@ }, { "name": "bower-asset/jquery.inputmask", - "version": "3.1.38", + "version": "3.1.61", "source": { "type": "git", "url": "https://github.com/RobinHerbots/jquery.inputmask.git", - "reference": "464cddbdea65411896468f40321e68abcc75a34c" + "reference": "f2c086411d2557fc485c47afb3cecfa6c1de9ee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/464cddbdea65411896468f40321e68abcc75a34c", - "reference": "464cddbdea65411896468f40321e68abcc75a34c", + "url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/f2c086411d2557fc485c47afb3cecfa6c1de9ee2", + "reference": "f2c086411d2557fc485c47afb3cecfa6c1de9ee2", "shasum": "" }, "require": { @@ -172,7 +173,7 @@ "form", "input", "inputmask", - "jQuery", + "jquery", "mask", "plugins" ] @@ -234,16 +235,16 @@ }, { "name": "bower-asset/yii2-pjax", - "version": "v2.0.1", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/yiisoft/jquery-pjax.git", - "reference": "f07ce95f6098c0bd5421789a20789f39a19be73b" + "reference": "3f20897307cca046fca5323b318475ae9dac0ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/f07ce95f6098c0bd5421789a20789f39a19be73b", - "reference": "f07ce95f6098c0bd5421789a20789f39a19be73b", + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/3f20897307cca046fca5323b318475ae9dac0ca0", + "reference": "3f20897307cca046fca5323b318475ae9dac0ca0", "shasum": "" }, "require": { @@ -254,9 +255,16 @@ "bower-asset-main": "./jquery.pjax.js", "bower-asset-ignore": [ ".travis.yml", + "Gemfile", + "Gemfile.lock", + "vendor/", + "script/", "test/" ] - } + }, + "license": [ + "MIT" + ] }, { "name": "cebe/markdown", @@ -264,12 +272,12 @@ "source": { "type": "git", "url": "https://github.com/cebe/markdown.git", - "reference": "77ba2daada49fc851b397028d26fb2078ec4a3cf" + "reference": "e14d3da8f84eefa3792fd22b5b5ecba9c98d2e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cebe/markdown/zipball/77ba2daada49fc851b397028d26fb2078ec4a3cf", - "reference": "77ba2daada49fc851b397028d26fb2078ec4a3cf", + "url": "https://api.github.com/repos/cebe/markdown/zipball/e14d3da8f84eefa3792fd22b5b5ecba9c98d2e18", + "reference": "e14d3da8f84eefa3792fd22b5b5ecba9c98d2e18", "shasum": "" }, "require": { @@ -279,7 +287,7 @@ "require-dev": { "cebe/indent": "*", "facebook/xhprof": "*@dev", - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "4.1.*" }, "bin": [ "bin/markdown" @@ -287,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -316,7 +324,7 @@ "markdown", "markdown-extra" ], - "time": "2014-11-07 12:53:11" + "time": "2015-03-20 11:07:08" }, { "name": "ezyang/htmlpurifier", @@ -362,53 +370,6 @@ "html" ], "time": "2013-11-30 08:25:19" - }, - { - "name": "yiisoft/yii2-composer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "0ed315f4b450604d5c2fa5fcacaf27fdde73d062" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/0ed315f4b450604d5c2fa5fcacaf27fdde73d062", - "reference": "0ed315f4b450604d5c2fa5fcacaf27fdde73d062", - "shasum": "" - }, - "require": { - "composer-plugin-api": "1.0.0" - }, - "type": "composer-plugin", - "extra": { - "class": "yii\\composer\\Plugin", - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "yii\\composer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com" - } - ], - "description": "The composer plugin for Yii extension installer", - "keywords": [ - "composer", - "extension installer", - "yii2" - ], - "time": "2014-11-07 16:17:16" } ], "packages-dev": [ @@ -446,17 +407,71 @@ "time": "2014-05-23 14:40:08" }, { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "3d9669e597439e8d205baf315efb757038fb4dea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/3d9669e597439e8d205baf315efb757038fb4dea", + "reference": "3d9669e597439e8d205baf315efb757038fb4dea", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-01-16 19:29:51" + }, + { "name": "fzaninotto/faker", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "44eae4deeb065454e68b3c9911181285f01003c6" + "reference": "81f8e9439d0041866849c05d334584ea31c7b05e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44eae4deeb065454e68b3c9911181285f01003c6", - "reference": "44eae4deeb065454e68b3c9911181285f01003c6", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/81f8e9439d0041866849c05d334584ea31c7b05e", + "reference": "81f8e9439d0041866849c05d334584ea31c7b05e", "shasum": "" }, "require": { @@ -466,6 +481,9 @@ "phpunit/phpunit": "~4.0", "squizlabs/php_codesniffer": "~1.5" }, + "suggest": { + "ext-intl": "*" + }, "type": "library", "extra": { "branch-alias": { @@ -492,7 +510,7 @@ "faker", "fixtures" ], - "time": "2014-11-12 17:27:49" + "time": "2015-03-18 16:46:58" }, { "name": "imagine/imagine", @@ -552,47 +570,158 @@ "time": "2014-06-13 10:54:04" }, { + "name": "phpdocumentor/reflection-docblock", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d1da796ba5565789a623052eb9f2cf59d57fec60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d1da796ba5565789a623052eb9f2cf59d57fec60", + "reference": "d1da796ba5565789a623052eb9f2cf59d57fec60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0", + "league/commonmark": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-27 09:28:18" + }, + { + "name": "phpspec/prophecy", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "07606749da971eda75434814a313ed0ce6790f6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/07606749da971eda75434814a313ed0ce6790f6a", + "reference": "07606749da971eda75434814a313ed0ce6790f6a", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-03-20 17:41:29" + }, + { "name": "phpunit/php-code-coverage", - "version": "1.2.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b" + "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4676604b851bfc6fc02bf3394bf350c727bcebf4", + "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3,<1.3.0" + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "~1.0", + "sebastian/version": "~1.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -610,7 +739,7 @@ "testing", "xunit" ], - "time": "2014-09-02 10:13:14" + "time": "2015-03-19 05:49:08" }, { "name": "phpunit/php-file-iterator", @@ -747,45 +876,44 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.2.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", + "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", @@ -793,62 +921,61 @@ "keywords": [ "tokenizer" ], - "time": "2014-03-03 05:10:30" + "time": "2015-01-17 09:51:32" }, { "name": "phpunit/phpunit", - "version": "3.7.x-dev", + "version": "4.5.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6" + "reference": "10f6685ca2cf5d8662b43a225ab853699821690b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/10f6685ca2cf5d8662b43a225ab853699821690b", + "reference": "10f6685ca2cf5d8662b43a225ab853699821690b", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", + "phpspec/prophecy": "~1.3.1", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-file-iterator": "~1.3.2", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", "symfony/yaml": "~2.0" }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" - }, "suggest": { "phpunit/php-invoker": "~1.1" }, "bin": [ - "composer/bin/phpunit" + "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "4.5.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -860,34 +987,35 @@ } ], "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], - "time": "2014-10-17 09:04:17" + "time": "2015-03-02 06:58:30" }, { "name": "phpunit/phpunit-mock-objects", - "version": "1.2.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a" + "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c39c4511c3b007539eb170c32cbc2af49a07351a", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/55484334fb4c306ed24bfc3bdb0874685c29036f", + "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f", "shasum": "" }, "require": { + "doctrine/instantiator": "~1.0,>=1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" + "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "phpunit/phpunit": "4.4.*@dev" }, "suggest": { "ext-soap": "*" @@ -895,18 +1023,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.4.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -923,7 +1048,378 @@ "mock", "xunit" ], - "time": "2014-02-16 12:43:56" + "time": "2015-03-18 09:04:51" + }, + { + "name": "sebastian/comparator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-01-29 16:28:08" + }, + { + "name": "sebastian/diff", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-02-22 15:13:53" + }, + { + "name": "sebastian/environment", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2015-01-01 10:01:08" + }, + { + "name": "sebastian/exporter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "84839970d05254c73cde183a721c7af13aede943" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", + "reference": "84839970d05254c73cde183a721c7af13aede943", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-01-27 07:23:06" + }, + { + "name": "sebastian/global-state", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "007c441df427cf0e175372fcbb9d196bce7eb743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/007c441df427cf0e175372fcbb9d196bce7eb743", + "reference": "007c441df427cf0e175372fcbb9d196bce7eb743", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-01-20 04:09:31" + }, + { + "name": "sebastian/recursion-context", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-01-24 09:48:32" + }, + { + "name": "sebastian/version", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b", + "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2014-12-15 14:25:24" }, { "name": "smarty/smarty", @@ -931,12 +1427,12 @@ "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "de7310b702a2024f60c0af384b6617d0c5f406bb" + "reference": "443ae8c2167add9c7e605f115955816efeb86f1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/de7310b702a2024f60c0af384b6617d0c5f406bb", - "reference": "de7310b702a2024f60c0af384b6617d0c5f406bb", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/443ae8c2167add9c7e605f115955816efeb86f1e", + "reference": "443ae8c2167add9c7e605f115955816efeb86f1e", "shasum": "" }, "require": { @@ -978,20 +1474,20 @@ "keywords": [ "templating" ], - "time": "2014-11-13 18:52:41" + "time": "2015-03-22 23:39:22" }, { "name": "swiftmailer/swiftmailer", - "version": "dev-master", + "version": "5.x-dev", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "d0f361d88e5de851bbb8c542d3b6aa46d61a9ffc" + "reference": "048be6f7c19944d604e321347990543bc2bbe10b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d0f361d88e5de851bbb8c542d3b6aa46d61a9ffc", - "reference": "d0f361d88e5de851bbb8c542d3b6aa46d61a9ffc", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/048be6f7c19944d604e321347990543bc2bbe10b", + "reference": "048be6f7c19944d604e321347990543bc2bbe10b", "shasum": "" }, "require": { @@ -1003,7 +1499,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.4-dev" } }, "autoload": { @@ -1030,7 +1526,7 @@ "mail", "mailer" ], - "time": "2014-10-30 13:41:35" + "time": "2015-03-14 06:07:26" }, { "name": "symfony/yaml", @@ -1039,16 +1535,19 @@ "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "75deb1b183d2bbf12f4b54c644c0caafca338fbe" + "reference": "bc2504716cb3f7704dfff5d5dcb88df43282f414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/75deb1b183d2bbf12f4b54c644c0caafca338fbe", - "reference": "75deb1b183d2bbf12f4b54c644c0caafca338fbe", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/bc2504716cb3f7704dfff5d5dcb88df43282f414", + "reference": "bc2504716cb3f7704dfff5d5dcb88df43282f414", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "type": "library", "extra": { @@ -1077,29 +1576,29 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-11-20 13:24:30" + "time": "2015-03-22 16:57:18" }, { "name": "twig/twig", - "version": "dev-master", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "efed4fa3b10f8ad6f856d817f4e4a6d9ac527915" + "reference": "7ee4aec238949225a25f174318dc84167e5f360d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/efed4fa3b10f8ad6f856d817f4e4a6d9ac527915", - "reference": "efed4fa3b10f8ad6f856d817f4e4a6d9ac527915", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7ee4aec238949225a25f174318dc84167e5f360d", + "reference": "7ee4aec238949225a25f174318dc84167e5f360d", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "1.18-dev" } }, "autoload": { @@ -1134,7 +1633,7 @@ "keywords": [ "templating" ], - "time": "2014-11-20 10:35:14" + "time": "2015-03-17 17:21:28" } ], "aliases": [], @@ -1143,6 +1642,7 @@ "bower-asset/jquery-ui": 0 }, "prefer-stable": false, + "prefer-lowest": false, "platform": { "php": ">=5.4.0", "ext-mbstring": "*", diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 58bb4c4..96dad14 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -14,6 +14,7 @@ Yii Framework 2 Change Log - Bug: Removed column's autoIncrement detection from oci (nineinchnick) - Bug: Fixed creating raw sql (for logging) by skipping object and resource params (nineinchnick) - Bug: Fixed Schema::getLastInsertID() by quoting sequence name (nineinchnick) +- Bug #7867: Fixed findUniqueIndexes not to perform any processing on unique index on function for pgsql (nineinchnick) - Enh #6895: Added `ignoreCategories` config option for message command to ignore categories specified (samdark) - Enh #6975: Pressing arrows while focused in inputs of Active Form with `validateOnType` enabled no longer triggers validation (slinstj) - Enh #7488: Added `StringHelper::explode` to perform explode with trimming and skipping of empty elements (SilverFire, nineinchnick, creocoder, samdark) @@ -25,6 +26,7 @@ Yii Framework 2 Change Log - Enh: Added `yii\helper\Console::wrapText()` method to wrap indented text by console window width and used it in `yii help` command (cebe) - Enh: Implement batchInsert for oci (nineinchnick) - Enh: Detecting IntegrityException for oci (nineinchnick) +- Enh #7867: Implemented findUniqueIndexes for oci and mssql (nineinchnick) - Chg: Updated dependency to `cebe/markdown` to version `1.1.x` (cebe) diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php index 4121b74..3b975f1 100644 --- a/framework/db/mssql/Schema.php +++ b/framework/db/mssql/Schema.php @@ -283,10 +283,12 @@ SQL; } /** - * Collects the primary key column details for the given table. - * @param TableSchema $table the table metadata + * Collects the constraint details for the given table and constraint type. + * @param TableSchema $table + * @param string $type either PRIMARY KEY or UNIQUE + * @return array each entry contains index_name and field_name */ - protected function findPrimaryKeys($table) + protected function findTableConstraints($table, $type) { $keyColumnUsageTableName = 'INFORMATION_SCHEMA.KEY_COLUMN_USAGE'; $tableConstraintsTableName = 'INFORMATION_SCHEMA.TABLE_CONSTRAINTS'; @@ -299,20 +301,38 @@ SQL; $sql = <<primaryKey = $this->db - ->createCommand($sql, [':tableName' => $table->name, ':schemaName' => $table->schemaName]) - ->queryColumn(); + return $this->db + ->createCommand($sql, [ + ':tableName' => $table->name, + ':schemaName' => $table->schemaName, + ':type' => $type, + ]) + ->queryAll(); + } + + /** + * Collects the primary key column details for the given table. + * @param TableSchema $table the table metadata + */ + protected function findPrimaryKeys($table) + { + $result = []; + foreach ($this->findTableConstraints($table, 'PRIMARY KEY') as $row) { + $result[] = $row['field_name']; + } + $table->primaryKey = $result; } /** @@ -376,4 +396,27 @@ SQL; return $this->db->createCommand($sql, [':schema' => $schema])->queryColumn(); } + + /** + * Returns all unique indexes for the given table. + * Each array element is of the following structure: + * + * ~~~ + * [ + * 'IndexName1' => ['col1' [, ...]], + * 'IndexName2' => ['col2' [, ...]], + * ] + * ~~~ + * + * @param TableSchema $table the table metadata + * @return array all unique indexes for the given table. + */ + public function findUniqueIndexes($table) + { + $result = []; + foreach ($this->findTableConstraints($table, 'UNIQUE') as $row) { + $result[$row['index_name']][] = $row['field_name']; + } + return $result; + } } diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php index a095848..ecc77a1 100644 --- a/framework/db/oci/Schema.php +++ b/framework/db/oci/Schema.php @@ -110,10 +110,7 @@ class Schema extends \yii\db\Schema */ protected function findColumns($table) { - $schemaName = $table->schemaName; - $tableName = $table->name; - - $sql = <<db->createCommand($sql)->queryAll(); + $columns = $this->db->createCommand($sql, [ + ':tableName' => $table->name, + ':schemaName' => $table->schemaName, + ])->queryAll(); } catch (\Exception $e) { return false; } @@ -161,19 +161,22 @@ EOD; /** * Sequence name of table * - * @param $tablename + * @param $tableName * @internal param \yii\db\TableSchema $table ->name the table schema * @return string whether the sequence exists */ - protected function getTableSequenceName($tablename) + protected function getTableSequenceName($tableName) { - $seq_name_sql="select ud.referenced_name as sequence_name - from user_dependencies ud - join user_triggers ut on (ut.trigger_name = ud.name) - where ut.table_name='{$tablename}' - and ud.type='TRIGGER' - and ud.referenced_type='SEQUENCE'"; - $sequenceName = $this->db->createCommand($seq_name_sql)->queryScalar(); + + $seq_name_sql = <<db->createCommand($seq_name_sql, [':tableName' => $tableName])->queryScalar(); return $sequenceName === false ? null : $sequenceName; } @@ -249,35 +252,35 @@ EOD; */ protected function findConstraints($table) { - $sql = << 'P' - order by d.constraint_name, c.position -EOD; - $command = $this->db->createCommand($sql); - $constraints = []; + $sql = <<db->createCommand($sql, [ + ':tableName' => $table->name, + ':schemaName' => $table->schemaName, + ]); foreach ($command->queryAll() as $row) { if ($this->db->slavePdo->getAttribute(\PDO::ATTR_CASE) === \PDO::CASE_LOWER) { $row = array_change_key_case($row, CASE_UPPER); } - if ($row['CONSTRAINT_TYPE'] === 'R') { - $name = $row['CONSTRAINT_NAME']; - if (!isset($constraints[$name])) { - $constraints[$name] = [ - 'tableName' => $row["TABLE_REF"], - 'columns' => [], - ]; - } - $constraints[$name]['columns'][$row["COLUMN_NAME"]] = $row["COLUMN_REF"]; + $name = $row['CONSTRAINT_NAME']; + if (!isset($constraints[$name])) { + $constraints[$name] = [ + 'tableName' => $row["TABLE_REF"], + 'columns' => [], + ]; } + $constraints[$name]['columns'][$row["COLUMN_NAME"]] = $row["COLUMN_REF"]; } foreach ($constraints as $constraint) { $table->foreignKeys[] = array_merge([$constraint['tableName']], $constraint['columns']); @@ -290,17 +293,17 @@ EOD; protected function findTableNames($schema = '') { if ($schema === '') { - $sql = <<db->createCommand($sql); } else { - $sql = <<db->createCommand($sql); - $command->bindParam(':schema', $schema); +SQL; + $command = $this->db->createCommand($sql, [':schema' => $schema]); } $rows = $command->queryAll(); @@ -311,11 +314,46 @@ EOD; } $names[] = $row['TABLE_NAME']; } - return $names; } /** + * Returns all unique indexes for the given table. + * Each array element is of the following structure: + * + * ~~~ + * [ + * 'IndexName1' => ['col1' [, ...]], + * 'IndexName2' => ['col2' [, ...]], + * ] + * ~~~ + * + * @param TableSchema $table the table metadata + * @return array all unique indexes for the given table. + */ + public function findUniqueIndexes($table) + { + $query = <<db->createCommand($query, [ + ':tableName' => $table->name, + ':schemaName' => $table->schemaName, + ]); + foreach ($command->queryAll() as $row) { + $result[$row['INDEX_NAME']][] = $row['COLUMN_NAME']; + } + return $result; + } + + /** * Extracts the data types for the given column * @param ColumnSchema $column * @param string $dbType DB type diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php index 1fad215..75557cc 100644 --- a/framework/db/pgsql/Schema.php +++ b/framework/db/pgsql/Schema.php @@ -243,7 +243,7 @@ SQL; /** * Gets information about given table unique indexes. * @param TableSchema $table the table metadata - * @return array with index names, columns and if it is an expression tree + * @return array with index and column names */ protected function getUniqueIndexInformation($table) { @@ -253,21 +253,15 @@ SQL; $sql = <<db->createCommand($sql)->queryAll(); @@ -289,21 +283,11 @@ SQL; */ public function findUniqueIndexes($table) { - $indexes = $this->getUniqueIndexInformation($table); $uniqueIndexes = []; - foreach ($indexes as $index) { - $indexName = $index['indexname']; - - if ($index['indexprs']) { - // Index is an expression like "lower(colname::text)" - $indexColumns = preg_replace("/.*\(([^\:]+).*/mi", "$1", $index['indexcolumns']); - } else { - $indexColumns = array_map('trim', explode(',', str_replace(['{', '}', '"', '\\'], '', $index['indexcolumns']))); - } - - $uniqueIndexes[$indexName] = $indexColumns; - + $rows = $this->getUniqueIndexInformation($table); + foreach ($rows as $row) { + $uniqueIndexes[$row['indexname']][] = $row['columnname']; } return $uniqueIndexes;