@@ -274,21 +274,6 @@ private function variationDetailInternal(string $key, LDUser $user, $default, Ev
274274 }
275275 }
276276
277- /**
278- * Deprecated name for variation().
279- *
280- * @deprecated Use variation() instead.
281- * @param string $key The unique key for the feature flag
282- * @param LDUser $user The end user requesting the flag
283- * @param bool $default The default value of the flag
284- * @return mixed
285- */
286- public function toggle (string $ key , LDUser $ user , bool $ default = false )
287- {
288- $ this ->_logger ->warning ("Deprecated function: toggle() called. Use variation() instead. " );
289- return $ this ->variation ($ key , $ user , $ default );
290- }
291-
292277 /**
293278 * Returns whether the LaunchDarkly client is in offline mode.
294279 */
@@ -334,33 +319,6 @@ public function identify(LDUser $user): void
334319 $ this ->_eventProcessor ->enqueue ($ this ->_eventFactoryDefault ->newIdentifyEvent ($ user ));
335320 }
336321
337- /**
338- * Deprecated alternative to allFlagsState().
339- *
340- * This returns an array mapping feature flag keys to their evaluated results for a given user.
341- *
342- * If the result of a flag's evaluation would have returned the default variation, it will have a null entry.
343- * If the client is offline, has not been initialized, or a null user or user with null/empty user key, null will be returned.
344- * This method will not send analytics events back to LaunchDarkly.
345- *
346- * The most common use case for this method is to bootstrap a set of client-side feature flags from a back-end
347- * service. Current versions of the JavaScript SDK require somewhat different data; for best compatibility,
348- * use {@link allFlagsState()} instead.
349- *
350- * @deprecated Use allFlagsState() instead. Current versions of the client-side SDK will not
351- * generate analytics events correctly if you pass the result of allFlags().
352- * @param LDUser $user The end user requesting the feature flags
353- * @return array|null Mapping of feature flag keys to their evaluated results for $user
354- */
355- public function allFlags (LDUser $ user ): ?array
356- {
357- $ state = $ this ->allFlagsState ($ user );
358- if (!$ state ->isValid ()) {
359- return null ;
360- }
361- return $ state ->toValuesMap ();
362- }
363-
364322 /**
365323 * Returns an object that encapsulates the state of all feature flags for a given user.
366324 *
0 commit comments