From 4bae576e59cadca1f9d81a81d0adb81d8034ed0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Mat=C3=ADas=20S=C3=A1nchez=20=28Quique=29?= Date: Fri, 25 May 2018 12:17:36 +0200 Subject: [PATCH] =?UTF-8?q?Configuraci=C3=B3n=20de=20yii2-queue=20con=20My?= =?UTF-8?q?SQL/MariaDB=20como=20gestor=20de=20colas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ver la documentación en https://github.com/yiisoft/yii2-queue/blob/master/docs/guide/driver-db.md En MySQL 5.6 y MariaDB 10.1, por omisión, la longitud máxima de las claves (índices) en InnoDB es de 767 bytes (191 ch). En la migración se define como índice "channel", que es un string, que por omisión se crea como un VARCHAR(255), que con la codificación utf8mb4 supera esa longitud, provocando un Error #1071 - Specified key was too long. Por ello, en la configuración de la base de datos, `innodb_large_prefix` necesita estar activo (ON), y así aceptar hasta 3072 bytes. Además: * `innodb_file_format` deberá ser Barracuda en vez de Antelope * `innodb_file_per_table` debería estar activado * Al crear la tabla, hay que pasar la opción `ROW_FORMAT=DYNAMIC` (ó `COMPRESSED`), porque hasta MySQL 5.7/MariaDB 10.2 por omisión es `COMPACT` o `REDUNDANT`. Ver * https://mariadb.com/kb/en/library/xtradbinnodb-storage-formats * https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ * https://github.com/yiisoft/yii2/issues/14594 Otra migración contiene `renameColumn()`, cuya implementación para MySQL/MariaDB puede no funcionar según el tipo de comillas que devuelva la BD. Ver https://github.com/yiisoft/yii2/issues/14267 --- composer.json | 5 +- composer.lock | 670 +++++++++++++++++++++++++++++++++++---------- config/console.php | 16 +- config/web.php | 18 +- 4 files changed, 561 insertions(+), 148 deletions(-) diff --git a/composer.json b/composer.json index 21ebab2..43c0d9f 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,14 @@ "minimum-stability": "stable", "require": { "php": ">=5.4.0", - "yiisoft/yii2": "~2.0.14", + "yiisoft/yii2": "~2.0.15", "yiisoft/yii2-bootstrap": "~2.0.0", "yiisoft/yii2-swiftmailer": "~2.0.0", "2amigos/yii2-usuario": "~1.0", "schmunk42/yii2-giiant": "@stable", "bower-asset/bootstrap-filestyle": "~1.2.3", - "asasmoyo/yii2-saml": "*" + "asasmoyo/yii2-saml": "*", + "yiisoft/yii2-queue": "^2.1" }, "require-dev": { "yiisoft/yii2-debug": "~2.0.0", diff --git a/composer.lock b/composer.lock index 7873ec9..795fe87 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,142 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1ee61e214104ad73f3826a6e3d5d21a", + "content-hash": "fdedceefe7665d1787c9458f94630c6d", "packages": [ + { + "name": "2amigos/2fa-library", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/2amigos/2fa-library.git", + "reference": "d74e8cd99021d5b994a2690a82298627a1017305" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/2amigos/2fa-library/zipball/d74e8cd99021d5b994a2690a82298627a1017305", + "reference": "d74e8cd99021d5b994a2690a82298627a1017305", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1.0|^2.0", + "paragonie/random_compat": "^1.4|^2.0", + "php": ">=5.6" + }, + "require-dev": { + "2amigos/qrcode-library": "^1.1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpmd/phpmd": "@stable", + "phpunit/phpunit": "^6.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "*" + }, + "suggest": { + "2amigos/2fa-library": "To be able to create inline QrCodes data uri schemes with logos and labels" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Da\\TwoFA\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "2amigOS! Consulting Group", + "email": "hola@2amigos.us", + "homepage": "http://2amigos.us", + "role": "Developer" + } + ], + "description": "2 Factor Authentication (2FA) library", + "homepage": "http://www.2amigos.us/open-source/details/twofa-library", + "keywords": [ + "2amigos", + "2fa", + "authenticator", + "extension", + "hotp", + "library", + "php", + "totp" + ], + "time": "2017-09-21T17:02:46+00:00" + }, + { + "name": "2amigos/qrcode-library", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/2amigos/qrcode-library.git", + "reference": "5356f2355c7ba9a9ced67753411c88c2c095deb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/2amigos/qrcode-library/zipball/5356f2355c7ba9a9ced67753411c88c2c095deb0", + "reference": "5356f2355c7ba9a9ced67753411c88c2c095deb0", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^1.0", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0", + "php": ">=5.6" + }, + "require-dev": { + "codeception/codeception": "*", + "codeception/specify": "^0.4.3", + "codeception/verify": "^0.3.1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpmd/phpmd": "@stable", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "*", + "yiisoft/yii2": "*" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Da\\QrCode\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "2amigOS! Consulting Group", + "email": "hola@2amigos.us", + "homepage": "http://2amigos.us", + "role": "Developer" + } + ], + "description": "QrCode Generator", + "homepage": "http://www.2amigos.us/open-source/details/qrcode-library", + "keywords": [ + "2amigos", + "component", + "extension", + "qr", + "qrcode", + "yii", + "yii 2", + "yii2" + ], + "time": "2017-08-25T15:23:58+00:00" + }, { "name": "2amigos/yii2-selectize-widget", "version": "1.1.0", @@ -65,27 +199,33 @@ }, { "name": "2amigos/yii2-usuario", - "version": "1.0.13", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/2amigos/yii2-usuario.git", - "reference": "c0fb59336ef6c2371abc04d87ac9a6673f509b6b" + "reference": "b648d2b6768a86d7e74795dd708e9d2c2ba1b7c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/2amigos/yii2-usuario/zipball/c0fb59336ef6c2371abc04d87ac9a6673f509b6b", - "reference": "c0fb59336ef6c2371abc04d87ac9a6673f509b6b", + "url": "https://api.github.com/repos/2amigos/yii2-usuario/zipball/b648d2b6768a86d7e74795dd708e9d2c2ba1b7c9", + "reference": "b648d2b6768a86d7e74795dd708e9d2c2ba1b7c9", "shasum": "" }, "require": { - "2amigos/yii2-selectize-widget": "~1.0", + "2amigos/2fa-library": "^1.0", + "2amigos/qrcode-library": "^1.1", + "2amigos/yii2-selectize-widget": "^1.1", "php": ">=5.5", - "yiisoft/yii2-authclient": "^2.1.0", - "yiisoft/yii2-bootstrap": "^2.0.0", - "yiisoft/yii2-swiftmailer": "^2.0.0" + "yiisoft/yii2-authclient": "^2.1", + "yiisoft/yii2-bootstrap": "^2.0", + "yiisoft/yii2-httpclient": "^2.0", + "yiisoft/yii2-swiftmailer": "^2.0" + }, + "conflict": { + "dektrium/yii2-rbac": "*", + "dektrium/yii2-user": "*" }, "require-dev": { - "cebe/assetfree-yii2": "~2.0.0", "codeception/codeception": "*", "codeception/specify": "^0.4.3", "codeception/verify": "^0.3.1", @@ -142,7 +282,7 @@ "yii2 user", "yii2-user" ], - "time": "2017-08-12T15:21:03+00:00" + "time": "2018-02-19T19:37:10+00:00" }, { "name": "asasmoyo/yii2-saml", @@ -194,6 +334,52 @@ ], "time": "2018-05-09T10:03:54+00:00" }, + { + "name": "bacon/bacon-qr-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", + "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": "^5.4|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" + }, + "suggest": { + "ext-gd": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-0": { + "BaconQrCode": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "time": "2017-10-17T09:59:25+00:00" + }, { "name": "bower-asset/bootstrap", "version": "v3.3.7", @@ -953,6 +1139,56 @@ "description": "A tool to automatically fix PHP code style", "time": "2018-03-21T17:41:26+00:00" }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Zxing\\": "lib/" + }, + "files": [ + "lib/Common/customFunctions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "description": "QR code decoder / reader", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", + "keywords": [ + "barcode", + "qr", + "zxing" + ], + "time": "2018-04-26T11:41:33+00:00" + }, { "name": "mikehaertl/php-shellcommand", "version": "1.4.0", @@ -1042,18 +1278,80 @@ ], "time": "2018-03-05T15:43:24+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.2.2", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "eccf915f45f911bfb189d1d1638d940ec6ee6e33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/eccf915f45f911bfb189d1d1638d940ec6ee6e33", + "reference": "eccf915f45f911bfb189d1d1638d940ec6ee6e33", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7", + "vimeo/psalm": "^1" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "time": "2018-03-10T19:47:49+00:00" + }, { "name": "paragonie/random_compat", - "version": "v2.0.11", + "version": "v2.0.12", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", "shasum": "" }, "require": { @@ -1088,7 +1386,7 @@ "pseudorandom", "random" ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2018-04-04T21:24:14+00:00" }, { "name": "pheme/yii2-settings", @@ -1312,16 +1610,16 @@ }, { "name": "schmunk42/yii2-giiant", - "version": "0.10.0", + "version": "0.10.1", "source": { "type": "git", "url": "https://github.com/schmunk42/yii2-giiant.git", - "reference": "b562494bb16012151ff1259f2c7a9c68b72e69d4" + "reference": "ba9db7865945b2c5543bca9f6fe4414a09f6500f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmunk42/yii2-giiant/zipball/b562494bb16012151ff1259f2c7a9c68b72e69d4", - "reference": "b562494bb16012151ff1259f2c7a9c68b72e69d4", + "url": "https://api.github.com/repos/schmunk42/yii2-giiant/zipball/ba9db7865945b2c5543bca9f6fe4414a09f6500f", + "reference": "ba9db7865945b2c5543bca9f6fe4414a09f6500f", "shasum": "" }, "require": { @@ -1372,7 +1670,7 @@ "gii", "yii2" ], - "time": "2018-03-15T16:48:19+00:00" + "time": "2018-04-20T13:17:12+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -1430,16 +1728,16 @@ }, { "name": "symfony/console", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51" + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/555c8dbe0ae9e561740451eabdbed2cc554b6a51", - "reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51", + "url": "https://api.github.com/repos/symfony/console/zipball/3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", "shasum": "" }, "require": { @@ -1459,7 +1757,7 @@ "symfony/process": "~3.4|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" @@ -1494,20 +1792,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-02-26T15:55:47+00:00" + "time": "2018-04-30T01:23:47+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428" + "reference": "63353a71073faf08f62caab4e6889b06a787f07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/85eaf6a8ec915487abac52e133efc4a268204428", - "reference": "85eaf6a8ec915487abac52e133efc4a268204428", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", + "reference": "63353a71073faf08f62caab4e6889b06a787f07b", "shasum": "" }, "require": { @@ -1557,11 +1855,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-02-14T14:11:10+00:00" + "time": "2018-04-06T07:35:43+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -1610,16 +1908,16 @@ }, { "name": "symfony/finder", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f" + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/44a796d2ecc2a16a5fc8f2956a34ee617934d55f", - "reference": "44a796d2ecc2a16a5fc8f2956a34ee617934d55f", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", "shasum": "" }, "require": { @@ -1655,11 +1953,11 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-03-05T18:28:26+00:00" + "time": "2018-04-04T05:10:37+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -1713,16 +2011,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "reference": "3296adf6a6454a050679cde90f95350ad604b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { @@ -1734,7 +2032,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1768,20 +2066,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", "shasum": "" }, "require": { @@ -1791,7 +2089,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1827,20 +2125,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", "shasum": "" }, "require": { @@ -1849,7 +2147,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1882,20 +2180,20 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e" + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6ed08502a7c9559da8e60ea343bdbd19c3350b3e", - "reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e", + "url": "https://api.github.com/repos/symfony/process/zipball/d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", "shasum": "" }, "require": { @@ -1931,11 +2229,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-02-19T12:18:43+00:00" + "time": "2018-04-03T05:24:00+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -2296,22 +2594,22 @@ }, { "name": "yiisoft/yii2-gii", - "version": "2.0.6", + "version": "2.0.7", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-gii.git", - "reference": "db41f647d9b73702ceb6864fdfce827a72b5ce42" + "reference": "9ec1374d0844f448d2af29c707f77c9f8d1375c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/db41f647d9b73702ceb6864fdfce827a72b5ce42", - "reference": "db41f647d9b73702ceb6864fdfce827a72b5ce42", + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/9ec1374d0844f448d2af29c707f77c9f8d1375c8", + "reference": "9ec1374d0844f448d2af29c707f77c9f8d1375c8", "shasum": "" }, "require": { "bower-asset/typeahead.js": "0.10.* | ~0.11.0", "phpspec/php-diff": ">=1.0.2", - "yiisoft/yii2": "~2.0.13", + "yiisoft/yii2": "~2.0.14", "yiisoft/yii2-bootstrap": "~2.0.0" }, "type": "yii2-extension", @@ -2326,7 +2624,7 @@ }, "autoload": { "psr-4": { - "yii\\gii\\": "" + "yii\\gii\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2345,7 +2643,7 @@ "gii", "yii2" ], - "time": "2017-12-22T23:53:06+00:00" + "time": "2018-05-02T22:05:25+00:00" }, { "name": "yiisoft/yii2-httpclient", @@ -2394,6 +2692,90 @@ ], "time": "2018-02-13T15:11:30+00:00" }, + { + "name": "yiisoft/yii2-queue", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-queue.git", + "reference": "d04b4b3c932081200876a351cc6c3502e89e11b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-queue/zipball/d04b4b3c932081200876a351cc6c3502e89e11b8", + "reference": "d04b4b3c932081200876a351cc6c3502e89e11b8", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "symfony/process": "*", + "yiisoft/yii2": "~2.0.14" + }, + "require-dev": { + "aws/aws-sdk-php": ">=2.4", + "enqueue/amqp-lib": "^0.8", + "jeremeamia/superclosure": "*", + "pda/pheanstalk": "*", + "php-amqplib/php-amqplib": "*", + "phpunit/phpunit": "~4.4", + "yiisoft/yii2-debug": "*", + "yiisoft/yii2-gii": "*", + "yiisoft/yii2-redis": "*" + }, + "suggest": { + "aws/aws-sdk-php": "Need for aws SQS.", + "enqueue/amqp-lib": "Need for AMQP interop queue.", + "ext-gearman": "Need for Gearman queue.", + "ext-pcntl": "Need for process signals.", + "pda/pheanstalk": "Need for Beanstalk queue.", + "php-amqplib/php-amqplib": "Need for AMQP queue.", + "yiisoft/yii2-redis": "Need for Redis queue." + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\queue\\": "src", + "yii\\queue\\amqp\\": "src/drivers/amqp", + "yii\\queue\\amqp_interop\\": "src/drivers/amqp_interop", + "yii\\queue\\beanstalk\\": "src/drivers/beanstalk", + "yii\\queue\\db\\": "src/drivers/db", + "yii\\queue\\file\\": "src/drivers/file", + "yii\\queue\\gearman\\": "src/drivers/gearman", + "yii\\queue\\redis\\": "src/drivers/redis", + "yii\\queue\\sync\\": "src/drivers/sync", + "yii\\queue\\sqs\\": "src/drivers/sqs" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Roman Zhuravlev", + "email": "zhuravljov@gmail.com" + } + ], + "description": "Yii2 Queue Extension which supported DB, Redis, RabbitMQ, Beanstalk, SQS and Gearman", + "keywords": [ + "async", + "beanstalk", + "db", + "gearman", + "gii", + "queue", + "rabbitmq", + "redis", + "sqs", + "yii" + ], + "time": "2018-05-23T21:04:57+00:00" + }, { "name": "yiisoft/yii2-swiftmailer", "version": "2.0.7", @@ -2507,21 +2889,21 @@ }, { "name": "codeception/base", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/Codeception/base.git", - "reference": "b8f173dfb3eecbfe46becb392b14e793853336e6" + "reference": "fb07b713f2a97cdf0c5c81c93fa26a0785eb44a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/base/zipball/b8f173dfb3eecbfe46becb392b14e793853336e6", - "reference": "b8f173dfb3eecbfe46becb392b14e793853336e6", + "url": "https://api.github.com/repos/Codeception/base/zipball/fb07b713f2a97cdf0c5c81c93fa26a0785eb44a6", + "reference": "fb07b713f2a97cdf0c5c81c93fa26a0785eb44a6", "shasum": "" }, "require": { "behat/gherkin": "^4.4.0", - "codeception/phpunit-wrapper": "^6.0|^7.0", + "codeception/phpunit-wrapper": "^6.0.9|^7.0.6", "codeception/stub": "^1.0", "ext-json": "*", "ext-mbstring": "*", @@ -2592,26 +2974,26 @@ "functional testing", "unit testing" ], - "time": "2018-02-27T00:17:07+00:00" + "time": "2018-03-31T22:36:34+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "7.0.5", + "version": "7.1.2", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "42c8fdbf301ee36f6b58cb154972f9148fdcb7d4" + "reference": "374dd623668a0028e29c95b362e20d03f8c4e65b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/42c8fdbf301ee36f6b58cb154972f9148fdcb7d4", - "reference": "42c8fdbf301ee36f6b58cb154972f9148fdcb7d4", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/374dd623668a0028e29c95b362e20d03f8c4e65b", + "reference": "374dd623668a0028e29c95b362e20d03f8c4e65b", "shasum": "" }, "require": { "phpunit/php-code-coverage": "^6.0", - "phpunit/phpunit": "^7.0", - "sebastian/comparator": "^2.0", + "phpunit/phpunit": "^7.1", + "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0" }, "require-dev": { @@ -2635,7 +3017,7 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2018-03-16T10:18:33+00:00" + "time": "2018-05-17T08:30:48+00:00" }, { "name": "codeception/specify", @@ -2679,16 +3061,16 @@ }, { "name": "codeception/stub", - "version": "1.0.2", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/Codeception/Stub.git", - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99" + "reference": "681b62348837a5ef07d10d8a226f5bc358cc8805" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/95fb7a36b81890dd2e5163e7ab31310df6f1bb99", - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/681b62348837a5ef07d10d8a226f5bc358cc8805", + "reference": "681b62348837a5ef07d10d8a226f5bc358cc8805", "shasum": "" }, "require": { @@ -2708,7 +3090,7 @@ "MIT" ], "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", - "time": "2018-02-18T13:56:56+00:00" + "time": "2018-05-17T09:31:08+00:00" }, { "name": "codeception/verify", @@ -3216,23 +3598,23 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -3275,20 +3657,20 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.0.1", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba" + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f8ca4b604baf23dab89d87773c28cc07405189ba", - "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/52187754b0eed0b8159f62a6fa30073327e8c2ca", + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca", "shasum": "" }, "require": { @@ -3299,7 +3681,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, @@ -3338,7 +3720,7 @@ "testing", "xunit" ], - "time": "2018-02-02T07:01:41+00:00" + "time": "2018-04-29T14:59:09+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3528,16 +3910,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.0.2", + "version": "7.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9" + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", - "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", "shasum": "" }, "require": { @@ -3551,12 +3933,12 @@ "phar-io/version": "^1.0", "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0", + "phpunit/php-code-coverage": "^6.0.1", "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", - "phpunit/phpunit-mock-objects": "^6.0", - "sebastian/comparator": "^2.1", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", @@ -3578,7 +3960,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -3604,20 +3986,20 @@ "testing", "xunit" ], - "time": "2018-02-26T07:03:12+00:00" + "time": "2018-04-29T15:09:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "6.0.1", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/e3249dedc2d99259ccae6affbc2684eac37c2e53", - "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { @@ -3635,7 +4017,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -3660,7 +4042,7 @@ "mock", "xunit" ], - "time": "2018-02-15T05:27:38+00:00" + "time": "2018-04-11T04:50:36+00:00" }, { "name": "psr/http-message", @@ -3759,30 +4141,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3819,7 +4201,7 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", @@ -4277,16 +4659,16 @@ }, { "name": "symfony/browser-kit", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "fee0fcd501304b1c3190f6293f650cceb738a353" + "reference": "c43bfa0182363b3fd64331b5e64e467349ff4670" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/fee0fcd501304b1c3190f6293f650cceb738a353", - "reference": "fee0fcd501304b1c3190f6293f650cceb738a353", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c43bfa0182363b3fd64331b5e64e467349ff4670", + "reference": "c43bfa0182363b3fd64331b5e64e467349ff4670", "shasum": "" }, "require": { @@ -4330,20 +4712,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2018-03-19T22:35:49+00:00" }, { "name": "symfony/css-selector", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2" + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c69f1e93aa898fd9fec627ebef467188151c8dc2", - "reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/03f965583147957f1ecbad7ea1c9d6fd5e525ec2", + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2", "shasum": "" }, "require": { @@ -4383,20 +4765,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-02-03T14:58:37+00:00" + "time": "2018-03-19T22:35:49+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "26726ddc01601dc9393f2afc3369ce1ca64e4537" + "reference": "d6c04c7532535b5e0b63db45b543cd60818e0fbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/26726ddc01601dc9393f2afc3369ce1ca64e4537", - "reference": "26726ddc01601dc9393f2afc3369ce1ca64e4537", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d6c04c7532535b5e0b63db45b543cd60818e0fbc", + "reference": "d6c04c7532535b5e0b63db45b543cd60818e0fbc", "shasum": "" }, "require": { @@ -4439,20 +4821,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-03-19T22:35:49+00:00" }, { "name": "symfony/yaml", - "version": "v4.0.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "de5f125ea39de846b90b313b2cfb031a0152d223" + "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/de5f125ea39de846b90b313b2cfb031a0152d223", - "reference": "de5f125ea39de846b90b313b2cfb031a0152d223", + "url": "https://api.github.com/repos/symfony/yaml/zipball/275ad099e4cbe612a2acbca14a16dd1c5311324d", + "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d", "shasum": "" }, "require": { @@ -4497,7 +4879,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-02-19T20:08:53+00:00" + "time": "2018-04-08T08:49:08+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/console.php b/config/console.php index 252f716..a81a912 100644 --- a/config/console.php +++ b/config/console.php @@ -10,7 +10,10 @@ '@npm' => '@vendor/npm-asset', ], 'basePath' => dirname(__DIR__), - 'bootstrap' => ['log'], + 'bootstrap' => [ + 'log', + 'queue', // The component registers its own console commands + ], 'components' => [ 'authManager' => [ 'class' => 'Da\User\Component\AuthDbManagerComponent', @@ -42,6 +45,16 @@ ], ], ], + 'queue' => [ + // 'as log' => \yii\queue\LogBehavior::class, + 'channel' => 'default', // Queue channel key + 'class' => \yii\queue\db\Queue::class, + 'db' => 'db', // DB connection component or its config. + 'mutex' => \yii\mutex\MysqlMutex::class, // Mutex used to sync queries + 'tableName' => '{{%queue}}', // Table name + 'ttr' => 5 * 60, // Max time for job execution + 'attempts' => 3, // Max number of attempts + ], ], 'controllerMap' => [ 'batch' => [ @@ -71,6 +84,7 @@ ], 'migrationNamespaces' => [ 'Da\User\Migration', + 'yii\queue\db\migrations' ], ], ], diff --git a/config/web.php b/config/web.php index 3e70a06..50b175b 100644 --- a/config/web.php +++ b/config/web.php @@ -10,7 +10,10 @@ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ], - 'bootstrap' => ['log'], + 'bootstrap' => [ + 'log', + 'queue', // The component registers its own console commands + ], 'components' => [ 'authManager' => [ 'class' => 'Da\User\Component\AuthDbManagerComponent', @@ -58,6 +61,16 @@ // for the mailer to send real emails. 'useFileTransport' => true, ], + 'queue' => [ + // 'as log' => \yii\queue\LogBehavior::class, + 'channel' => 'default', // Queue channel key + 'class' => \yii\queue\db\Queue::class, + 'db' => 'db', // DB connection component or its config. + 'mutex' => \yii\mutex\MysqlMutex::class, // Mutex used to sync queries + 'tableName' => '{{%queue}}', // Table name + 'ttr' => 5 * 60, // Max time for job execution + 'attempts' => 3, // Max number of attempts + ], 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'VNvd9TIBGgiFei-Eu4Yf6OWNX_nYJaQj', @@ -106,6 +119,9 @@ $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', + 'panels' => [ + 'queue' => \yii\queue\debug\Panel::class, + ], // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ];