-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliasing not working if you require a class that refers to the interface #1268
Comments
@thanhc Is this specific to that Alias? The locale switching page code in the model doesn't get the model to handle the request but instead uses the bundleset itself which could cause a slightly different behaviour. This may be fixed in the |
I'm not sure if the changes you are working on will help fix this @andyberry88, but maybe. The problem seems to be that if the chosen concrete class refers to the alias interface, then it can't be used. Since most classes will do this, I can only assume this only happens for CommonJs classes, so we haven't started seeing it yet. I'll assign to myself, but not start looking at until you've merged your changes. |
… wrapper so extend Aspect to fix the test
Tested, works fine on #1277 |
A good example of this is if you create the following alias:
<alias name="br.locale-switcher" class="br.services.locale.BRLocaleLoadingSwitcher"/>
And if you try and use this alias then it will continue to use the original class BRLocaleForwardingSwitcher.
In the BRLocaleLoadingSwitcher we require the following:
var LocaleSwitcher = require('br/services/LocaleSwitcher');
if you remove this line then the alias will work, otherwise it will use the old one.
The text was updated successfully, but these errors were encountered: