diff --git a/baseline.xml b/baseline.xml new file mode 100644 index 00000000..b5f0a5f9 --- /dev/null +++ b/baseline.xml @@ -0,0 +1,25 @@ + + + + + LDContext|LDUser + LDContext|LDUser + LDContext|LDUser + LDContext|LDUser + LDContext|LDUser + LDContext|LDUser + LDContext|LDUser + + + + + LDUser + + + + + LDUser + LDUser + + + diff --git a/phpunit.xml b/phpunit.xml index 10e08aaf..fc621927 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,6 @@ - - + + diff --git a/psalm.xml b/psalm.xml index 4e9226bd..8e1e03f6 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,6 +5,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" + errorBaseline="baseline.xml" > diff --git a/src/LaunchDarkly/LDUser.php b/src/LaunchDarkly/LDUser.php index 50586bfe..d49b8dd1 100644 --- a/src/LaunchDarkly/LDUser.php +++ b/src/LaunchDarkly/LDUser.php @@ -18,6 +18,8 @@ * this may be a username or e-mail address. For anonymous users, it could be an IP address or session ID. * * Use {@see \LaunchDarkly\LDUserBuilder} to construct instances of this class. + * + * @deprecated Use LDContext instead. */ class LDUser { @@ -65,6 +67,8 @@ public function __construct( ?array $custom = [], ?array $privateAttributeNames = [] ) { + trigger_error('LDUser is being removed in 6.0.0. Use LDContext instead', E_USER_DEPRECATED); + $this->_key = $key; $this->_ip = $ip; $this->_country = $country; @@ -169,7 +173,7 @@ public function getPrivateAttributeNames(): ?array { return $this->_privateAttributeNames; } - + public function isKeyBlank(): bool { return empty($this->_key); diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..fe07e9e8 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,5 @@ +