Skip to content

Commit 77fea8a

Browse files
LaunchDarklyReleaseBoteli-darklyhroederldLaunchDarklyCIbwoskow-ld
authored
prepare 5.2.0 release (#182)
## [5.2.0] - 2023-10-23 ### Deprecated: - `LDUser` is now deprecated in favor of `LDContext`. --------- Co-authored-by: Eli Bishop <eli@launchdarkly.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> Co-authored-by: Eli Bishop <35503443+eli-darkly@users.noreply.github.com> Co-authored-by: Louis Chan <lchan@launchdarkly.com> Co-authored-by: ld-repository-standards[bot] <113625520+ld-repository-standards[bot]@users.noreply.github.com> Co-authored-by: Kane Parkinson <93555788+kparkinson-ld@users.noreply.github.com> Co-authored-by: Michiel Devriese <michieldevriese@gmail.com>
1 parent c8ca346 commit 77fea8a

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

baseline.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69">
3+
<file src="src/LaunchDarkly/LDClient.php">
4+
<DeprecatedClass occurrences="7">
5+
<code>LDContext|LDUser</code>
6+
<code>LDContext|LDUser</code>
7+
<code>LDContext|LDUser</code>
8+
<code>LDContext|LDUser</code>
9+
<code>LDContext|LDUser</code>
10+
<code>LDContext|LDUser</code>
11+
<code>LDContext|LDUser</code>
12+
</DeprecatedClass>
13+
</file>
14+
<file src="src/LaunchDarkly/LDContext.php">
15+
<DeprecatedClass occurrences="1">
16+
<code>LDUser</code>
17+
</DeprecatedClass>
18+
</file>
19+
<file src="src/LaunchDarkly/LDUserBuilder.php">
20+
<DeprecatedClass occurrences="3">
21+
<code>LDUser</code>
22+
<code>LDUser</code>
23+
</DeprecatedClass>
24+
</file>
25+
</files>

phpunit.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" beStrictAboutChangesToGlobalState="true" beStrictAboutOutputDuringTests="true" beStrictAboutResourceUsageDuringSmallTests="true" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutTodoAnnotatedTests="true" verbose="true" defaultTimeLimit="10">
3-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="tests/bootstrap.php" colors="true" beStrictAboutChangesToGlobalState="true" beStrictAboutOutputDuringTests="true" beStrictAboutResourceUsageDuringSmallTests="true" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutTodoAnnotatedTests="true" verbose="true" defaultTimeLimit="10">
3+
44
<logging>
55
<junit outputFile="build/phpunit/junit.xml"/>
66
</logging>

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
66
xmlns="https://getpsalm.org/schema/config"
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
errorBaseline="baseline.xml"
89
>
910
<projectFiles>
1011
<directory name="src" />

src/LaunchDarkly/LDUser.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* this may be a username or e-mail address. For anonymous users, it could be an IP address or session ID.
1919
*
2020
* Use {@see \LaunchDarkly\LDUserBuilder} to construct instances of this class.
21+
*
22+
* @deprecated Use LDContext instead.
2123
*/
2224
class LDUser
2325
{
@@ -65,6 +67,8 @@ public function __construct(
6567
?array $custom = [],
6668
?array $privateAttributeNames = []
6769
) {
70+
trigger_error('LDUser is being removed in 6.0.0. Use LDContext instead', E_USER_DEPRECATED);
71+
6872
$this->_key = $key;
6973
$this->_ip = $ip;
7074
$this->_country = $country;
@@ -169,7 +173,7 @@ public function getPrivateAttributeNames(): ?array
169173
{
170174
return $this->_privateAttributeNames;
171175
}
172-
176+
173177
public function isKeyBlank(): bool
174178
{
175179
return empty($this->_key);

tests/bootstrap.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
error_reporting(E_ALL & ~E_USER_DEPRECATED);
4+
5+
require 'vendor/autoload.php';

0 commit comments

Comments
 (0)