diff --git a/.travis.yml b/.travis.yml index bee7476..19b62ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: php dist: trusty php: - - 7 - - 7.1 - 7.2 + - 7.3 + +addons: + sonarcloud: + organization: "urbanindo" + token: + secure: "SoALFI3R7htTg/uwUNZ1f1xqxCBLUgm1XVg9lK0+SUBBZiLkBdLhPT5AvSjaqOP0nh9WSrJHzgKkzsJHikEw+OGXPkKoLVFC18S2TtO6/rh14Wpdqg1n6+wZ2Y5cTmylRgQ+6b91ERMkpJXLXTnwG0slkQIc485FB9Ch/zV6ssElT9rMsC4JgM8hIj3flcCz1QPVsc/LlvAql70irgeB8hbjO4EmCrpHTqVy55hHcKwSWIQaUOXYTFJBuDCXpmQKT1+taT+6PLQmAskFaUU6hhH3GDTvtQiJqIv7FymRYQIDPUHYsCt/Kp64F+BBXBUT71/Q7qeIbQP+6XK7ofI0zfJ4NYmGp8z94ygNzjS6xZdBWOgEBPbGkoV1YB/kopOmlYak+6emkrzIY0ybQhjr4wrFyDdG/apwjmgLhjG2Hnbl1qoEQ4OimHDQdBqHb2Eh1SFfwrYyLM06aNe3/4hawacUgja3n05XE/+Bw52vVW6eGx5elNjC2yUqjSFvch7mhkKxWrt+2mKgA9gHxbN++uaeR/Ty3xBE+cHeKynb/YYFfXukEee/68HsdXR10qkdfQGQVI7i38F6o9+D+twNQXuqt93OPrS/4EZdpIjjTl1qm3xNYRWcUJwMiH1KdZb4mGiRodvrqAqkcYaraT8b0kzzxGiy6kzNQU6zD8QtSvY=" services: - mysql @@ -27,4 +32,5 @@ install: - travis_retry composer install --prefer-dist --no-interaction after_success: + - sonar-scanner - bash <(curl -s https://codecov.io/bash) diff --git a/composer.json b/composer.json index 2397765..5b372c0 100644 --- a/composer.json +++ b/composer.json @@ -10,23 +10,23 @@ ], "minimum-stability": "stable", "require": { - "php": ">=7.0", + "php": "^7.2", "ext-pcntl": "*", - "yiisoft/yii2": ">=2.0.13", + "yiisoft/yii2": ">=2.0.15", "aws/aws-sdk-php": ">=2.4", "symfony/process": ">=2.4", "jeremeamia/SuperClosure": ">=2.0" }, "require-dev": { - "phpunit/phpunit": "4.6.*", - "phpunit/dbunit": "~1.0", - "phpunit/php-code-coverage": "2.2.4", + "phpunit/phpunit": "^6.5", + "phpunit/dbunit": "^3.0", + "phpunit/php-code-coverage": "^5.2", "fzaninotto/faker": "dev-master", "flow/jsonpath": "dev-master", "yiisoft/yii2-coding-standards": "*", "yiisoft/yii2-redis": "*", "videlalvaro/php-amqplib": "2.5.*", - "squizlabs/php_codesniffer": "2.*" + "squizlabs/php_codesniffer": "^3.3" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 2cf24f3..d4f0aa4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fb6707ce2f2ca67399d150d2d0bf67c3", + "content-hash": "17e71ed4e216b6965ae7911deb4a89b8", "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.64.5", + "version": "3.81.7", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c1292388910063803cfd7aa73d48ad4df42a526c" + "reference": "73fdee34e6db72954a6110ff71ea5e9bf6e95e48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c1292388910063803cfd7aa73d48ad4df42a526c", - "reference": "c1292388910063803cfd7aa73d48ad4df42a526c", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/73fdee34e6db72954a6110ff71ea5e9bf6e95e48", + "reference": "73fdee34e6db72954a6110ff71ea5e9bf6e95e48", "shasum": "" }, "require": { @@ -25,7 +25,7 @@ "ext-pcre": "*", "ext-simplexml": "*", "ext-spl": "*", - "guzzlehttp/guzzle": "^5.3.1|^6.2.1", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1", "guzzlehttp/promises": "~1.0", "guzzlehttp/psr7": "^1.4.1", "mtdowling/jmespath.php": "~2.2", @@ -38,6 +38,8 @@ "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", "nette/neon": "^2.3", "phpunit/phpunit": "^4.8.35|^5.4.3", "psr/cache": "^1.0" @@ -46,7 +48,8 @@ "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", "doctrine/cache": "To use the DoctrineCacheAdapter", "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages" + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" }, "type": "library", "extra": { @@ -84,7 +87,7 @@ "s3", "sdk" ], - "time": "2018-08-03T18:10:54+00:00" + "time": "2018-12-17T22:58:13+00:00" }, { "name": "bower-asset/inputmask", @@ -463,32 +466,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -518,13 +522,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jeremeamia/SuperClosure", @@ -641,16 +646,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.0.3", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" + "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", + "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", "shasum": "" }, "require": { @@ -666,7 +671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -688,7 +693,7 @@ "parser", "php" ], - "time": "2018-07-15T17:25:16+00:00" + "time": "2018-10-10T09:24:14+00:00" }, { "name": "psr/http-message", @@ -740,18 +745,58 @@ ], "time": "2016-08-06T14:39:51+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, { "name": "symfony/polyfill-php56", - "version": "v1.8.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "af98553c84912459db3f636329567809d639a8f6" + "reference": "ff208829fe1aa48ab9af356992bb7199fed551af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/af98553c84912459db3f636329567809d639a8f6", - "reference": "af98553c84912459db3f636329567809d639a8f6", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ff208829fe1aa48ab9af356992bb7199fed551af", + "reference": "ff208829fe1aa48ab9af356992bb7199fed551af", "shasum": "" }, "require": { @@ -761,7 +806,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -794,20 +839,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-09-21T06:26:08+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.8.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "1a5ad95d9436cbff3296034fe9f8d586dce3fb3a" + "reference": "3b58903eae668d348a7126f999b0da0f2f93611c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/1a5ad95d9436cbff3296034fe9f8d586dce3fb3a", - "reference": "1a5ad95d9436cbff3296034fe9f8d586dce3fb3a", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/3b58903eae668d348a7126f999b0da0f2f93611c", + "reference": "3b58903eae668d348a7126f999b0da0f2f93611c", "shasum": "" }, "require": { @@ -816,7 +861,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -846,29 +891,29 @@ "polyfill", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-09-30T16:36:12+00:00" }, { "name": "symfony/process", - "version": "v3.4.14", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f" + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0414db29bd770ec5a4152683e655f55efd4fa60f", - "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f", + "url": "https://api.github.com/repos/symfony/process/zipball/2b341009ccec76837a7f46f59641b431e4d4c2b0", + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -895,7 +940,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-11-20T16:22:05+00:00" }, { "name": "yiisoft/yii2", @@ -1055,32 +1100,32 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1105,7 +1150,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "flow/jsonpath", @@ -1113,12 +1158,12 @@ "source": { "type": "git", "url": "https://github.com/FlowCommunications/JSONPath.git", - "reference": "2909fcad962cd933dfe392febda53eee54e81235" + "reference": "099214730f4d279a00697442c93b4a89215191c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/2909fcad962cd933dfe392febda53eee54e81235", - "reference": "2909fcad962cd933dfe392febda53eee54e81235", + "url": "https://api.github.com/repos/FlowCommunications/JSONPath/zipball/099214730f4d279a00697442c93b4a89215191c9", + "reference": "099214730f4d279a00697442c93b4a89215191c9", "shasum": "" }, "require": { @@ -1146,7 +1191,7 @@ } ], "description": "JSONPath implementation for parsing, searching and flattening arrays", - "time": "2018-03-04T16:41:37+00:00" + "time": "2018-11-07T14:21:34+00:00" }, { "name": "fzaninotto/faker", @@ -1154,12 +1199,12 @@ "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "9c9e33857cf41bb9cbc8c1830e4d817fbacb03a2" + "reference": "06ac73da6517f58afe998ed46f93825d7a277d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/9c9e33857cf41bb9cbc8c1830e4d817fbacb03a2", - "reference": "9c9e33857cf41bb9cbc8c1830e4d817fbacb03a2", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/06ac73da6517f58afe998ed46f93825d7a277d8d", + "reference": "06ac73da6517f58afe998ed46f93825d7a277d8d", "shasum": "" }, "require": { @@ -1196,7 +1241,157 @@ "faker", "fixtures" ], - "time": "2018-07-13T06:28:23+00:00" + "time": "2018-11-22T13:56:51+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "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": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1352,16 +1547,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -1373,12 +1568,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -1411,102 +1606,97 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/dbunit", - "version": "1.4.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/dbunit.git", - "reference": "9aaee6447663ff1b0cd50c23637e04af74c5e2ae" + "reference": "0fa4329e490480ab957fe7b1185ea0996ca11f44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/9aaee6447663ff1b0cd50c23637e04af74c5e2ae", - "reference": "9aaee6447663ff1b0cd50c23637e04af74c5e2ae", + "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/0fa4329e490480ab957fe7b1185ea0996ca11f44", + "reference": "0fa4329e490480ab957fe7b1185ea0996ca11f44", "shasum": "" }, "require": { "ext-pdo": "*", "ext-simplexml": "*", - "php": ">=5.3.3", - "phpunit/phpunit": "~4|~5", - "symfony/yaml": "~2.1|~3.0" + "php": "^7.0", + "phpunit/phpunit": "^6.0", + "symfony/yaml": "^3.0 || ^4.0" }, - "bin": [ - "composer/bin/dbunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", + "description": "PHPUnit extension for database interaction testing", "homepage": "https://github.com/sebastianbergmann/dbunit/", "keywords": [ "database", "testing", "xunit" ], - "time": "2015-08-07T04:57:38+00:00" + "abandoned": true, + "time": "2018-01-23T13:32:26+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "5.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "c89677919c5dd6d3b3852f230a663118762218ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -1521,7 +1711,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1532,7 +1722,7 @@ "testing", "xunit" ], - "time": "2015-10-06T15:47:00+00:00" + "time": "2018-04-06T15:36:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1673,29 +1863,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.12", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1718,45 +1908,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-12-04T08:55:13+00:00" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "4.6.10", + "version": "6.5.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7b5fe98b28302a8b25693b2298bca74463336975" + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b5fe98b28302a8b25693b2298bca74463336975", - "reference": "7b5fe98b28302a8b25693b2298bca74463336975", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.9", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -1764,7 +1966,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.6.x-dev" + "dev-master": "6.5.x-dev" } }, "autoload": { @@ -1790,30 +1992,33 @@ "testing", "xunit" ], - "time": "2015-06-03T05:03:30+00:00" + "time": "2018-09-08T15:10:43+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "5.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "conflict": { + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.5.11" }, "suggest": { "ext-soap": "*" @@ -1821,7 +2026,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -1836,7 +2041,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1846,34 +2051,79 @@ "mock", "xunit" ], - "time": "2015-10-02T06:51:40+00:00" + "time": "2018-08-09T05:50:03+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1904,38 +2154,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1962,32 +2212,32 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -2012,34 +2262,34 @@ "environment", "hhvm" ], - "time": "2016-08-18T05:49:44+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -2079,27 +2329,27 @@ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -2107,7 +2357,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2130,32 +2380,124 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.5", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2183,23 +2525,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2218,68 +2610,41 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", + "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2296,29 +2661,32 @@ "phpcs", "standards" ], - "time": "2017-05-22T02:43:20+00:00" + "time": "2018-09-23T23:08:17+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-ctype": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2351,24 +2719,24 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.14", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2" + "reference": "c41175c801e3edfda90f32e292619d10c27103d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", - "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c41175c801e3edfda90f32e292619d10c27103d7", + "reference": "c41175c801e3edfda90f32e292619d10c27103d7", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -2383,7 +2751,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -2410,7 +2778,47 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "videlalvaro/php-amqplib", @@ -2519,21 +2927,21 @@ }, { "name": "yiisoft/yii2-coding-standards", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-coding-standards.git", - "reference": "1047aaefcce4cfb83e4987110a573d19706bc50d" + "reference": "b76c3f58b54c37624f4b17582971e71981b71122" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-coding-standards/zipball/1047aaefcce4cfb83e4987110a573d19706bc50d", - "reference": "1047aaefcce4cfb83e4987110a573d19706bc50d", + "url": "https://api.github.com/repos/yiisoft/yii2-coding-standards/zipball/b76c3f58b54c37624f4b17582971e71981b71122", + "reference": "b76c3f58b54c37624f4b17582971e71981b71122", "shasum": "" }, "require": { "php": ">=5.4.0", - "squizlabs/php_codesniffer": ">=2.3.1 <3.0" + "squizlabs/php_codesniffer": ">=3.2" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -2583,20 +2991,20 @@ "framework", "yii" ], - "time": "2017-05-12T10:30:45+00:00" + "time": "2018-09-04T23:10:55+00:00" }, { "name": "yiisoft/yii2-redis", - "version": "2.0.8", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-redis.git", - "reference": "ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314" + "reference": "29c3ae9f1e1f61d9ab326f92fcacb03218c218dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-redis/zipball/ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314", - "reference": "ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314", + "url": "https://api.github.com/repos/yiisoft/yii2-redis/zipball/29c3ae9f1e1f61d9ab326f92fcacb03218c218dc", + "reference": "29c3ae9f1e1f61d9ab326f92fcacb03218c218dc", "shasum": "" }, "require": { @@ -2634,7 +3042,7 @@ "session", "yii2" ], - "time": "2018-03-20T11:01:04+00:00" + "time": "2018-09-23T22:34:46+00:00" } ], "aliases": [], @@ -2646,7 +3054,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.0", + "php": "^7.2", "ext-pcntl": "*" }, "platform-dev": [] diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..ee90ad3 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=urbanindo_yii2-queue +sonar.sources=./src \ No newline at end of file diff --git a/tests/Behaviors/ActiveRecordDeferredEventBehaviorTest.php b/tests/Behaviors/ActiveRecordDeferredEventBehaviorTest.php index 7c4876d..b88cc4f 100644 --- a/tests/Behaviors/ActiveRecordDeferredEventBehaviorTest.php +++ b/tests/Behaviors/ActiveRecordDeferredEventBehaviorTest.php @@ -1,8 +1,16 @@ getDb()->createCommand()->createTable('test_active_record_deferred_event_behaviors', [ 'id' => 'pk', 'name' => 'string', @@ -10,7 +18,8 @@ protected function setUp() { Yii::$app->queue->purge(); } - public function testEventHandler() { + public function testEventHandler() + { $queue = Yii::$app->queue; /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ $this->assertEquals(0, $queue->getSize()); @@ -52,16 +61,19 @@ public function testEventHandler() { } -class TestActiveRecord extends \yii\db\ActiveRecord { +class TestActiveRecord extends \yii\db\ActiveRecord +{ - public static function tableName() { + public static function tableName() + { return 'test_active_record_deferred_event_behaviors'; } - public function behaviors() { + public function behaviors() + { return [ [ - 'class' => UrbanIndo\Yii2\Queue\Behaviors\ActiveRecordDeferredEventBehavior::class, + 'class' => ActiveRecordDeferredEventBehavior::class, 'events' => [ self::EVENT_AFTER_INSERT => 'deferAfterInsert', self::EVENT_AFTER_UPDATE => 'deferAfterUpdate', @@ -71,19 +83,22 @@ public function behaviors() { ]; } - public function scenarios() { + public function scenarios() + { return [ 'default' => ['name', 'id'], 'test' => ['name', 'id'], ]; } - public function deferAfterInsert() { + public function deferAfterInsert() + { $this->name = $this->scenario == 'test' ? 'test' : 'done'; $this->updateAttributes(['name']); } - public function deferAfterUpdate() { + public function deferAfterUpdate() + { $this->name = 'updated'; $this->updateAttributes(['name']); } diff --git a/tests/Behaviors/ActiveRecordDeferredEventHandlerTest.php b/tests/Behaviors/ActiveRecordDeferredEventHandlerTest.php index b27cade..0fd79be 100644 --- a/tests/Behaviors/ActiveRecordDeferredEventHandlerTest.php +++ b/tests/Behaviors/ActiveRecordDeferredEventHandlerTest.php @@ -1,8 +1,15 @@ getDb()->createCommand()->createTable('deferred_active_record_event_handler_test', [ 'id' => 'pk', 'name' => 'string', diff --git a/tests/Behaviors/ActiveRecordDeferredEventRoutingBehaviorTest.php b/tests/Behaviors/ActiveRecordDeferredEventRoutingBehaviorTest.php index e5b8b4a..8021edb 100644 --- a/tests/Behaviors/ActiveRecordDeferredEventRoutingBehaviorTest.php +++ b/tests/Behaviors/ActiveRecordDeferredEventRoutingBehaviorTest.php @@ -1,6 +1,12 @@ getDb()->createCommand()->createTable('test_active_record_deferred_event_routing', [ diff --git a/tests/Behaviors/DeferredEventBehaviorTest.php b/tests/Behaviors/DeferredEventBehaviorTest.php index e229262..64aac76 100644 --- a/tests/Behaviors/DeferredEventBehaviorTest.php +++ b/tests/Behaviors/DeferredEventBehaviorTest.php @@ -1,7 +1,12 @@ getDb()->createCommand()->createTable('test_deferred_event_behaviors', [ diff --git a/tests/Behaviors/DeferredEventHandlerTest.php b/tests/Behaviors/DeferredEventHandlerTest.php index ddf6f6d..1cf80eb 100644 --- a/tests/Behaviors/DeferredEventHandlerTest.php +++ b/tests/Behaviors/DeferredEventHandlerTest.php @@ -1,8 +1,15 @@ getDb()->createCommand()->createTable('deferred_event_handler_test', [ 'id' => 'pk', 'name' => 'string', @@ -10,7 +17,8 @@ public static function setUpBeforeClass() { Yii::$app->queue->purge(); } - public function testEventHandlerInSimpleComponent() { + public function testEventHandlerInSimpleComponent() + { $queue = Yii::$app->queue; /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ $this->assertEquals(0, $queue->getSize()); @@ -31,7 +39,8 @@ public function testEventHandlerInSimpleComponent() { $this->assertEquals('done', $model->name); } - public function testEventHandlerInSimpleModel() { + public function testEventHandlerInSimpleModel() + { $queue = Yii::$app->queue; /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ $this->assertEquals(0, $queue->getSize()); @@ -53,20 +62,24 @@ public function testEventHandlerInSimpleModel() { } } -class DeferredEventHandlerImpl extends \UrbanIndo\Yii2\Queue\Behaviors\DeferredEventHandler { - public function handleEvent($owner) { +class DeferredEventHandlerImpl extends \UrbanIndo\Yii2\Queue\Behaviors\DeferredEventHandler +{ + public function handleEvent($owner) + { $owner->updateModel(); return true; } } -class DeferredEventHandlerTestComponent extends \yii\base\Component { +class DeferredEventHandlerTestComponent extends \yii\base\Component +{ const EVENT_TEST = 'eventTest'; public $recordId; - public function behaviors() { + public function behaviors() + { return [ [ 'class' => DeferredEventHandlerImpl::class, @@ -75,15 +88,17 @@ public function behaviors() { ]; } - public function triggerEvent() { + public function triggerEvent() + { $model = new DeferredEventHandlerTestActiveRecord(); $model->id = $this->recordId; - $model->name = "test"; + $model->name = 'test'; $model->save(false); $this->trigger(self::EVENT_TEST); } - public function updateModel() { + public function updateModel() + { $model = DeferredEventHandlerTestActiveRecord::findOne($this->recordId); $model->name = 'done'; $model->save(false); @@ -91,13 +106,15 @@ public function updateModel() { } -class DeferredEventHandlerTestModel extends \yii\base\Model { +class DeferredEventHandlerTestModel extends \yii\base\Model +{ const EVENT_TEST = 'eventTest'; public $recordId; - public function behaviors() { + public function behaviors() + { return [ [ 'class' => DeferredEventHandlerImpl::class, @@ -106,15 +123,17 @@ public function behaviors() { ]; } - public function triggerEvent() { + public function triggerEvent() + { $model = new DeferredEventHandlerTestActiveRecord(); $model->id = $this->recordId; - $model->name = "test"; + $model->name = 'test'; $model->save(false); $this->trigger(self::EVENT_TEST); } - public function updateModel() { + public function updateModel() + { $model = DeferredEventHandlerTestActiveRecord::findOne($this->recordId); $model->name = 'done'; $model->save(false); @@ -122,9 +141,11 @@ public function updateModel() { } -class DeferredEventHandlerTestActiveRecord extends \yii\db\ActiveRecord { +class DeferredEventHandlerTestActiveRecord extends \yii\db\ActiveRecord +{ - public static function tableName() { + public static function tableName() + { return 'deferred_event_handler_test'; } } \ No newline at end of file diff --git a/tests/Behaviors/DeferredEventRoutingBehaviorTest.php b/tests/Behaviors/DeferredEventRoutingBehaviorTest.php index 4b8bd61..119c410 100644 --- a/tests/Behaviors/DeferredEventRoutingBehaviorTest.php +++ b/tests/Behaviors/DeferredEventRoutingBehaviorTest.php @@ -1,8 +1,15 @@ queue; /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ diff --git a/tests/EventTest.php b/tests/EventTest.php index 5ae0f64..d05dcd4 100644 --- a/tests/EventTest.php +++ b/tests/EventTest.php @@ -1,44 +1,53 @@ counter += 1; } ); - \yii\base\Event::on( - \UrbanIndo\Yii2\Queue\Queue::className(), - \UrbanIndo\Yii2\Queue\Queue::EVENT_AFTER_FETCH, + Event::on( + Queue::class, + Queue::EVENT_AFTER_FETCH, function ($event) { $this->counter += 2; } ); - \yii\base\Event::on( - \UrbanIndo\Yii2\Queue\Queue::className(), - \UrbanIndo\Yii2\Queue\Queue::EVENT_AFTER_DELETE, + Event::on( + Queue::class, + Queue::EVENT_AFTER_DELETE, function ($event) { $this->counter += 3; } ); $queue = Yii::createObject([ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ]); $this->assertEquals($this->counter, 0); - /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ - $queue->post(new UrbanIndo\Yii2\Queue\Job([ + /* @var $queue Queues\MemoryQueue */ + $queue->post(new Job([ 'route' => function() { //Do something } diff --git a/tests/ProcessRunnerTest.php b/tests/ProcessRunnerTest.php index 2e00447..4ba906b 100644 --- a/tests/ProcessRunnerTest.php +++ b/tests/ProcessRunnerTest.php @@ -1,7 +1,10 @@ setExpectedException(\yii\base\Exception::class); + public function testQueueCatchingException() + { + $this->expectException(\yii\base\Exception::class); $queue = Yii::createObject([ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ]); /* @var $queue \UrbanIndo\Yii2\Queue\Queues\MemoryQueue */ - $queue->post(new UrbanIndo\Yii2\Queue\Job([ + $queue->post(new Job([ 'route' => function() { throw new \Exception('Test'); } diff --git a/tests/Queues/DbQueueTest.php b/tests/Queues/DbQueueTest.php index 91e5025..775fbd5 100644 --- a/tests/Queues/DbQueueTest.php +++ b/tests/Queues/DbQueueTest.php @@ -1,6 +1,12 @@ firstNameMale; $this->mockApplication([ 'components' => [ @@ -75,7 +81,7 @@ public function testPost() $this->assertEquals(0, $this->countTable()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); @@ -83,7 +89,7 @@ public function testPost() $this->assertEquals(1, $this->countTable(['status' => DbQueue::STATUS_READY])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); @@ -106,7 +112,7 @@ public function testFetch() $this->assertEquals(0, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { $this->counter += 1; }])); @@ -114,7 +120,7 @@ public function testFetch() $this->assertEquals(1, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); } public function testRun() @@ -131,7 +137,7 @@ public function testRun() $this->assertEquals(0, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); @@ -139,13 +145,13 @@ public function testRun() $this->assertEquals(1, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $queue->run($job); $this->assertEquals(1, DbQueueTest::$counter); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 2; }])); @@ -164,11 +170,11 @@ public function testHardDelete() $this->assertEquals(0, $this->countTable()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); @@ -193,11 +199,11 @@ public function testSoftDelete() $this->assertEquals(0, $this->countTable()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); @@ -233,12 +239,12 @@ public function testRelease() $this->assertEquals(0, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { DbQueueTest::$counter += 1; }])); $job = $queue->fetch(); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $this->assertEquals(1, $this->countTable(['status' => DbQueue::STATUS_ACTIVE])); diff --git a/tests/Queues/MemoryQueueTest.php b/tests/Queues/MemoryQueueTest.php index 0c23142..d34cf24 100644 --- a/tests/Queues/MemoryQueueTest.php +++ b/tests/Queues/MemoryQueueTest.php @@ -1,6 +1,11 @@ assertEquals(0, $queue->getSize()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); $this->assertEquals(1, $queue->getSize()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); @@ -58,7 +63,7 @@ public function testFetch() $this->assertFalse($job); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { $this->counter += 1; }])); @@ -68,7 +73,7 @@ public function testFetch() $this->assertEquals(0, $queue->getSize()); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); } public function testRun() @@ -81,19 +86,19 @@ public function testRun() $this->assertFalse($job); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); $job = $queue->fetch(); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $queue->run($job); $this->assertEquals(1, self::$counter); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 2; }])); @@ -110,11 +115,11 @@ public function testDelete() $this->assertEquals(0, $queue->getSize()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); @@ -140,7 +145,7 @@ public function testRelease() $this->assertFalse($job); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { self::$counter += 1; }])); @@ -148,7 +153,7 @@ public function testRelease() $this->assertEquals(0, $queue->getSize()); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $queue->release($job); diff --git a/tests/Queues/MultipleQueueTest.php b/tests/Queues/MultipleQueueTest.php index 7f89444..8b9d402 100644 --- a/tests/Queues/MultipleQueueTest.php +++ b/tests/Queues/MultipleQueueTest.php @@ -1,47 +1,59 @@ '\UrbanIndo\Yii2\Queue\Queues\MultipleQueue', + 'class' => MultipleQueue::class, 'queues' => [ [ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ], [ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ], [ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ], [ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\MemoryQueue' + 'class' => MemoryQueue::class, ] ], 'strategy' => [ - 'class' => 'UrbanIndo\Yii2\Queue\Strategies\RandomStrategy', + 'class' => RandomStrategy::class, ] ]); - $this->assertTrue($queue instanceof UrbanIndo\Yii2\Queue\Queues\MultipleQueue); - /* @var $queue UrbanIndo\Yii2\Queue\MultipleQueue */ + $this->assertTrue($queue instanceof MultipleQueue); + /* @var $queue MultipleQueue */ $this->assertCount(4, $queue->queues); foreach($queue->queues as $tqueue) { - $this->assertTrue($tqueue instanceof \UrbanIndo\Yii2\Queue\Queues\MemoryQueue); + $this->assertTrue($tqueue instanceof MemoryQueue); } - $this->assertTrue($queue->strategy instanceof \UrbanIndo\Yii2\Queue\Strategies\Strategy); - $this->assertTrue($queue->strategy instanceof \UrbanIndo\Yii2\Queue\Strategies\RandomStrategy); + $this->assertTrue($queue->strategy instanceof Strategy); + $this->assertTrue($queue->strategy instanceof RandomStrategy); $queue0 = $queue->getQueue(0); - $this->assertTrue($queue0 instanceof \UrbanIndo\Yii2\Queue\Queues\MemoryQueue); + $this->assertTrue($queue0 instanceof MemoryQueue); $queue4 = $queue->getQueue(4); $this->assertNull($queue4); $njob = $queue->strategy->fetch(); $this->assertFalse($njob); $i = 0; - $queue->post(new \UrbanIndo\Yii2\Queue\Job([ + $queue->post(new Job([ 'route' => function() use (&$i) { $i += 1; } @@ -50,14 +62,14 @@ public function test() { //this some times will exist $fjob1 = $queue->fetch(); } while ($fjob1 == false); - $this->assertTrue($fjob1 instanceof \UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($fjob1 instanceof Job); /* @var $fjob1 Job */ - $index = $fjob1->header[\UrbanIndo\Yii2\Queue\Queues\MultipleQueue::HEADER_MULTIPLE_QUEUE_INDEX]; + $index = $fjob1->header[MultipleQueue::HEADER_MULTIPLE_QUEUE_INDEX]; $this->assertContains($index, range(0, 3)); $fjob1->runCallable(); $this->assertEquals(1, $i); - $job = new \UrbanIndo\Yii2\Queue\Job([ + $job = new Job([ 'route' => function() use (&$i) { $i += 1; } @@ -68,8 +80,8 @@ public function test() { //this some times will exist $fjob2 = $queue->fetch(); } while ($fjob2 == false); - $this->assertTrue($fjob2 instanceof \UrbanIndo\Yii2\Queue\Job); - $index2 = $fjob2->header[\UrbanIndo\Yii2\Queue\Queues\MultipleQueue::HEADER_MULTIPLE_QUEUE_INDEX]; + $this->assertTrue($fjob2 instanceof Job); + $index2 = $fjob2->header[MultipleQueue::HEADER_MULTIPLE_QUEUE_INDEX]; $this->assertEquals(3, $index2); $fjob2->runCallable(); $this->assertEquals(2, $i); diff --git a/tests/Queues/RedisQueueTest.php b/tests/Queues/RedisQueueTest.php index 13330bd..1c0310a 100644 --- a/tests/Queues/RedisQueueTest.php +++ b/tests/Queues/RedisQueueTest.php @@ -1,5 +1,14 @@ firstNameMale; $this->mockApplication([ 'components' => [ 'redis' => [ - 'class' => '\yii\redis\Connection', + 'class' => Connection::class, 'hostname' => 'localhost', 'port' => 6379, ], 'queue' => [ - 'class' => '\UrbanIndo\Yii2\Queue\Queues\RedisQueue', + 'class' => RedisQueue::class, 'key' => $queueName, ] ] @@ -46,12 +55,12 @@ public function testPost() $queue = $this->getQueue(); $this->assertEquals(0, $this->getCountItems()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $this->assertEquals(1, $this->getCountItems()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $this->assertEquals(2, $this->getCountItems()); @@ -66,18 +75,18 @@ public function testFetch() $job = $queue->fetch(); $this->assertFalse($job); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $this->assertEquals(1, $this->getCountItems()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $this->assertEquals(2, $this->getCountItems()); $job = $queue->fetch(); - $this->assertTrue($job instanceof \UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $this->assertEquals(1, $this->getCountItems()); } @@ -90,19 +99,19 @@ public function testRun() $this->assertFalse($job); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $job = $queue->fetch(); - $this->assertTrue($job instanceof UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $queue->run($job); $this->assertEquals(1, RedisQueueTest::$counter); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 2; }])); @@ -119,14 +128,14 @@ public function testRelease() $key = $queue->key; $this->assertEquals(0, $this->getCountItems()); - $queue->post(new UrbanIndo\Yii2\Queue\Job(['route' => function () { + $queue->post(new Job(['route' => function () { RedisQueueTest::$counter += 1; }])); $this->assertEquals(1, $this->getCountItems()); $job = $queue->fetch(); - $this->assertTrue($job instanceof \UrbanIndo\Yii2\Queue\Job); + $this->assertTrue($job instanceof Job); $this->assertEquals(0, $this->getCountItems()); diff --git a/tests/Queues/SqsQueueTest.php b/tests/Queues/SqsQueueTest.php index 83ff268..8b22698 100644 --- a/tests/Queues/SqsQueueTest.php +++ b/tests/Queues/SqsQueueTest.php @@ -1,6 +1,14 @@ assertTrue(true); + } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 2de6b2b..06d7c5c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,8 +1,11 @@