Replies: 2 comments 3 replies
-
Hi @Tony-S, You can achieve this by creating a third plugin (I generally create a Custom.App plugin in all my projects) which would register the RainLab.User alias: Config::registerNamespaceAlias('Winter.User', 'October.User'); Doing so, all reference to October\User namespace will now refer to the Winter\User one. But this should already be done by the replace tag inside the Winter.User pluginDetails method here: |
Beta Was this translation helpful? Give feedback.
-
Namespace aliasing of October\Rain to Winter\Storm is handled by Winter\Storm itself, see https://github.com/wintercms/storm/blob/develop/src/Support/aliases.php. As for RainLab.User, the plugin replacement system handles aliasing namespaces, config keys, translations, settings, & backend navigation items and Winter.User flags that it replaces RainLab.User here: https://github.com/wintercms/wn-user-plugin/blob/main/Plugin.php#L29 All that to say, no; you probably don't need to do anything to register any aliasing if you're using Winter\Storm and / or Winter.User. |
Beta Was this translation helpful? Give feedback.
-
I'm wanting to use some October plugins that already reference e.g. Rainlab\User but of course I'm using Winter\User. Files have use statements e.g.:
use RainLab\User\Models\User;
use October\Rain\Scaffold...
Is there any way to use these plugins as-is with namespace aliasing so Winter\User and Winter\Storm are used? Obviously I can clone the plugins and adapt them but then I will loose all updates so I'm just checking whether aliasing can avoid that? I've read the docs but I don't see that it applies to this situation.
Beta Was this translation helpful? Give feedback.
All reactions