diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3ec616bd2..37e1be0ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,10 @@ Contributing to the LaunchDarkly SDK for PHP ================================================ -We encourage pull-requests and other contributions from the community. We've also published an [SDK contributor's guide](http://docs.launchdarkly.com/v1.0/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. \ No newline at end of file +We encourage pull-requests and other contributions from the community. We've also published an [SDK contributor's guide](http://docs.launchdarkly.com/v1.0/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. + + +This can help with getting php 5.3 on your mac: https://github.com/Homebrew/homebrew-php + +To see composer dependency graph: +`php composer.phar show -i -t` \ No newline at end of file diff --git a/circle.yml b/circle.yml index 77aae221c..ad6dd4f54 100644 --- a/circle.yml +++ b/circle.yml @@ -1,7 +1,10 @@ machine: php: - version: 5.4.37 + version: 5.3.25 test: override: + # syntax check php files + - find ./src -name "*.php" -type f -print0 | xargs -0 -I {} php -l {} + - find ./tests -name "*.php" -type f -print0 | xargs -0 -I {} php -l {} - vendor/bin/phpunit tests diff --git a/composer.json b/composer.json index 3c109221f..621414dce 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,10 @@ } ], "require": { - "php": ">=5.3", + "php": "~5.3", "guzzle/guzzle": "dev-master#ecb935d2d0ecd8cddae4dcfb90515cac5e2cb023", - "psr/log": "1.0.0" + "psr/log": "1.0.0", + "justinrainbow/json-schema": "v1.6.0" }, "require-dev": { "phpunit/phpunit": "4.8.26", diff --git a/composer.lock b/composer.lock index b04fe4754..46414fb6e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "74e1b7bb93bb1571d1ab0153920fa0a9", - "content-hash": "8a18d98bba3bb72ac1d72ac4264d976b", + "hash": "30633a946a2f7c18c7cd3bd7492dadc4", + "content-hash": "3a1f29c4c3c6857e353d5e518bc9db53", "packages": [ { "name": "guzzle/guzzle", @@ -100,6 +100,72 @@ ], "time": "2015-12-08 23:21:31" }, + { + "name": "justinrainbow/json-schema", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", + "reference": "f9e27c3e202faf14fd581ef41355d83bb4b7eb7d", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-01-06 14:37:04" + }, { "name": "psr/log", "version": "1.0.0", @@ -140,16 +206,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" + "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/25c576abd4e0f212e678fe8b2bd9a9a98c7ea934", + "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934", "shasum": "" }, "require": { @@ -196,7 +262,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-07-28 16:56:28" + "time": "2016-10-13 01:43:15" } ], "packages-dev": [ @@ -496,18 +562,21 @@ }, { "name": "erusev/parsedown", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", "autoload": { "psr-0": { @@ -531,7 +600,7 @@ "markdown", "parser" ], - "time": "2015-10-04 16:44:32" + "time": "2016-11-02 15:56:58" }, { "name": "herrera-io/json", @@ -580,8 +649,7 @@ { "name": "Kevin Herrera", "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" + "homepage": "http://kevin.herrera.io" } ], "description": "A library for simplifying JSON linting and validation.", @@ -640,8 +708,7 @@ { "name": "Kevin Herrera", "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" + "homepage": "http://kevin.herrera.io" } ], "description": "A library for self-updating Phars.", @@ -741,41 +808,36 @@ }, { "name": "jms/serializer", - "version": "1.1.0", + "version": "0.16.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" + "reference": "c8a171357ca92b6706e395c757f334902d430ea9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", + "reference": "c8a171357ca92b6706e395c757f334902d430ea9", "shasum": "" }, "require": { "doctrine/annotations": "1.*", - "doctrine/instantiator": "~1.0.3", "jms/metadata": "~1.1", "jms/parser-lib": "1.*", - "php": ">=5.4.0", + "php": ">=5.3.2", "phpcollection/phpcollection": "~0.1" }, - "conflict": { - "twig/twig": "<1.12" - }, "require-dev": { "doctrine/orm": "~2.1", "doctrine/phpcr-odm": "~1.0.1", "jackalope/jackalope-doctrine-dbal": "1.0.*", - "phpunit/phpunit": "~4.0", "propel/propel1": "~1.7", "symfony/filesystem": "2.*", "symfony/form": "~2.1", "symfony/translation": "~2.0", "symfony/validator": "~2.0", "symfony/yaml": "2.*", - "twig/twig": "~1.12|~2.0" + "twig/twig": ">=1.8,<2.0-dev" }, "suggest": { "symfony/yaml": "Required if you'd like to serialize data to YAML format." @@ -783,7 +845,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "0.15-dev" } }, "autoload": { @@ -797,8 +859,10 @@ ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -810,73 +874,7 @@ "serialization", "xml" ], - "time": "2015-10-27 09:24:41" - }, - { - "name": "justinrainbow/json-schema", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", - "shasum": "" - }, - "require": { - "php": ">=5.3.29" - }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2016-01-25 15:43:01" + "time": "2014-03-18 08:39:00" }, { "name": "kherge/version", @@ -913,8 +911,7 @@ "authors": [ { "name": "Kevin Herrera", - "email": "me@kevingh.com", - "homepage": "http://www.kevingh.com/" + "email": "me@kevingh.com" } ], "description": "A parsing and comparison library for semantic versioning.", @@ -1420,16 +1417,16 @@ }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "v1.6.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", "shasum": "" }, "require": { @@ -1437,10 +1434,11 @@ "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "sebastian/recursion-context": "^1.0|^2.0" }, "require-dev": { - "phpspec/phpspec": "^2.0" + "phpspec/phpspec": "^2.0", + "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", "extra": { @@ -1478,7 +1476,7 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2016-11-21 14:58:47" }, { "name": "phpunit/php-code-coverage", @@ -1676,16 +1674,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", "shasum": "" }, "require": { @@ -1721,7 +1719,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2016-11-15 14:06:22" }, { "name": "phpunit/phpunit", @@ -1949,22 +1947,22 @@ }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f", + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -2009,7 +2007,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2016-11-19 09:18:40" }, { "name": "sebastian/diff", @@ -2321,16 +2319,16 @@ }, { "name": "seld/jsonlint", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "e827b5254d3e58c736ea2c5616710983d80b0b70" + "reference": "19495c181d6d53a0a13414154e52817e3b504189" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e827b5254d3e58c736ea2c5616710983d80b0b70", - "reference": "e827b5254d3e58c736ea2c5616710983d80b0b70", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/19495c181d6d53a0a13414154e52817e3b504189", + "reference": "19495c181d6d53a0a13414154e52817e3b504189", "shasum": "" }, "require": { @@ -2363,20 +2361,20 @@ "parser", "validator" ], - "time": "2016-09-14 15:17:56" + "time": "2016-11-14 17:59:58" }, { "name": "symfony/config", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84" + "reference": "1361bc4e66f97b6202ae83f4190e962c624b5e61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/005bf10c156335ede2e89fb9a9ee10a0b742bc84", - "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84", + "url": "https://api.github.com/repos/symfony/config/zipball/1361bc4e66f97b6202ae83f4190e962c624b5e61", + "reference": "1361bc4e66f97b6202ae83f4190e962c624b5e61", "shasum": "" }, "require": { @@ -2416,24 +2414,25 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-08-16 14:56:08" + "time": "2016-11-03 07:52:58" }, { "name": "symfony/console", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90" + "reference": "a871ba00e0f604dceac64c56c27f99fbeaf4854e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3d3e4fa5f0614c8e45220e5de80332322e33bd90", - "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90", + "url": "https://api.github.com/repos/symfony/console/zipball/a871ba00e0f604dceac64c56c27f99fbeaf4854e", + "reference": "a871ba00e0f604dceac64c56c27f99fbeaf4854e", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/debug": "~2.7,>=2.7.2|~3.0.0", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -2476,20 +2475,77 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-11-15 23:02:12" + }, + { + "name": "symfony/debug", + "version": "v2.8.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "62a68f640456f6761d752c62d81631428ef0d8a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/62a68f640456f6761d752c62d81631428ef0d8a1", + "reference": "62a68f640456f6761d752c62d81631428ef0d8a1", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-11-15 12:53:17" }, { "name": "symfony/filesystem", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf" + "reference": "a3784111af9f95f102b6411548376e1ae7c93898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/44b499521defddf2eae17a18c811bbdae4f98bdf", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a3784111af9f95f102b6411548376e1ae7c93898", + "reference": "a3784111af9f95f102b6411548376e1ae7c93898", "shasum": "" }, "require": { @@ -2525,20 +2581,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-10-18 04:28:30" }, { "name": "symfony/finder", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7" + "reference": "0023b024363dfc0cd21262e556f25a291fe8d7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/bec5533e6ed650547d6ec8de4b541dc9929066f7", - "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7", + "url": "https://api.github.com/repos/symfony/finder/zipball/0023b024363dfc0cd21262e556f25a291fe8d7fd", + "reference": "0023b024363dfc0cd21262e556f25a291fe8d7fd", "shasum": "" }, "require": { @@ -2574,20 +2630,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-08-26 11:57:43" + "time": "2016-11-03 07:52:58" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { @@ -2599,7 +2655,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2633,20 +2689,20 @@ "portable", "shim" ], - "time": "2016-05-18 14:26:46" + "time": "2016-11-14 01:06:16" }, { "name": "symfony/process", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "05a03ed27073638658cab9405d99a67dd1014987" + "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/05a03ed27073638658cab9405d99a67dd1014987", - "reference": "05a03ed27073638658cab9405d99a67dd1014987", + "url": "https://api.github.com/repos/symfony/process/zipball/024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f", + "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f", "shasum": "" }, "require": { @@ -2682,11 +2738,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-09-29 14:03:54" }, { "name": "symfony/stopwatch", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -2735,16 +2791,16 @@ }, { "name": "symfony/translation", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "bf0ff95faa9b6c0708efc1986255e3608d0ed3c7" + "reference": "edbe67e8f729885b55421d5cc58223d48540df07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/bf0ff95faa9b6c0708efc1986255e3608d0ed3c7", - "reference": "bf0ff95faa9b6c0708efc1986255e3608d0ed3c7", + "url": "https://api.github.com/repos/symfony/translation/zipball/edbe67e8f729885b55421d5cc58223d48540df07", + "reference": "edbe67e8f729885b55421d5cc58223d48540df07", "shasum": "" }, "require": { @@ -2795,20 +2851,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-11-18 21:10:01" }, { "name": "symfony/validator", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "53b1b1d3f7550e4b1e365dbad39a0b6c60bfcf85" + "reference": "c4ef882117461a4151064ad16c5d638dd1c70b9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/53b1b1d3f7550e4b1e365dbad39a0b6c60bfcf85", - "reference": "53b1b1d3f7550e4b1e365dbad39a0b6c60bfcf85", + "url": "https://api.github.com/repos/symfony/validator/zipball/c4ef882117461a4151064ad16c5d638dd1c70b9e", + "reference": "c4ef882117461a4151064ad16c5d638dd1c70b9e", "shasum": "" }, "require": { @@ -2868,20 +2924,20 @@ ], "description": "Symfony Validator Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-11-18 21:10:01" }, { "name": "symfony/yaml", - "version": "v2.8.11", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", "shasum": "" }, "require": { @@ -2917,20 +2973,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 01:57:56" + "time": "2016-11-14 16:15:57" }, { "name": "twig/twig", - "version": "v1.25.0", + "version": "v1.28.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6" + "reference": "fff80c4a7ae1d47a81dfec10c76cbcb939170b45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f16a634ab08d87e520da5671ec52153d627f10f6", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/fff80c4a7ae1d47a81dfec10c76cbcb939170b45", + "reference": "fff80c4a7ae1d47a81dfec10c76cbcb939170b45", "shasum": "" }, "require": { @@ -2943,7 +2999,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.25-dev" + "dev-master": "1.28-dev" } }, "autoload": { @@ -2978,7 +3034,7 @@ "keywords": [ "templating" ], - "time": "2016-09-21 23:05:12" + "time": "2016-11-19 05:52:49" }, { "name": "zendframework/zend-cache", @@ -3650,7 +3706,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3" + "php": "5.3.*" }, "platform-dev": [] } diff --git a/src/LaunchDarkly/Clause.php b/src/LaunchDarkly/Clause.php index adf01615e..7c319f5e4 100644 --- a/src/LaunchDarkly/Clause.php +++ b/src/LaunchDarkly/Clause.php @@ -12,7 +12,7 @@ class Clause { /** @var bool */ private $_negate = false; - private function __construct($attribute, $op, array $values, $negate) { + public function __construct($attribute, $op, array $values, $negate) { $this->_attribute = $attribute; $this->_op = $op; $this->_values = $values; diff --git a/src/LaunchDarkly/FeatureFlag.php b/src/LaunchDarkly/FeatureFlag.php index b20ced40b..abc446af7 100644 --- a/src/LaunchDarkly/FeatureFlag.php +++ b/src/LaunchDarkly/FeatureFlag.php @@ -27,7 +27,7 @@ class FeatureFlag { /** @var bool */ protected $_deleted = false; - protected function __construct($key, + public function __construct($key, $version, $on, array $prerequisites, @@ -209,7 +209,7 @@ public function isDeleted() { class EvalResult { private $_value = null; /** @var array */ - private $_prerequisiteEvents = []; + private $_prerequisiteEvents = array(); /** * EvalResult constructor. @@ -242,7 +242,7 @@ class WeightedVariation { /** @var int */ private $_weight = null; - private function __construct($variation, $weight) { + public function __construct($variation, $weight) { $this->_variation = $variation; $this->_weight = $weight; } @@ -274,7 +274,7 @@ class Target { /** @var int */ private $_variation = null; - protected function __construct(array $values, $variation) { + public function __construct(array $values, $variation) { $this->_values = $values; $this->_variation = $variation; } @@ -306,7 +306,7 @@ class Prerequisite { /** @var int */ private $_variation = null; - protected function __construct($key, $variation) { + public function __construct($key, $variation) { $this->_key = $key; $this->_variation = $variation; } @@ -338,7 +338,7 @@ class Rollout { /** @var string */ private $_bucketBy = null; - protected function __construct(array $variations, $bucketBy) { + public function __construct(array $variations, $bucketBy) { $this->_variations = $variations; $this->_bucketBy = $bucketBy; } diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index a720df50f..2fdd90ba4 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -64,10 +64,10 @@ public function __construct($sdkKey, $options = array()) { } if (!isset($options['timeout'])) { - $options['timeout'] = 3; + $options['timeout'] = 10; } if (!isset($options['connect_timeout'])) { - $options['connect_timeout'] = 3; + $options['connect_timeout'] = 10; } if (!isset($options['capacity'])) { @@ -75,7 +75,7 @@ public function __construct($sdkKey, $options = array()) { } if (!isset($options['logger'])) { - $logger = new Logger("LaunchDarkly", [new ErrorLogHandler()]); + $logger = new Logger("LaunchDarkly", array(new ErrorLogHandler())); $options['logger'] = $logger; } $this->_logger = $options['logger']; @@ -229,15 +229,12 @@ public function allFlags($user) { return null; } - /** - * @param $flag FeatureFlag - * @return mixed|null - */ - $eval = function($flag) use($user) { - return $flag->evaluate($user, $this->_featureRequester)->getValue(); - }; + $results = array(); - return array_map($eval, $flags); + foreach ($flags as $flag) + $results[$flag->getKey()] = $flag->evaluate($user, $this->_featureRequester)->getValue(); + + return $results; } /** Generates an HMAC sha256 hash for use in Secure mode: https://github.com/launchdarkly/js-client#secure-mode diff --git a/src/LaunchDarkly/Rule.php b/src/LaunchDarkly/Rule.php index c2ac20d43..f2e9cabf7 100644 --- a/src/LaunchDarkly/Rule.php +++ b/src/LaunchDarkly/Rule.php @@ -6,7 +6,7 @@ class Rule extends VariationOrRollout { /** @var Clause[] */ private $_clauses = array(); - protected function __construct($variation, $rollout, array $clauses) { + public function __construct($variation, $rollout, array $clauses) { parent::__construct($variation, $rollout); $this->_clauses = $clauses; } diff --git a/src/LaunchDarkly/VariationOrRollout.php b/src/LaunchDarkly/VariationOrRollout.php index e1ff63b60..f7ded0f32 100644 --- a/src/LaunchDarkly/VariationOrRollout.php +++ b/src/LaunchDarkly/VariationOrRollout.php @@ -11,7 +11,7 @@ class VariationOrRollout { /** @var Rollout | null */ private $_rollout = null; - protected function __construct($variation, $rollout) { + public function __construct($variation, $rollout) { $this->_variation = $variation; $this->_rollout = $rollout; } diff --git a/tests/LDClientTest.php b/tests/LDClientTest.php index 726410c0c..bac929161 100644 --- a/tests/LDClientTest.php +++ b/tests/LDClientTest.php @@ -1,7 +1,6 @@ true]); + $client = new LDClient("secret", array('offline' => true)); $user = new LDUser("Message"); $this->assertEquals("aa747c502a898200f9e4fa21bac68136f886a0e27aec70ba06daf2e2a5cb5597", $client->secureModeHash($user)); } diff --git a/tests/OperatorsTest.php b/tests/OperatorsTest.php index bb25ed423..0f8b83a59 100644 --- a/tests/OperatorsTest.php +++ b/tests/OperatorsTest.php @@ -47,6 +47,6 @@ public function testParseTime() { $this->assertEquals(null, Operators::parseTime("NOT A REAL TIMESTAMP")); - $this->assertEquals(null, Operators::parseTime([])); + $this->assertEquals(null, Operators::parseTime(array())); } } \ No newline at end of file