From 3a39087f3ca04317ebb4e2e02ee6eceaae966753 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 27 Apr 2023 07:23:05 -0700 Subject: [PATCH] Deprecate Java YogaConfig.setUseLegacyStretchBehaviour() Summary: Now that our own usages are removed, mark this as deprecated to encourage users to move to the errata API. The same will be done to variants of this function on other platforms before releasing, and the functions will be removed after releasing. Differential Revision: D45300343 fbshipit-source-id: 76998cd688c40d587f21b8e91f0fc836a2b22296 --- .../src/main/java/com/facebook/yoga/YogaConfig.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfig.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfig.java index 87928f02319802..931313594b113f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfig.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfig.java @@ -22,7 +22,13 @@ public abstract class YogaConfig { * Yoga previously had an error where containers would take the maximum space possible instead of the minimum * like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch; * Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour. + * + * @deprecated "setUseLegacyStretchBehaviour" will be removed in the next release. Usage should be replaced with + * "setErrata(YogaErrata.ALL)" to opt out of all future breaking conformance fixes, or + * "setErrata(YogaErrata.STRETCH_FLEX_BASIS)" to opt out of the specific conformance fix previously disabled by + * "UseLegacyStretchBehaviour". */ + @Deprecated public abstract void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour); public abstract void setErrata(YogaErrata errata);