From d46ffdb51b9c00695dff0f1c1f0a8ba23c6a9474 Mon Sep 17 00:00:00 2001 From: Kristof Coomans Date: Thu, 19 Jan 2017 21:54:41 +0100 Subject: [PATCH 1/2] III-1807: Concluded finishes the saga --- composer.json | 2 +- composer.lock | 236 +++++++++++++++++++++------------------- src/UiTPASEventSaga.php | 20 ++++ 3 files changed, 143 insertions(+), 115 deletions(-) diff --git a/composer.json b/composer.json index ca46760..c44f18e 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "authors": [], "require": { "silex/silex": "~1.3", - "cultuurnet/udb3": "~0.1", + "cultuurnet/udb3": "dev-feature/III-1807 as 0.1", "deralex/yaml-config-service-provider": "~1.0", "knplabs/console-service-provider": "~1.0", "jdesrosiers/silex-cors-provider": "~0.1.4", diff --git a/composer.lock b/composer.lock index c491072..fbfb940 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "66f15736ad778da8d56cf9835f0ede31", - "content-hash": "694fb0152244237208faae51dd20858d", + "content-hash": "7dd7b7698aa270f2075bfef7dd951e3c", "packages": [ { "name": "2dotstwice/collection", @@ -110,7 +109,7 @@ "assertion", "validation" ], - "time": "2017-01-09 09:19:50" + "time": "2017-01-09T09:19:50+00:00" }, { "name": "broadway/broadway", @@ -198,7 +197,7 @@ "domain-driven design", "event sourcing" ], - "time": "2016-12-07 08:03:00" + "time": "2016-12-07T08:03:00+00:00" }, { "name": "broadway/uuid-generator", @@ -231,7 +230,7 @@ "MIT" ], "description": "UUID generator for broadway/broadway.", - "time": "2014-09-12 14:14:07" + "time": "2014-09-12T14:14:07+00:00" }, { "name": "chrisboulton/php-resque", @@ -274,7 +273,7 @@ "redis", "resque" ], - "time": "2012-10-13 07:28:16" + "time": "2012-10-13T07:28:16+00:00" }, { "name": "commerceguys/intl", @@ -318,7 +317,7 @@ } ], "description": "Internationalization library powered by CLDR data.", - "time": "2016-12-13 12:33:19" + "time": "2016-12-13T12:33:19+00:00" }, { "name": "container-interop/container-interop", @@ -345,7 +344,7 @@ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30 15:22:37" + "time": "2014-12-30T15:22:37+00:00" }, { "name": "crell/api-problem", @@ -393,7 +392,7 @@ "rest", "xml" ], - "time": "2014-10-07 17:43:34" + "time": "2014-10-07T17:43:34+00:00" }, { "name": "cultuurnet/auth", @@ -771,7 +770,7 @@ "Apache-2.0" ], "description": "CultuurNet search service", - "time": "2015-11-20 11:50:37" + "time": "2015-11-20T11:50:37+00:00" }, { "name": "cultuurnet/silex-amqp", @@ -902,16 +901,16 @@ }, { "name": "cultuurnet/udb3", - "version": "dev-master", + "version": "dev-feature/III-1807", "source": { "type": "git", "url": "https://github.com/cultuurnet/udb3-php.git", - "reference": "b649cceace077d8d2b967977f64c54674026135e" + "reference": "c382f54349ac333ac4d1038df2fdbf00ab92a297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cultuurnet/udb3-php/zipball/b649cceace077d8d2b967977f64c54674026135e", - "reference": "b649cceace077d8d2b967977f64c54674026135e", + "url": "https://api.github.com/repos/cultuurnet/udb3-php/zipball/c382f54349ac333ac4d1038df2fdbf00ab92a297", + "reference": "c382f54349ac333ac4d1038df2fdbf00ab92a297", "shasum": "" }, "require": { @@ -973,7 +972,7 @@ } ], "description": "UDB3 PHP libraries", - "time": "2017-01-18 10:31:37" + "time": "2017-01-19 18:19:40" }, { "name": "cultuurnet/udb3-http-foundation", @@ -1119,7 +1118,7 @@ "utility", "utils" ], - "time": "2015-07-23 00:54:12" + "time": "2015-07-23T00:54:12+00:00" }, { "name": "deralex/yaml-config-service-provider", @@ -1171,7 +1170,7 @@ "keywords": [ "silex" ], - "time": "2014-01-29 15:54:57" + "time": "2014-01-29T15:54:57+00:00" }, { "name": "doctrine/annotations", @@ -1239,7 +1238,7 @@ "docblock", "parser" ], - "time": "2016-12-30 15:59:45" + "time": "2016-12-30T15:59:45+00:00" }, { "name": "doctrine/cache", @@ -1309,7 +1308,7 @@ "cache", "caching" ], - "time": "2016-10-29 11:16:17" + "time": "2016-10-29T11:16:17+00:00" }, { "name": "doctrine/collections", @@ -1375,7 +1374,7 @@ "collections", "iterator" ], - "time": "2015-04-14 22:21:58" + "time": "2015-04-14T22:21:58+00:00" }, { "name": "doctrine/common", @@ -1448,20 +1447,20 @@ "persistence", "spl" ], - "time": "2017-01-13 14:02:13" + "time": "2017-01-13T14:02:13+00:00" }, { "name": "doctrine/dbal", - "version": "v2.5.8", + "version": "v2.5.9", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "6314d55f60f85f0295c90688397b75c13faf9f0e" + "reference": "0d2f8187d4b4c7b72d8e2acba359e25c36feaf5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/6314d55f60f85f0295c90688397b75c13faf9f0e", - "reference": "6314d55f60f85f0295c90688397b75c13faf9f0e", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/0d2f8187d4b4c7b72d8e2acba359e25c36feaf5e", + "reference": "0d2f8187d4b4c7b72d8e2acba359e25c36feaf5e", "shasum": "" }, "require": { @@ -1519,7 +1518,7 @@ "persistence", "queryobject" ], - "time": "2017-01-17 17:48:38" + "time": "2017-01-19T13:27:33+00:00" }, { "name": "doctrine/inflector", @@ -1586,7 +1585,7 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2015-11-06T14:35:42+00:00" }, { "name": "doctrine/lexer", @@ -1640,7 +1639,7 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2014-09-09T13:34:57+00:00" }, { "name": "doctrine/migrations", @@ -1714,7 +1713,7 @@ "database", "migrations" ], - "time": "2016-12-25 22:54:00" + "time": "2016-12-25T22:54:00+00:00" }, { "name": "doctrine/mongodb", @@ -1791,7 +1790,7 @@ "mongodb", "persistence" ], - "time": "2016-11-22 19:01:59" + "time": "2016-11-22T19:01:59+00:00" }, { "name": "guzzle/guzzle", @@ -1887,7 +1886,7 @@ "web service" ], "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18 18:23:50" + "time": "2015-03-18T18:23:50+00:00" }, { "name": "guzzlehttp/psr7", @@ -1945,7 +1944,7 @@ "stream", "uri" ], - "time": "2016-02-18 21:54:00" + "time": "2016-02-18T21:54:00+00:00" }, { "name": "ircmaxell/password-compat", @@ -1987,7 +1986,7 @@ "hashing", "password" ], - "time": "2014-11-20 16:49:30" + "time": "2014-11-20T16:49:30+00:00" }, { "name": "jdesrosiers/silex-cors-provider", @@ -2037,7 +2036,7 @@ "sharing", "silex" ], - "time": "2015-09-12 22:16:14" + "time": "2015-09-12T22:16:14+00:00" }, { "name": "justinrainbow/json-schema", @@ -2103,7 +2102,7 @@ "json", "schema" ], - "time": "2015-07-13 05:06:53" + "time": "2015-07-13T05:06:53+00:00" }, { "name": "knplabs/console-service-provider", @@ -2145,7 +2144,7 @@ "console", "silex" ], - "time": "2016-02-01 15:38:27" + "time": "2016-02-01T15:38:27+00:00" }, { "name": "lcobucci/jwt", @@ -2203,7 +2202,7 @@ "JWS", "jwt" ], - "time": "2016-10-31 20:09:32" + "time": "2016-10-31T20:09:32+00:00" }, { "name": "league/flysystem", @@ -2286,7 +2285,7 @@ "sftp", "storage" ], - "time": "2016-10-19 20:38:46" + "time": "2016-10-19T20:38:46+00:00" }, { "name": "league/geotools", @@ -2358,7 +2357,7 @@ "geometry", "geotools" ], - "time": "2014-05-15 23:59:22" + "time": "2014-05-15T23:59:22+00:00" }, { "name": "marc-mabe/php-enum", @@ -2417,7 +2416,7 @@ "type-hint", "typehint" ], - "time": "2015-10-04 17:35:32" + "time": "2015-10-04T17:35:32+00:00" }, { "name": "mathiasverraes/money", @@ -2473,7 +2472,7 @@ "money" ], "abandoned": "moneyphp/money", - "time": "2016-01-16 22:03:46" + "time": "2016-01-16T22:03:46+00:00" }, { "name": "monolog/monolog", @@ -2551,7 +2550,7 @@ "logging", "psr-3" ], - "time": "2016-11-26 00:15:39" + "time": "2016-11-26T00:15:39+00:00" }, { "name": "nicolopignatelli/valueobjects", @@ -2604,7 +2603,7 @@ } ], "description": "A PHP library/collection of classes aimed to help developers using and undestanding immutable objects.", - "time": "2015-05-15 13:19:42" + "time": "2015-05-15T13:19:42+00:00" }, { "name": "ocramius/proxy-manager", @@ -2667,20 +2666,20 @@ "proxy pattern", "service proxies" ], - "time": "2015-08-09 04:28:19" + "time": "2015-08-09T04:28:19+00:00" }, { "name": "paragonie/random_compat", - "version": "v1.4.1", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", + "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", "shasum": "" }, "require": { @@ -2715,7 +2714,7 @@ "pseudorandom", "random" ], - "time": "2016-03-18 20:34:03" + "time": "2016-11-07T23:38:38+00:00" }, { "name": "php-amqplib/php-amqplib", @@ -2785,7 +2784,7 @@ "queue", "rabbitmq" ], - "time": "2016-04-11 14:30:01" + "time": "2016-04-11T14:30:01+00:00" }, { "name": "php-http/httplug", @@ -2841,7 +2840,7 @@ "client", "http" ], - "time": "2016-08-31 08:30:17" + "time": "2016-08-31T08:30:17+00:00" }, { "name": "php-http/promise", @@ -2891,7 +2890,7 @@ "keywords": [ "promise" ], - "time": "2016-01-26 13:27:02" + "time": "2016-01-26T13:27:02+00:00" }, { "name": "pimple/pimple", @@ -2937,7 +2936,7 @@ "container", "dependency injection" ], - "time": "2013-11-22 08:30:29" + "time": "2013-11-22T08:30:29+00:00" }, { "name": "predis/predis", @@ -2987,7 +2986,7 @@ "predis", "redis" ], - "time": "2016-06-16 16:22:20" + "time": "2016-06-16T16:22:20+00:00" }, { "name": "psr/http-message", @@ -3037,7 +3036,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -3084,7 +3083,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "ramsey/uuid", @@ -3151,7 +3150,7 @@ "identifier", "uuid" ], - "time": "2016-03-22 18:20:19" + "time": "2016-03-22T18:20:19+00:00" }, { "name": "rase/socket.io-emitter", @@ -3190,7 +3189,7 @@ "Socket.io", "emit" ], - "time": "2014-10-10 10:37:20" + "time": "2014-10-10T10:37:20+00:00" }, { "name": "react/async", @@ -3231,7 +3230,7 @@ "keywords": [ "async" ], - "time": "2013-02-06 23:27:19" + "time": "2013-02-06T23:27:19+00:00" }, { "name": "silex/silex", @@ -3308,7 +3307,7 @@ "keywords": [ "microframework" ], - "time": "2016-01-06 14:59:35" + "time": "2016-01-06T14:59:35+00:00" }, { "name": "symfony/console", @@ -3369,7 +3368,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-01-08 20:43:03" + "time": "2017-01-08T20:43:03+00:00" }, { "name": "symfony/debug", @@ -3426,7 +3425,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:30:24" + "time": "2017-01-02T20:30:24+00:00" }, { "name": "symfony/event-dispatcher", @@ -3486,7 +3485,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:30:24" + "time": "2017-01-02T20:30:24+00:00" }, { "name": "symfony/http-foundation", @@ -3542,7 +3541,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-01-06 17:20:46" + "time": "2017-01-06T17:20:46+00:00" }, { "name": "symfony/http-kernel", @@ -3624,7 +3623,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-01-12 20:27:24" + "time": "2017-01-12T20:27:24+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -3683,7 +3682,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php55", @@ -3739,7 +3738,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/routing", @@ -3814,24 +3813,23 @@ "uri", "url" ], - "time": "2016-06-29 05:40:00" + "time": "2016-06-29T05:40:00+00:00" }, { "name": "symfony/security", - "version": "v2.7.23", + "version": "v2.7.8", "source": { "type": "git", "url": "https://github.com/symfony/security.git", - "reference": "17fae546bf4be09cf1c012c47830c79d195ffc95" + "reference": "88b9dd021f396ecea0ed312b26e2e8fe5b98feeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security/zipball/17fae546bf4be09cf1c012c47830c79d195ffc95", - "reference": "17fae546bf4be09cf1c012c47830c79d195ffc95", + "url": "https://api.github.com/repos/symfony/security/zipball/88b9dd021f396ecea0ed312b26e2e8fe5b98feeb", + "reference": "88b9dd021f396ecea0ed312b26e2e8fe5b98feeb", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0", "php": ">=5.3.9", "symfony/event-dispatcher": "~2.2", "symfony/http-foundation": "~2.1", @@ -3857,6 +3855,7 @@ "suggest": { "doctrine/dbal": "For using the built-in ACL implementation", "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", + "paragonie/random_compat": "", "symfony/class-loader": "For using the ACL generateSql script", "symfony/expression-language": "For using the expression voter", "symfony/finder": "For using the ACL generateSql script", @@ -3894,7 +3893,7 @@ ], "description": "Symfony Security Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:30:00" + "time": "2015-12-23T18:13:52+00:00" }, { "name": "symfony/serializer", @@ -3958,7 +3957,7 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:30:24" + "time": "2017-01-02T20:30:24+00:00" }, { "name": "symfony/yaml", @@ -4007,7 +4006,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-01-03 13:49:52" + "time": "2017-01-03T13:49:52+00:00" }, { "name": "willdurand/geocoder", @@ -4071,7 +4070,7 @@ "geocoding", "geoip" ], - "time": "2015-01-07 13:23:35" + "time": "2015-01-07T13:23:35+00:00" }, { "name": "zendframework/zend-code", @@ -4123,7 +4122,7 @@ "code", "zf2" ], - "time": "2016-04-20 17:26:42" + "time": "2016-04-20T17:26:42+00:00" }, { "name": "zendframework/zend-eventmanager", @@ -4177,7 +4176,7 @@ "events", "zf2" ], - "time": "2016-12-19 21:47:12" + "time": "2016-12-19T21:47:12+00:00" }, { "name": "zendframework/zend-stdlib", @@ -4222,7 +4221,7 @@ "stdlib", "zf2" ], - "time": "2016-09-13 14:38:50" + "time": "2016-09-13T14:38:50+00:00" }, { "name": "zendframework/zend-validator", @@ -4293,7 +4292,7 @@ "validator", "zf2" ], - "time": "2016-06-23 13:44:31" + "time": "2016-06-23T13:44:31+00:00" } ], "packages-dev": [ @@ -4349,7 +4348,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "escapestudios/symfony2-coding-standard", @@ -4395,7 +4394,7 @@ "Symfony2", "phpcs" ], - "time": "2016-03-14 16:38:04" + "time": "2016-03-14T16:38:04+00:00" }, { "name": "myclabs/deep-copy", @@ -4437,7 +4436,7 @@ "object", "object graph" ], - "time": "2016-10-31 17:19:45" + "time": "2016-10-31T17:19:45+00:00" }, { "name": "phing/phing", @@ -4530,7 +4529,7 @@ "task", "tool" ], - "time": "2016-10-13 09:01:45" + "time": "2016-10-13T09:01:45+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -4584,7 +4583,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -4629,7 +4628,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-09-30T07:12:33+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -4676,7 +4675,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phpspec/prophecy", @@ -4739,7 +4738,7 @@ "spy", "stub" ], - "time": "2016-11-21 14:58:47" + "time": "2016-11-21T14:58:47+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4802,7 +4801,7 @@ "testing", "xunit" ], - "time": "2016-12-20 15:22:42" + "time": "2016-12-20T15:22:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4849,7 +4848,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -4890,7 +4889,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -4934,7 +4933,7 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", @@ -4983,7 +4982,7 @@ "keywords": [ "tokenizer" ], - "time": "2016-11-15 14:06:22" + "time": "2016-11-15T14:06:22+00:00" }, { "name": "phpunit/phpunit", @@ -5065,7 +5064,7 @@ "testing", "xunit" ], - "time": "2016-12-28 07:18:51" + "time": "2016-12-28T07:18:51+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -5124,7 +5123,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2016-12-08T20:27:08+00:00" }, { "name": "satooshi/php-coveralls", @@ -5182,7 +5181,7 @@ "github", "test" ], - "time": "2016-01-20 17:35:46" + "time": "2016-01-20T17:35:46+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5227,7 +5226,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2016-02-13T06:45:14+00:00" }, { "name": "sebastian/comparator", @@ -5291,7 +5290,7 @@ "compare", "equality" ], - "time": "2016-11-19 09:18:40" + "time": "2016-11-19T09:18:40+00:00" }, { "name": "sebastian/diff", @@ -5343,7 +5342,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", @@ -5393,7 +5392,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -5460,7 +5459,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -5511,7 +5510,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -5557,7 +5556,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-11-19 07:35:10" + "time": "2016-11-19T07:35:10+00:00" }, { "name": "sebastian/recursion-context", @@ -5610,7 +5609,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -5652,7 +5651,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -5695,7 +5694,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -5772,7 +5771,7 @@ "phpcs", "standards" ], - "time": "2016-01-19 23:39:10" + "time": "2016-01-19T23:39:10+00:00" }, { "name": "symfony/config", @@ -5828,7 +5827,7 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-01-02T20:32:22+00:00" }, { "name": "symfony/filesystem", @@ -5877,7 +5876,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-01-08 20:47:33" + "time": "2017-01-08T20:47:33+00:00" }, { "name": "symfony/stopwatch", @@ -5926,7 +5925,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-01-02T20:32:22+00:00" }, { "name": "webmozart/assert", @@ -5976,12 +5975,21 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2016-11-23T20:04:58+00:00" + } + ], + "aliases": [ + { + "alias": "0.1", + "alias_normalized": "0.1.0.0", + "version": "dev-feature/III-1807", + "package": "cultuurnet/udb3" } ], - "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "cultuurnet/udb3": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": [], diff --git a/src/UiTPASEventSaga.php b/src/UiTPASEventSaga.php index 005de6e..8e6031e 100644 --- a/src/UiTPASEventSaga.php +++ b/src/UiTPASEventSaga.php @@ -10,6 +10,7 @@ use CultuurNet\UDB3\Cdb\CdbId\EventCdbIdExtractorInterface; use CultuurNet\UDB3\Cdb\EventItemFactory; use CultuurNet\UDB3\Cdb\PriceDescriptionParser; +use CultuurNet\UDB3\Event\Events\Concluded; use CultuurNet\UDB3\Event\Events\EventCreated; use CultuurNet\UDB3\Event\Events\EventImportedFromUDB2; use CultuurNet\UDB3\Event\Events\EventUpdatedFromUDB2; @@ -100,6 +101,12 @@ public static function configuration() return null; }; + $concludedEvenCallback = function (Concluded $concluded) { + return new Criteria( + ['uitpasAggregateId' => $concluded->getItemId()] + ); + }; + $offerEventCallback = function (AbstractEvent $event) { return new Criteria( ['uitpasAggregateId' => $event->getItemId()] @@ -135,6 +142,7 @@ public static function configuration() DistributionKeysUpdated::class => $uitpasAggregateEventCallback, DistributionKeysCleared::class => $uitpasAggregateEventCallback, LabelAdded::class => $labelAddedToOrganizerCallback, + Concluded::class => $concludedEvenCallback, ]; } @@ -312,6 +320,18 @@ public function handleLabelAdded(LabelAdded $labelAdded, State $state) return $state; } + /** + * @param Concluded $concluded + * @param State $state + * @return State + */ + public function handleConcluded(Concluded $concluded, State $state) + { + $state->setDone(); + + return $state; + } + /** * @param State $state * @param string $cdbXml From a99a8253ff8ae765f225dda18fa68afd3ae902ca Mon Sep 17 00:00:00 2001 From: Kristof Coomans Date: Mon, 23 Jan 2017 07:54:35 +0100 Subject: [PATCH 2/2] III-1807: Test that the saga ends when Event is concluded --- tests/UiTPASEventSagaTest.php | 67 ++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/tests/UiTPASEventSagaTest.php b/tests/UiTPASEventSagaTest.php index 1971e6c..5f7fb65 100644 --- a/tests/UiTPASEventSagaTest.php +++ b/tests/UiTPASEventSagaTest.php @@ -5,6 +5,7 @@ use Broadway\CommandHandling\CommandBusInterface; use Broadway\CommandHandling\Testing\TraceableCommandBus; use Broadway\EventDispatcher\EventDispatcher; +use Broadway\Saga\State\Criteria; use Broadway\UuidGenerator\Rfc4122\Version4Generator; use CommerceGuys\Intl\Currency\CurrencyRepository; use CommerceGuys\Intl\NumberFormat\NumberFormatRepository; @@ -16,6 +17,7 @@ use CultuurNet\UDB3\CalendarType; use CultuurNet\UDB3\Cdb\CdbId\EventCdbIdExtractor; use CultuurNet\UDB3\Cdb\PriceDescriptionParser; +use CultuurNet\UDB3\Event\Events\Concluded; use CultuurNet\UDB3\Event\Events\EventCreated; use CultuurNet\UDB3\Event\Events\EventImportedFromUDB2; use CultuurNet\UDB3\Event\Events\EventUpdatedFromUDB2; @@ -56,6 +58,8 @@ */ class UiTPASEventSagaTest extends \PHPUnit_Framework_TestCase { + const SAGA_TYPE = 'uitpas_sync'; + /** * @var Scenario */ @@ -121,6 +125,11 @@ class UiTPASEventSagaTest extends \PHPUnit_Framework_TestCase */ private $logHandler; + /** + * @var InMemoryRepository + */ + private $sagaStateRepository; + public function setUp() { $this->logHandler = new TestHandler(); @@ -182,6 +191,7 @@ function ($organizerId) { $this->eventCdbIdExtractor = new EventCdbIdExtractor(); + $this->sagaStateRepository = new InMemoryRepository(); $this->scenario = $this->createScenario(); } @@ -192,17 +202,38 @@ protected function createScenario() { $traceableCommandBus = new TraceableCommandBus(); $saga = $this->createSaga($traceableCommandBus); - $sagaStateRepository = new InMemoryRepository(); $sagaManager = new MultipleSagaManager( - $sagaStateRepository, - [$saga], - new StateManager($sagaStateRepository, new Version4Generator()), + $this->sagaStateRepository, + [self::SAGA_TYPE => $saga], + new StateManager($this->sagaStateRepository, new Version4Generator()), new StaticallyConfiguredSagaMetadataFactory(), new EventDispatcher() ); return new Scenario($this, $sagaManager, $traceableCommandBus); } + /** + * @test + * @group issue-III-1807 + */ + public function it_starts_the_saga_when_an_event_is_created() + { + $eventId = ''; + $this->scenario + ->when( + $this->generateEventCreatedEvent($eventId) + ) + ->then([]); + + $states = $this->sagaStateRepository->findBy( + new Criteria(['uitpasAggregateId' => $eventId]), + self::SAGA_TYPE + ); + + $statesArray = iterator_to_array($states); + $this->assertCount(1, $statesArray); + } + /** * @param CommandBusInterface $commandBus * @return UiTPASEventSaga @@ -821,6 +852,7 @@ public function it_ignores_cdbxml_and_udb2_events_with_invalid_cdbxml() /** * @test + * @group issue-III-1804 */ public function it_registers_multiple_uitpas_events_when_an_uitpas_label_is_added_to_their_related_organizer() { @@ -896,6 +928,7 @@ public function it_registers_multiple_uitpas_events_when_an_uitpas_label_is_adde /** * @test + * @group issue-III-1804 */ public function it_does_not_register_an_uitpas_event_when_a_label_not_relevant_for_uitpas_is_added_to_the_organizer() { @@ -929,6 +962,32 @@ public function it_does_not_register_an_uitpas_event_when_a_label_not_relevant_f ); } + /** + * @test + * @group issue-III-1807 + */ + public function it_finishes_the_saga_state_when_an_event_is_concluded() + { + $this->scenario + ->given( + [ + $this->eventCreated + ] + ) + ->when( + new Concluded($this->eventId) + ) + ->then([]); + + $states = $this->sagaStateRepository->findBy( + new Criteria(['uitpasAggregateId' => $this->eventId]), + self::SAGA_TYPE + ); + + $statesArray = iterator_to_array($states); + $this->assertEmpty($statesArray); + } + /** * @param string $eventId * @return EventCreated