I propose that we deprecate and move to the legacy modules the
api.XWiki#getSpacePreferenceFor(String, String) (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java#L1163) and
api.XWiki#getSpacePreferenceFor(String, String, String) (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java#L1178).
The main reason is that these methods are using spaces as String and, in the context of the Nested Spaces structure (since XWiki 7.2), the spaces are not properly resolved, meaning that a String A.B will be considered a single space named A.B instead of a space hierarchy with space A as a parent of space B.
Moreover, these methods are calling the method
xwiki.XWiki#getSpacePreference(String, String, String, XWikiContext) (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java#L2947), which is also deprecated since 7.4M1.
Finally, in the xwiki-platform project, there are only 2 occurrences of these methods:
- in 2 deprecated methods of XWikiCompatibilityAspect.aj https://github.com/xwiki/xwiki-platform/blob/df8bd49b5a4d87a427002c6535fb5b1746ff117a/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/com/xpn/xwiki/api/XWikiCompatibilityAspect.aj#L540
layoutvars.vmwhere the panels variables are set.
This vote is open for one week: it will be closed on Friday, September 2nd.