From 462707fb2f83b15f3ff490ef54d83213d4d8cb8a Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 10:59:52 -0800 Subject: [PATCH 01/18] Fix some php 5.3-incompatible syntax --- composer.json | 2 +- src/LaunchDarkly/LDClient.php | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 3c109221f..a659b3fda 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=5.3", + "php": "==5.3", "guzzle/guzzle": "dev-master#ecb935d2d0ecd8cddae4dcfb90515cac5e2cb023", "psr/log": "1.0.0" }, diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index a720df50f..ad745dee3 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -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) + array_push($results, $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 From b30fc18feb8e4ac08292179f393cf0e88b9cd1d2 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:03:52 -0800 Subject: [PATCH 02/18] change php version in circle file --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 77aae221c..747a45d25 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: php: - version: 5.4.37 + version: 5.3.25 test: override: From 4301b2900abbdc7333767372eb2fa2dabac45f6a Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:06:28 -0800 Subject: [PATCH 03/18] attempt to use php 5.3.29 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 747a45d25..22fdc539d 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: php: - version: 5.3.25 + version: 5.3.29 test: override: From 1736368e56a5463fe1324db02220e3c4011e0174 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:14:18 -0800 Subject: [PATCH 04/18] revert version back to 5.3.25 --- circle.yml | 2 +- composer.lock | 319 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 191 insertions(+), 130 deletions(-) diff --git a/circle.yml b/circle.yml index 22fdc539d..747a45d25 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: php: - version: 5.3.29 + version: 5.3.25 test: override: diff --git a/composer.lock b/composer.lock index b04fe4754..20a52b090 100644 --- a/composer.lock +++ b/composer.lock @@ -140,16 +140,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 +196,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": [ @@ -320,35 +320,35 @@ }, { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^5.6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -384,7 +384,7 @@ "docblock", "parser" ], - "time": "2015-08-31 12:32:49" + "time": "2016-10-24 11:45:47" }, { "name": "doctrine/instantiator", @@ -496,18 +496,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 +534,7 @@ "markdown", "parser" ], - "time": "2015-10-04 16:44:32" + "time": "2016-11-02 15:56:58" }, { "name": "herrera-io/json", @@ -580,8 +583,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 +642,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,40 +742,42 @@ }, { "name": "jms/serializer", - "version": "1.1.0", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" + "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b", + "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b", "shasum": "" }, "require": { - "doctrine/annotations": "1.*", - "doctrine/instantiator": "~1.0.3", + "doctrine/annotations": "^1.0", + "doctrine/instantiator": "^1.0.3", "jms/metadata": "~1.1", "jms/parser-lib": "1.*", - "php": ">=5.4.0", - "phpcollection/phpcollection": "~0.1" + "php": ">=5.5.0", + "phpcollection/phpcollection": "~0.1", + "phpoption/phpoption": "^1.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", + "doctrine/phpcr-odm": "^1.3|^2.0", + "ext-pdo_sqlite": "*", + "jackalope/jackalope-doctrine-dbal": "^1.1.5", + "phpunit/phpunit": "^4.8|^5.0", "propel/propel1": "~1.7", - "symfony/filesystem": "2.*", + "symfony/filesystem": "^2.1", "symfony/form": "~2.1", - "symfony/translation": "~2.0", - "symfony/validator": "~2.0", - "symfony/yaml": "2.*", + "symfony/translation": "^2.1", + "symfony/validator": "^2.2", + "symfony/yaml": "^2.1", "twig/twig": "~1.12|~2.0" }, "suggest": { @@ -783,7 +786,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -810,7 +813,7 @@ "serialization", "xml" ], - "time": "2015-10-27 09:24:41" + "time": "2016-11-13 10:20:11" }, { "name": "justinrainbow/json-schema", @@ -913,8 +916,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 +1422,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 +1439,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 +1481,7 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2016-11-21 14:58:47" }, { "name": "phpunit/php-code-coverage", @@ -1676,16 +1679,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 +1724,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2016-11-15 14:06:22" }, { "name": "phpunit/phpunit", @@ -1949,22 +1952,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 +2012,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2016-11-19 09:18:40" }, { "name": "sebastian/diff", @@ -2321,16 +2324,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 +2366,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 +2419,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,29 +2480,86 @@ ], "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": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "shasum": "" + }, + "require": { + "php": ">=5.5.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.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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-07-30 07:22:48" }, { "name": "symfony/filesystem", - "version": "v2.8.11", + "version": "v3.0.9", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf" + "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/44b499521defddf2eae17a18c811bbdae4f98bdf", - "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2da5009d9bacbd91d83486aa1f44c793a8c380d", + "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2525,20 +2586,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-07-20 05:43:46" }, { "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 +2635,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 +2660,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2633,20 +2694,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 +2743,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,30 +2796,30 @@ }, { "name": "symfony/translation", - "version": "v2.8.11", + "version": "v3.0.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "bf0ff95faa9b6c0708efc1986255e3608d0ed3c7" + "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/bf0ff95faa9b6c0708efc1986255e3608d0ed3c7", - "reference": "bf0ff95faa9b6c0708efc1986255e3608d0ed3c7", + "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26", + "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": ">=5.5.9", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/config": "<2.7" + "symfony/config": "<2.8" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8", - "symfony/intl": "~2.4|~3.0.0", - "symfony/yaml": "~2.2|~3.0.0" + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" }, "suggest": { "psr/log": "To use logging capability in translator", @@ -2768,7 +2829,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2795,20 +2856,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-09-06 10:55:00" + "time": "2016-07-30 07:22:48" }, { "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,29 +2929,29 @@ ], "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": "v3.1.7", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" + "reference": "9da375317228e54f4ea1b013b30fa47417e84943" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", - "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/9da375317228e54f4ea1b013b30fa47417e84943", + "reference": "9da375317228e54f4ea1b013b30fa47417e84943", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2917,20 +2978,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 01:57:56" + "time": "2016-11-18 21:05:29" }, { "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 +3004,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.25-dev" + "dev-master": "1.28-dev" } }, "autoload": { @@ -2978,7 +3039,7 @@ "keywords": [ "templating" ], - "time": "2016-09-21 23:05:12" + "time": "2016-11-19 05:52:49" }, { "name": "zendframework/zend-cache", From 3b67e170a8f4ec82ab02c4ade10aeb8b3017bc34 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:30:47 -0800 Subject: [PATCH 05/18] Add syntax check --- CONTRIBUTING.md | 5 ++++- circle.yml | 2 ++ composer.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3ec616bd2..dfcd7a2d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,7 @@ 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 \ No newline at end of file diff --git a/circle.yml b/circle.yml index 747a45d25..b51d71256 100644 --- a/circle.yml +++ b/circle.yml @@ -4,4 +4,6 @@ machine: test: override: + # syntax check php files + - find . -name "*.php" -type f -print0 | xargs -0 -I {} php -l {} - vendor/bin/phpunit tests diff --git a/composer.json b/composer.json index a659b3fda..ca9c90c4c 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": "==5.3", + "php": "5.3.*", "guzzle/guzzle": "dev-master#ecb935d2d0ecd8cddae4dcfb90515cac5e2cb023", "psr/log": "1.0.0" }, From a71e1f4308546f3a62efc1a1181f4333ef0dcf09 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:32:29 -0800 Subject: [PATCH 06/18] Fix more 5.3 syntax --- src/LaunchDarkly/FeatureFlag.php | 2 +- tests/LDClientTest.php | 2 +- tests/OperatorsTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LaunchDarkly/FeatureFlag.php b/src/LaunchDarkly/FeatureFlag.php index b20ced40b..2000c8e72 100644 --- a/src/LaunchDarkly/FeatureFlag.php +++ b/src/LaunchDarkly/FeatureFlag.php @@ -209,7 +209,7 @@ public function isDeleted() { class EvalResult { private $_value = null; /** @var array */ - private $_prerequisiteEvents = []; + private $_prerequisiteEvents = array(); /** * EvalResult constructor. diff --git a/tests/LDClientTest.php b/tests/LDClientTest.php index 726410c0c..7bacf9ee4 100644 --- a/tests/LDClientTest.php +++ b/tests/LDClientTest.php @@ -55,7 +55,7 @@ public function testToggleEvent() { } public function testSecureModeHash() { - $client = new LDClient("secret", ['offline' => 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 From 0f39b53fce96022324cec01ce49780c4fdd8c8b2 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:51:43 -0800 Subject: [PATCH 07/18] reset composer.lock --- CONTRIBUTING.md | 5 +- composer.lock | 139 +++++++++++++++++++++++------------------------- 2 files changed, 71 insertions(+), 73 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dfcd7a2d2..37e1be0ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,4 +4,7 @@ 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. -This can help with getting php 5.3 on your mac: https://github.com/Homebrew/homebrew-php \ No newline at end of file +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/composer.lock b/composer.lock index 20a52b090..0470d9d9b 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": "87026be738dacc906b145c2a63a76108", + "content-hash": "9c8cdd6574aafac8a03fc2478cfeab19", "packages": [ { "name": "guzzle/guzzle", @@ -320,35 +320,35 @@ }, { "name": "doctrine/annotations", - "version": "v1.3.0", + "version": "v1.2.7", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5" + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", - "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": "^5.6 || ^7.0" + "php": ">=5.3.2" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^5.6.1" + "phpunit/phpunit": "4.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -384,7 +384,7 @@ "docblock", "parser" ], - "time": "2016-10-24 11:45:47" + "time": "2015-08-31 12:32:49" }, { "name": "doctrine/instantiator", @@ -742,43 +742,36 @@ }, { "name": "jms/serializer", - "version": "1.4.2", + "version": "0.16.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b" + "reference": "c8a171357ca92b6706e395c757f334902d430ea9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b", - "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", + "reference": "c8a171357ca92b6706e395c757f334902d430ea9", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", - "doctrine/instantiator": "^1.0.3", + "doctrine/annotations": "1.*", "jms/metadata": "~1.1", "jms/parser-lib": "1.*", - "php": ">=5.5.0", - "phpcollection/phpcollection": "~0.1", - "phpoption/phpoption": "^1.1" - }, - "conflict": { - "twig/twig": "<1.12" + "php": ">=5.3.2", + "phpcollection/phpcollection": "~0.1" }, "require-dev": { "doctrine/orm": "~2.1", - "doctrine/phpcr-odm": "^1.3|^2.0", - "ext-pdo_sqlite": "*", - "jackalope/jackalope-doctrine-dbal": "^1.1.5", - "phpunit/phpunit": "^4.8|^5.0", + "doctrine/phpcr-odm": "~1.0.1", + "jackalope/jackalope-doctrine-dbal": "1.0.*", "propel/propel1": "~1.7", - "symfony/filesystem": "^2.1", + "symfony/filesystem": "2.*", "symfony/form": "~2.1", - "symfony/translation": "^2.1", - "symfony/validator": "^2.2", - "symfony/yaml": "^2.1", - "twig/twig": "~1.12|~2.0" + "symfony/translation": "~2.0", + "symfony/validator": "~2.0", + "symfony/yaml": "2.*", + "twig/twig": ">=1.8,<2.0-dev" }, "suggest": { "symfony/yaml": "Required if you'd like to serialize data to YAML format." @@ -786,7 +779,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "0.15-dev" } }, "autoload": { @@ -800,8 +793,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.", @@ -813,7 +808,7 @@ "serialization", "xml" ], - "time": "2016-11-13 10:20:11" + "time": "2014-03-18 08:39:00" }, { "name": "justinrainbow/json-schema", @@ -2484,33 +2479,33 @@ }, { "name": "symfony/debug", - "version": "v3.0.9", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + "reference": "62a68f640456f6761d752c62d81631428ef0d8a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "url": "https://api.github.com/repos/symfony/debug/zipball/62a68f640456f6761d752c62d81631428ef0d8a1", + "reference": "62a68f640456f6761d752c62d81631428ef0d8a1", "shasum": "" }, "require": { - "php": ">=5.5.9", + "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.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0" + "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": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -2537,29 +2532,29 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:22:48" + "time": "2016-11-15 12:53:17" }, { "name": "symfony/filesystem", - "version": "v3.0.9", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d" + "reference": "a3784111af9f95f102b6411548376e1ae7c93898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2da5009d9bacbd91d83486aa1f44c793a8c380d", - "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a3784111af9f95f102b6411548376e1ae7c93898", + "reference": "a3784111af9f95f102b6411548376e1ae7c93898", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -2586,7 +2581,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-07-20 05:43:46" + "time": "2016-10-18 04:28:30" }, { "name": "symfony/finder", @@ -2796,30 +2791,30 @@ }, { "name": "symfony/translation", - "version": "v3.0.9", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26" + "reference": "edbe67e8f729885b55421d5cc58223d48540df07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26", - "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26", + "url": "https://api.github.com/repos/symfony/translation/zipball/edbe67e8f729885b55421d5cc58223d48540df07", + "reference": "edbe67e8f729885b55421d5cc58223d48540df07", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": ">=5.3.9", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.7" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "symfony/config": "~2.8", + "symfony/intl": "~2.4|~3.0.0", + "symfony/yaml": "~2.2|~3.0.0" }, "suggest": { "psr/log": "To use logging capability in translator", @@ -2829,7 +2824,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -2856,7 +2851,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:22:48" + "time": "2016-11-18 21:10:01" }, { "name": "symfony/validator", @@ -2933,25 +2928,25 @@ }, { "name": "symfony/yaml", - "version": "v3.1.7", + "version": "v2.8.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943" + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/9da375317228e54f4ea1b013b30fa47417e84943", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943", + "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -2978,7 +2973,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-11-18 21:05:29" + "time": "2016-11-14 16:15:57" }, { "name": "twig/twig", @@ -3711,7 +3706,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3" + "php": "5.3.29" }, "platform-dev": [] } From ad886a92ed812c7b1657eb3f7eb2342867a4d1e5 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 11:57:14 -0800 Subject: [PATCH 08/18] Changes to make tests pass in php 5.3 --- src/LaunchDarkly/Clause.php | 2 +- src/LaunchDarkly/FeatureFlag.php | 8 ++++---- src/LaunchDarkly/Rule.php | 2 +- src/LaunchDarkly/VariationOrRollout.php | 2 +- tests/LDClientTest.php | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) 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 2000c8e72..96958a37c 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, @@ -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; } @@ -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/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 7bacf9ee4..bac929161 100644 --- a/tests/LDClientTest.php +++ b/tests/LDClientTest.php @@ -1,7 +1,6 @@ Date: Tue, 22 Nov 2016 12:02:22 -0800 Subject: [PATCH 09/18] Change version to 5.3.29 --- circle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index b51d71256..6f4ed0117 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,7 @@ machine: php: - version: 5.3.25 + #TODO: This breaks circle since this version isn't included. Figure out how to install php 5.3.29 + version: 5.3.29 test: override: From 7945de9761708bd86aecc25d3195d866a3fde2a3 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 12:59:54 -0800 Subject: [PATCH 10/18] Change version to 5.3.* --- composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.lock b/composer.lock index 0470d9d9b..1c7b71bda 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": "87026be738dacc906b145c2a63a76108", - "content-hash": "9c8cdd6574aafac8a03fc2478cfeab19", + "hash": "53dc387204b998d4524acc6716e837de", + "content-hash": "f6070ab926bdfa18ed219268e501715e", "packages": [ { "name": "guzzle/guzzle", @@ -3706,7 +3706,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "5.3.29" + "php": "5.3.*" }, "platform-dev": [] } From 9288170d7819646698c8fc71618a2832a781b312 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 13:00:19 -0800 Subject: [PATCH 11/18] Change circle version back to 5.3.25 --- circle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 6f4ed0117..b51d71256 100644 --- a/circle.yml +++ b/circle.yml @@ -1,7 +1,6 @@ machine: php: - #TODO: This breaks circle since this version isn't included. Figure out how to install php 5.3.29 - version: 5.3.29 + version: 5.3.25 test: override: From 90b52a6ac558b631ca8a37ee3861afeaeb8b9603 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 13:08:12 -0800 Subject: [PATCH 12/18] Add dependency to make 5.3.25 build happy --- composer.json | 3 +- composer.lock | 136 +++++++++++++++++++++++++------------------------- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/composer.json b/composer.json index ca9c90c4c..aa71f8175 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "require": { "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 1c7b71bda..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": "53dc387204b998d4524acc6716e837de", - "content-hash": "f6070ab926bdfa18ed219268e501715e", + "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", @@ -810,72 +876,6 @@ ], "time": "2014-03-18 08:39:00" }, - { - "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" - }, { "name": "kherge/version", "version": "1.0.1", From 3b69e23bcf67fe5481b25c477aaabbd638d3426b Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 13:11:43 -0800 Subject: [PATCH 13/18] Fix php syntax checker --- circle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index b51d71256..ad6dd4f54 100644 --- a/circle.yml +++ b/circle.yml @@ -5,5 +5,6 @@ machine: test: override: # syntax check php files - - find . -name "*.php" -type f -print0 | xargs -0 -I {} php -l {} + - 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 From 25f0e9d1528b4cdaeba82b1b9bbebb8083b0d7dd Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 15:59:14 -0800 Subject: [PATCH 14/18] Change version to 5.3.20 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index ad6dd4f54..ae37f528e 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: php: - version: 5.3.25 + version: 5.3.20 test: override: From b41ad3adebf100e125427b2df351a42ad02c1c4c Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 16:08:19 -0800 Subject: [PATCH 15/18] Change version to 5.3.25 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index ae37f528e..ad6dd4f54 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: php: - version: 5.3.20 + version: 5.3.25 test: override: From 3efd07e2edd70c8ba9b97ea5e33a94ff340977bf Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 17:26:19 -0800 Subject: [PATCH 16/18] increase timeout, fix allflags() --- src/LaunchDarkly/FeatureFlag.php | 2 +- src/LaunchDarkly/LDClient.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LaunchDarkly/FeatureFlag.php b/src/LaunchDarkly/FeatureFlag.php index 96958a37c..abc446af7 100644 --- a/src/LaunchDarkly/FeatureFlag.php +++ b/src/LaunchDarkly/FeatureFlag.php @@ -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; } diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index ad745dee3..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'])) { @@ -232,7 +232,7 @@ public function allFlags($user) { $results = array(); foreach ($flags as $flag) - array_push($results, $flag->evaluate($user, $this->_featureRequester)->getValue()); + $results[$flag->getKey()] = $flag->evaluate($user, $this->_featureRequester)->getValue(); return $results; } From f3a40072d66e6c8b84042515cad11be27f99814d Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 19:50:55 -0800 Subject: [PATCH 17/18] change php version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index aa71f8175..d96bd338b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": "5.3.*", + "php": ">=5.3.*", "guzzle/guzzle": "dev-master#ecb935d2d0ecd8cddae4dcfb90515cac5e2cb023", "psr/log": "1.0.0", "justinrainbow/json-schema": "v1.6.0" From ef206debf93ec551a54b4332ae812570a36021fd Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Tue, 22 Nov 2016 19:52:10 -0800 Subject: [PATCH 18/18] change php version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d96bd338b..621414dce 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=5.3.*", + "php": "~5.3", "guzzle/guzzle": "dev-master#ecb935d2d0ecd8cddae4dcfb90515cac5e2cb023", "psr/log": "1.0.0", "justinrainbow/json-schema": "v1.6.0"