Skip to content

Commit ca95bb3

Browse files
LaunchDarklyReleaseBoteli-darklyhroederldLaunchDarklyCIbwoskow-ld
authored
prepare 4.2.3 release (#164)
* indents * add ability to filter for client-side flags only * fix test to fill in all required flag fields * implement evaluation with explanations * add another evaluation test * linter * fix test method * fix for ch22995 - include prereq value in event even if prereq is off * cache flag data in allFlags * rm unused imports * add option to reduce front-end metadata for untracked flags * add ability to load flags from a file * linter * data completeness * more data fixes * more data fixes * more data fixes * readme link * rm unused parameters * fix incorrect doc comment * add DynamoDB integration * fix test config * fix string check * readme * fix test data * factor out base class, implement caching, make configuration simpler * fix comment * rm unused const * can't scope constants * linter * add Consul integration * typo * regenerate lockfile using PHP 5.5 * we need at least version 2.1 of the Consul package * update lockfile * rm comment * remove lockfile * add delay for creating test table * move feature requester code into Integrations namespace * linter * misc test fixes * fix apc/apcu calls * fix comment * fix deprecated caching store classes * better caching abstraction * typo * linter * fix namespaces * fix tests * doc fixes * move a bunch more stuff * misc cleanup * add test for not having any flags * restore documentation for deprecated properties * version 3.5.0 * revert accidental commit * add experimentation event overrides for rules and fallthrough * linter * misc fixes * misc test fixes * Hr/ch34492/waitonconsul (#39) * add step to wait on Consul * coerce user attributes to strings when necessary, don't send events without valid users * explanatory comments * add release script (version update only) * use newer readme footer format * support metric value in track() * linter * update method description * add param to skip db tests, update docs for new repo name * wrong method name * add tests for rollout calculations, + misc test cleanup * misc doc fixes * misc doc fixes * update package name (#45) * add test for cached get all * typo * revert bugfix to test the test * reinstate bugfix * mix fixes, rename file * fix filename * misc cleanup * linter * misc fixes * test state cleanup * linter + fix filename in instructions * misc CI fixes, don't try to install phpredis in 5.6 * don't let user fall outside of last bucket in rollout * PHP 5.5 requires even null properties to be defined * minor cleanup * more accurate changelog text regarding phpredis * Add circle jobs for newer PHP versions. * Revert "Add circle jobs for newer PHP versions." This reverts commit 8939cb2. * implement doc generation with phpDocumentor 3 (prerelease), clean up doc tags (#50) * Add CI jobs for PHP 7.3 + 7.4 (#51) * ensure events aren't sent if send_events is false * clarify test with comment * make prefix concatenation in DynamoDB consistent with other SDKs * fix test * fix PHP 5.5 CI build by pinning Composer version (#54) * Updating warning log in Identify to not say Track was called (#56) * Removed the guides link * add alias functionality and some related tests * Revert "add alias functionality and some related tests" This reverts commit 2bf1cba. * add alias events support (#57) * add alias function to LDClient * add `contextKind` to events that require the new field * add tests for alias and contextKind * merge exp-alloc * drop support for EOL php versions and update deps (#60) * fix test class * remove database integrations from SDK (#63) * add type hints to FeatureRequesterBase methods * fix PHPRedis logic for prefix & custom client, add unit tests (#64) * add psalm lints and php hints (#62) * remove deprecated members (#65) * change default base URL to sdk.launchdarkly.com * move non-public classes into Impl namespace (#66) * add CI job for PHP 8.0 (#69) * use phpDocumentor 3 + misc doc comment cleanup (#68) * Updates docs URLs * pin Psalm to 4.9.2 to prevent a spurious linting error (#71) * use Releaser v2 config + add badge links in readme (#72) * use Releaser v2 config + add badge links in readme * fix badge URL * use Releaser PHP project template (#73) * use Releaser PHP project template * exclude implementation classes from docs * remove obsolete line that's no longer used because $seed is computed elsewhere * remove obsolete VERSION file * Fix test confirming send_events = false is honored (#78) * Minor cleanup and consistency changes (#79) * Add integration test for curl event publisher (#77) * Curl honor connect_timeout (#81) * Set required connect_timeout option in test (#82) * Add Windows support for "Curl" publisher (#80) * Add cs-check to build process (#83) * Don't treat numeric strings as numbers (#84) * Decrease psalm error level (#85) * added TestData, FlagBuilder; added TestDataTest; started implementing FlagBuilder methods * made props protected, made basic build method, made variations method with tests * continued implementing test data and tests for test data * implemented varationForAllUsers, valueForAllUsers, and variationForUsers along with corresponding tests * reorganized functions, added needed classes and functions, left some bodys blank to complete later, implemeted others, organized tests, added missing assertions * broken - transitioning build to return a FeatureFlag, finished implementing some methods * reverted build to return array, implemented getFeature and getAllFeatures methods in FeatureRequester interface for TestData * fixed build, implemented FeatureRequester, added simple test case * Event attribute filtering is overly aggressively (#86) If you try to create a custom attribute with a value of 0, our event serialization code would filter that out because `0 != null` is false. However, it is reasonable to expect that a user might want to provide the value of 0 as a custom value. The code has been updated to only exclude explicitly null values. * Account for traffic allocation on all flags (#87) * finished FlagRuleBuilder implementation; fixed psalm errors; improved comment blocks to adhere better to phpdoc; fixed formatting errors in both TestData and TestDataTest * fixed php-cs-fixer warnings in TestDataTest.php * Apply suggestions from code review Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> * replace use of array_push with append operator; standardized capitalization of booleans including in code blogs; other formatting adjustments * remove array_splice() implementation of existing user key removal due to breakage in unit tests * converted variationForUser to use array_splice but fixed issue caused by pass by reference instead of pass by value * fixed missing indexes required to decode FlagBuilder into a FeatureFlag using the decode() method * split off TestData\FlagBuilder and TestData\FlagRuleBuilder from TestData; add test coverage for TestData class * additional cleanup; added missing type hint; minor refactoring * remove special handling of singleton arrays in FlagBuilder::variations() * run php-cs-fixer on TestData-related files * started writing repetitive tests using the phpunit @dataProvider feature * swapped positions of expected and actual in dataProvider-driven test * fix typos in code in comment blocks * Apply whitespace fixes from code review Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> * split unwieldy tests in TestDataTest into separate tests; address TODO item * added annotations to dataProvider-driven tests * changed _isBooleanFlag() implementation to use strict equality * Add unit test to verify `in` operator in TestData (#89) * Add support for psr/log 2 and 3 (#91) * Adds link to Relay Proxy docs * master -> main * Add support for Guzzle 6.3 (#93) * Use setVersion on update of a changed flag (#161) - in TestData::update when flag is being copied from previous version - use setVersion rather than ['version'] to avoid generated error - associated unit test to update an initial flag, change the flag and update it again - unit-tested using docker for php 7.3, 7.4, 8.0, 8.1 Co-authored-by: Colin Henwood <colin.henwood@xero.com> * Add support for monolog 3.0 (#94) Co-authored-by: Eli Bishop <eli@launchdarkly.com> Co-authored-by: Eli Bishop <35503443+eli-darkly@users.noreply.github.com> Co-authored-by: hroederld <46500128+hroederld@users.noreply.github.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Ben Woskow <bwoskow@launchdarkly.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: elliot <elliot@debian.elliot> Co-authored-by: Elliot Haisley <35050275+Apache-HB@users.noreply.github.com> Co-authored-by: Harpo Roeder <hroeder@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> Co-authored-by: charukiewicz <charukiewicz@protonmail.com> Co-authored-by: Joey Malinowski <joemalin95@gmail.com> Co-authored-by: Christian Charukiewicz <christian@foxhound.systems> Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com> Co-authored-by: Colin Henwood <aretenz@users.noreply.github.com> Co-authored-by: Colin Henwood <colin.henwood@xero.com>
1 parent c8c9e51 commit ca95bb3

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ workflows:
99
- test-on-linux:
1010
matrix:
1111
parameters:
12-
php-version: ["7.3", "7.4", "8.0"]
12+
php-version: ["7.3", "7.4", "8.0", "8.1"]
1313
composer-dependencies: ["lowest", "highest"]
1414
- test-on-windows
1515

@@ -79,9 +79,14 @@ jobs:
7979
- run:
8080
name: psalm linting
8181
command: ./vendor/bin/psalm --no-cache
82-
- run:
83-
name: php-cs-fixer check
84-
command: composer cs-check
82+
- when:
83+
condition:
84+
not:
85+
equal: [ "8.1", <<parameters.php-version>> ]
86+
steps:
87+
- run:
88+
name: php-cs-fixer check
89+
command: composer cs-check
8590
- run:
8691
name: run tests
8792
command: php -d xdebug.mode=coverage vendor/bin/phpunit

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
],
1616
"require": {
1717
"php": ">=7.3",
18-
"monolog/monolog": "^1.6|^2.0",
18+
"monolog/monolog": "^1.6|^2.0|^3.0",
1919
"psr/log": "^1.0|^2.0|^3.0"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": ">=2.18.0 <3.0",
2323
"guzzlehttp/guzzle": "^6.3 | ^7",
24-
"kevinrob/guzzle-cache-middleware": "^3",
24+
"kevinrob/guzzle-cache-middleware": "^4.0",
2525
"phpunit/php-code-coverage": "^9",
2626
"phpunit/phpunit": "^9",
27-
"vimeo/psalm": "^4.4"
27+
"vimeo/psalm": "^4.9"
2828
},
2929
"suggest": {
3030
"guzzlehttp/guzzle": "(^6.3 | ^7) Required when using GuzzleEventPublisher or the default FeatureRequester",

tests/LDClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ public function testSecureModeHash()
711711

712712
public function testLoggerInterfaceWarn()
713713
{
714-
// Use LoggerInterface impl, instead of concreate Logger from Monolog, to demonstrate the problem with `warn`.
714+
// Use LoggerInterface impl, instead of concrete Logger from Monolog, to demonstrate the problem with `warn`.
715715
$logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
716716

717717
$logger->expects(self::atLeastOnce())->method('warning');

0 commit comments

Comments
 (0)