From a59e0befaa9737361b5d6576b06e630aa6f6f0ff Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Fri, 24 Jun 2016 11:17:05 -0500 Subject: [PATCH] =?UTF-8?q?Add=20silex=20cache=20for=20use=20in=20Transact?= =?UTF-8?q?ionService,=20also=20fix=20isToUri=20signa=E2=80=A6=20(#8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add silex cache for use in TransactionService, also fix isToUri signature and headers when adding a member proxy. * Remove minimum-stability: dev * Ignore local settings files. --- .gitignore | 2 + composer.json | 4 +- composer.lock | 486 ++++++++++++------ .../Controller/CollectionController.php | 9 +- src/index.php | 10 + 5 files changed, 358 insertions(+), 153 deletions(-) diff --git a/.gitignore b/.gitignore index 886864d..4043547 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ vendor/ composer.phar installer +config/settings.dev.yml +config/settings.yml diff --git a/composer.json b/composer.json index 14fab91..22dbeed 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "twig/twig": "^1.23", "symfony/yaml": "^3.0", "easyrdf/easyrdf": "^0.9.1", - "ml/json-ld": "^1.0" + "ml/json-ld": "^1.0", + "moust/silex-cache": "1.0.*@dev" }, "require-dev": { "phpunit/phpunit": "^4.8", @@ -24,7 +25,6 @@ "autoload": { "psr-4": {"Islandora\\PDX\\": "src/"} }, - "minimum-stability" : "dev", "license": "MIT", "authors": [ { diff --git a/composer.lock b/composer.lock index 71a5686..2263db3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,12 +4,12 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b615b10d1e3cbf6967f1b8db90083c68", - "content-hash": "d8760e5ff93040382a870559feb5f218", + "hash": "665be8c6d05ee95a4bbf64d7aa9134d0", + "content-hash": "1716030b57fec36735ecfa9ff860bf7a", "packages": [ { "name": "easyrdf/easyrdf", - "version": "0.9.x-dev", + "version": "0.9.1", "source": { "type": "git", "url": "https://github.com/njh/easyrdf.git", @@ -71,16 +71,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "dev-master", + "version": "6.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b1a96f6134f69cb41f8538d3a6491f4bb1dbab78" + "reference": "d094e337976dff9d8e2424e8485872194e768662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b1a96f6134f69cb41f8538d3a6491f4bb1dbab78", - "reference": "b1a96f6134f69cb41f8538d3a6491f4bb1dbab78", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", + "reference": "d094e337976dff9d8e2424e8485872194e768662", "shasum": "" }, "require": { @@ -129,7 +129,7 @@ "rest", "web service" ], - "time": "2016-05-08 19:39:56" + "time": "2016-03-21 20:02:09" }, { "name": "guzzlehttp/promises", @@ -299,16 +299,16 @@ }, { "name": "islandora/crayfish", - "version": "0.0.2", + "version": "0.0.3", "source": { "type": "git", "url": "https://github.com/Islandora-CLAW/Crayfish.git", - "reference": "448cc3ae9b69f543ce750eae9c8aa65522aa5c17" + "reference": "41ba8cf02b446b2aa4fa4d42c59ad3afe250d99f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish/zipball/448cc3ae9b69f543ce750eae9c8aa65522aa5c17", - "reference": "448cc3ae9b69f543ce750eae9c8aa65522aa5c17", + "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish/zipball/41ba8cf02b446b2aa4fa4d42c59ad3afe250d99f", + "reference": "41ba8cf02b446b2aa4fa4d42c59ad3afe250d99f", "shasum": "" }, "require": { @@ -321,7 +321,8 @@ }, "require-dev": { "phpunit/phpunit": "^4.8", - "squizlabs/php_codesniffer": "^2.0@dev" + "squizlabs/php_codesniffer": "^2.0@dev", + "symfony/browser-kit": "^3.0" }, "type": "library", "autoload": { @@ -357,7 +358,7 @@ ], "description": "Top level container for the various Islandora CLAW microservices, lovingly known as Crayfish.", "homepage": "http://islandora.ca/CLAW", - "time": "2016-05-19 15:44:15" + "time": "2016-05-26 16:53:30" }, { "name": "ml/iri", @@ -455,6 +456,59 @@ ], "time": "2016-01-17 17:39:22" }, + { + "name": "moust/silex-cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/moust/silex-cache-service-provider.git", + "reference": "da11e90e99d6a7f98d031ade548ba34519640f0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moust/silex-cache-service-provider/zipball/da11e90e99d6a7f98d031ade548ba34519640f0a", + "reference": "da11e90e99d6a7f98d031ade548ba34519640f0a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7", + "silex/silex": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Moust\\Silex": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Quentin Aupetit", + "email": "qaupetit@gmail.com" + } + ], + "description": "Cache service provider for Silex application", + "keywords": [ + "cache", + "library", + "provider", + "service", + "silex" + ], + "time": "2016-03-24 13:13:31" + }, { "name": "paragonie/random_compat", "version": "v2.0.2", @@ -505,16 +559,16 @@ }, { "name": "pimple/pimple", - "version": "1.1.x-dev", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", - "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85" + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", - "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", "shasum": "" }, "require": { @@ -547,11 +601,11 @@ "container", "dependency injection" ], - "time": "2014-04-20 07:24:09" + "time": "2013-11-22 08:30:29" }, { "name": "psr/http-message", - "version": "dev-master", + "version": "1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", @@ -600,30 +654,22 @@ }, { "name": "psr/log", - "version": "dev-master", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d8e60a5619fff77f9669da8997697443ef1a1d7e" + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d8e60a5619fff77f9669da8997697443ef1a1d7e", - "reference": "d8e60a5619fff77f9669da8997697443ef1a1d7e", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "php": ">=5.3.0" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "psr-0": { + "Psr\\Log\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -637,17 +683,16 @@ } ], "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], - "time": "2016-01-06 21:40:42" + "time": "2012-12-21 11:40:51" }, { "name": "ramsey/uuid", - "version": "dev-master", + "version": "3.4.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", @@ -727,16 +772,16 @@ }, { "name": "silex/silex", - "version": "1.3.x-dev", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "142189672963a5dde679685a999b71fc45752611" + "reference": "374c7e04040a6f781c90f7d746726a5daa78e783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/142189672963a5dde679685a999b71fc45752611", - "reference": "142189672963a5dde679685a999b71fc45752611", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/374c7e04040a6f781c90f7d746726a5daa78e783", + "reference": "374c7e04040a6f781c90f7d746726a5daa78e783", "shasum": "" }, "require": { @@ -800,20 +845,20 @@ "keywords": [ "microframework" ], - "time": "2016-05-16 17:51:55" + "time": "2016-01-06 14:59:35" }, { "name": "symfony/config", - "version": "dev-master", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "79ab1a8f4988972a349e2cdcda1b6951a85659c1" + "reference": "048dc47e07f92333203c3b7045868bbc864fc40e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/79ab1a8f4988972a349e2cdcda1b6951a85659c1", - "reference": "79ab1a8f4988972a349e2cdcda1b6951a85659c1", + "url": "https://api.github.com/repos/symfony/config/zipball/048dc47e07f92333203c3b7045868bbc864fc40e", + "reference": "048dc47e07f92333203c3b7045868bbc864fc40e", "shasum": "" }, "require": { @@ -826,7 +871,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -853,20 +898,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-05-13 18:13:23" + "time": "2016-05-20 11:48:17" }, { "name": "symfony/debug", - "version": "dev-master", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "7f932c43491d7d0f33308c880a2ad4f100804307" + "reference": "26786e21ee0344f99629215ead5f0d6f18cdc267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7f932c43491d7d0f33308c880a2ad4f100804307", - "reference": "7f932c43491d7d0f33308c880a2ad4f100804307", + "url": "https://api.github.com/repos/symfony/debug/zipball/26786e21ee0344f99629215ead5f0d6f18cdc267", + "reference": "26786e21ee0344f99629215ead5f0d6f18cdc267", "shasum": "" }, "require": { @@ -883,7 +928,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -910,20 +955,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-05-13 18:13:23" + "time": "2016-06-06 15:08:54" }, { "name": "symfony/event-dispatcher", - "version": "3.0.x-dev", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "807dde98589f9b2b00624dca326740380d78dbbc" + "reference": "2bd63cc8b94882084565d2ec3fae5b8d6878398b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/807dde98589f9b2b00624dca326740380d78dbbc", - "reference": "807dde98589f9b2b00624dca326740380d78dbbc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2bd63cc8b94882084565d2ec3fae5b8d6878398b", + "reference": "2bd63cc8b94882084565d2ec3fae5b8d6878398b", "shasum": "" }, "require": { @@ -970,20 +1015,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-05-05 06:56:13" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/filesystem", - "version": "dev-master", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "ae26c574678c9494f3a6fdbd790ff26f8b8846c0" + "reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ae26c574678c9494f3a6fdbd790ff26f8b8846c0", - "reference": "ae26c574678c9494f3a6fdbd790ff26f8b8846c0", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5751e80d6f94b7c018f338a4a7be0b700d6f3058", + "reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058", "shasum": "" }, "require": { @@ -992,7 +1037,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1019,20 +1064,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-05-13 18:13:23" + "time": "2016-04-12 18:27:47" }, { "name": "symfony/http-foundation", - "version": "3.0.x-dev", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7cb53fb8f6b8150dd07d9710922b21ba6bf6d90c" + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7cb53fb8f6b8150dd07d9710922b21ba6bf6d90c", - "reference": "7cb53fb8f6b8150dd07d9710922b21ba6bf6d90c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d268a643884f85e91d6ba11ca68de96833f3f6e5", + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5", "shasum": "" }, "require": { @@ -1072,20 +1117,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-05-13 18:03:36" + "time": "2016-06-06 11:33:26" }, { "name": "symfony/http-kernel", - "version": "3.0.x-dev", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "80001c27501d33a46d2fff4f4615358612d87b1c" + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/80001c27501d33a46d2fff4f4615358612d87b1c", - "reference": "80001c27501d33a46d2fff4f4615358612d87b1c", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", "shasum": "" }, "require": { @@ -1154,11 +1199,11 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-05-11 13:57:40" + "time": "2016-06-06 16:52:35" }, { "name": "symfony/polyfill-mbstring", - "version": "dev-master", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -1217,16 +1262,16 @@ }, { "name": "symfony/routing", - "version": "3.0.x-dev", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3" + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a6cd168310066176599442aa21f5da86c3f8e0b3", - "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3", + "url": "https://api.github.com/repos/symfony/routing/zipball/c780454838a1131adc756d737a4b4cc1d18f8c64", + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64", "shasum": "" }, "require": { @@ -1288,20 +1333,20 @@ "uri", "url" ], - "time": "2016-05-03 12:23:49" + "time": "2016-05-30 06:58:27" }, { "name": "symfony/yaml", - "version": "dev-master", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "641bbd0fc1b671f896f7815169587dced3588f5c" + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/641bbd0fc1b671f896f7815169587dced3588f5c", - "reference": "641bbd0fc1b671f896f7815169587dced3588f5c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", "shasum": "" }, "require": { @@ -1310,7 +1355,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1337,20 +1382,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-05-14 15:06:20" + "time": "2016-06-14 11:18:07" }, { "name": "twig/twig", - "version": "1.x-dev", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "71ad9ff322e9ef99465ccc26f704d706d76e0eea" + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/71ad9ff322e9ef99465ccc26f704d706d76e0eea", - "reference": "71ad9ff322e9ef99465ccc26f704d706d76e0eea", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", "shasum": "" }, "require": { @@ -1398,22 +1443,22 @@ "keywords": [ "templating" ], - "time": "2016-05-13 19:46:43" + "time": "2016-05-30 09:11:59" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "dev-master", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a" + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a", - "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, "require": { @@ -1454,41 +1499,138 @@ "constructor", "instantiate" ], - "time": "2016-03-31 10:24:22" + "time": "2015-06-14 21:17:01" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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-06-10 09:48:41" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -1500,34 +1642,34 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-06-10 07:14:17" }, { "name": "phpspec/prophecy", - "version": "dev-master", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "7ca4182b3acbd19ebbf3ced4dfee12487d9c05aa" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/7ca4182b3acbd19ebbf3ced4dfee12487d9c05aa", - "reference": "7ca4182b3acbd19ebbf3ced4dfee12487d9c05aa", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1", - "sebastian/recursion-context": "~1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { @@ -1565,11 +1707,11 @@ "spy", "stub" ], - "time": "2016-05-09 09:25:40" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.x-dev", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", @@ -1631,7 +1773,7 @@ }, { "name": "phpunit/php-file-iterator", - "version": "dev-master", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", @@ -1763,16 +1905,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "dev-master", + "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644" + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cab6c6fefee93d7b7c3a01292a0fe0884ea66644", - "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "shasum": "" }, "require": { @@ -1808,11 +1950,11 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-23 14:46:55" + "time": "2015-09-15 10:49:45" }, { "name": "phpunit/phpunit", - "version": "4.8.x-dev", + "version": "4.8.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", @@ -1884,7 +2026,7 @@ }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.x-dev", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", @@ -1940,7 +2082,7 @@ }, { "name": "sebastian/comparator", - "version": "dev-master", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", @@ -2004,7 +2146,7 @@ }, { "name": "sebastian/diff", - "version": "dev-master", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", @@ -2056,7 +2198,7 @@ }, { "name": "sebastian/environment", - "version": "dev-master", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", @@ -2106,16 +2248,16 @@ }, { "name": "sebastian/exporter", - "version": "dev-master", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f88f8936517d54ae6d589166810877fb2015d0a2" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f88f8936517d54ae6d589166810877fb2015d0a2", - "reference": "f88f8936517d54ae6d589166810877fb2015d0a2", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -2169,7 +2311,7 @@ "export", "exporter" ], - "time": "2015-08-09 04:23:41" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/global-state", @@ -2224,16 +2366,16 @@ }, { "name": "sebastian/recursion-context", - "version": "dev-master", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7", - "reference": "7ff5b1b3dcc55b8ab8ae61ef99d4730940856ee7", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -2273,7 +2415,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-01-28 05:39:29" + "time": "2015-11-11 19:50:13" }, { "name": "sebastian/version", @@ -2316,12 +2458,12 @@ "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "0434c489d21e402199fb0b4ab581af5009cb706d" + "reference": "00b22c705e694d4165728383673d7307112519a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/0434c489d21e402199fb0b4ab581af5009cb706d", - "reference": "0434c489d21e402199fb0b4ab581af5009cb706d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/00b22c705e694d4165728383673d7307112519a4", + "reference": "00b22c705e694d4165728383673d7307112519a4", "shasum": "" }, "require": { @@ -2386,12 +2528,62 @@ "phpcs", "standards" ], - "time": "2016-05-12 04:41:00" + "time": "2016-06-14 22:46:27" + }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": { + "moust/silex-cache": 20, "squizlabs/php_codesniffer": 20 }, "prefer-stable": false, diff --git a/src/CollectionService/Controller/CollectionController.php b/src/CollectionService/Controller/CollectionController.php index 26d13ed..8e9d541 100644 --- a/src/CollectionService/Controller/CollectionController.php +++ b/src/CollectionService/Controller/CollectionController.php @@ -176,7 +176,7 @@ public function addMember(Application $app, Request $request, $id, $member) $urlRoute = $request->getUriForPath('/islandora/resource/'); - $members_uri = $app['islandora.idToUri']($member); + $members_uri = $app['islandora.idToUri']($member, $request); if (is_a($members_uri, 'Symfony\Component\HttpFoundation\Response')) { return $members_uri; } @@ -188,7 +188,7 @@ public function addMember(Application $app, Request $request, $id, $member) ) ); - $fullUri = $app['islandora.idToUri']($id); + $fullUri = $app['islandora.idToUri']($id, $request); if (is_a($fullUri, 'Symfony\Component\HttpFoundation\Response')) { return $fullUri; } @@ -206,6 +206,7 @@ public function addMember(Application $app, Request $request, $id, $member) ); $newRequest->headers->set('Content-type', 'application/ld+json'); $newRequest->headers->set('Content-Length', strlen($members_proxy_rdf)); + $app['islandora.hostHeaderNormalize']($newRequest); $response = $app['islandora.resourcecontroller']->post($app, $newRequest, $fullUri); if (201 == $response->getStatusCode()) { return new Response($response->getBody(), 201, $response->getHeaders()); @@ -235,12 +236,12 @@ public function removeMember(Application $app, Request $request, $id, $member) $urlRoute = $request->getUriForPath('/islandora/resource/'); - $collection_uri = $app['islandora.idToUri']($id); + $collection_uri = $app['islandora.idToUri']($id, $request); if (is_object($collection_uri)) { return $collection_uri; } - $member_uri = $app['islandora.idToUri']($member); + $member_uri = $app['islandora.idToUri']($member, $request); if (is_object($member_uri)) { return $member_uri; } diff --git a/src/index.php b/src/index.php index 561e224..0466888 100644 --- a/src/index.php +++ b/src/index.php @@ -27,6 +27,16 @@ __DIR__ . '/CollectionService/templates', ), )); +// Cache for TransactionService +$app->register(new \Moust\Silex\Provider\CacheServiceProvider(), array( + 'caches.options' => array( + 'filesystem' => array( + 'driver' => 'file', + 'cache_dir' => '/tmp', + ), + ), +)); + $islandoraCollectionServiceProvider = new CollectionServiceProvider; $islandoraCrayfishProvider = new CrayfishProvider;