diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f431d18..b376278b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,6 +63,9 @@ jobs: - setup_remote_docker - checkout + - run: + name: Install xdebug + command: sudo pecl install xdebug - run: name: validate composer.json command: composer validate @@ -96,8 +99,9 @@ jobs: command: mkdir -p build/contract-tests-output && make run-contract-tests - store_test_results: - path: build/phpunit + path: build/phpunit/junit.xml - store_test_results: path: build/contract-tests-output - store_artifacts: - path: build/phpunit + path: build/phpunit/html-coverage/ + destination: coverage/ diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..7d0dac3c --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# Repository Maintainers +* @launchdarkly/team-sdk diff --git a/README.md b/README.md index 3ac9acfe..4376af0d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## LaunchDarkly overview -[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today! +[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today! [![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly) @@ -20,7 +20,7 @@ Refer to the [SDK reference guide](https://docs.launchdarkly.com/sdk/server-side ## Learn more -Check out our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/php). +Read our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/php). The authoritative description of all types, properties, and methods is in the [generated API documentation](http://launchdarkly.github.io/php-server-sdk/). diff --git a/src/LaunchDarkly/Impl/Util.php b/src/LaunchDarkly/Impl/Util.php index a0350279..8f9f9ebc 100644 --- a/src/LaunchDarkly/Impl/Util.php +++ b/src/LaunchDarkly/Impl/Util.php @@ -59,8 +59,12 @@ public static function httpErrorMessage(int $status, string $context, string $re public static function logExceptionAtErrorLevel(LoggerInterface $logger, \Throwable $e, string $message): void { - $logger->error($message . ': ' . $e->getMessage()); - $logger->debug("$e"); + $logger->error( + $message . ': ' . $e->getMessage(), + [ + 'exception' => $e, + ] + ); } public static function makeNullLogger(): LoggerInterface diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index 1834e3ea..a7064470 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -247,7 +247,14 @@ private function variationDetailInternal(string $key, LDContext|LDUser $contextO $result = $errorDetail(EvaluationReason::USER_NOT_SPECIFIED_ERROR); $sendEvent(new EvalResult($result, false), null); $error = $context->getError(); - $this->_logger->warning("Context was invalid for flag evaluation ($error); returning default value"); + + $this->_logger->warning( + "Context was invalid for flag evaluation ($error); returning default value", + [ + 'flag' => $key, + ] + ); + return $result; }