-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Improved aliasing and plugin replacement #38
Conversation
This should resolve an issue where a replacing plugin's class won't report as the replaced plugin's class in "instanceof" calls and the like, by aliasing a loaded plugin class that is being aliased to and reserving the names of the replaced classes. We also track which aliases have been loaded and/or reversed to prevent double-initialisation.
…ndable-trait' into wip/improved-aliasing
…ing' into wip/improved-aliasing
I've tested the following:
|
@mjauvin one extra thing to test is what happens if both RainLab.Blog and Winter.Blog are installed - do the replacements work correctly, or is still a requirement to remove the original plugins first? In my testing, it seemed to be fine with both plugins installed, but just wanted to see if someone else can confirm the same. |
@bennothommo I tested with both Winter/RainLab Blog plugin installed and it's working fine. @jaxwilko's code still detects and warns that both plugins are installed, but the replacement seems to not care for the replaced plugin. |
@mjauvin @bennothommo Last I left it, the desired functionality is that |
So, yeah, this code is what makes this work now in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a little comment.
* develop: Cleanup user impersonation inline docs and ensure the impersonation is working on the current request as well as future requests. Fix bug where user impersonation would sometimes fail Code quality Reorganize helper functions and add new ones. Improvements to URL generation (#45) Add support for trusted proxies (#42) Add issue notice to README Add shields to README Tweak GitHub Actions Retrieve and store headers if Http::toFile() method is used. (#44) Improved aliasing and plugin replacement (#38) Reduce the calls to PathResolver::resolve for speed (#34) Add pagination for queries using havings (#39) Add missing import to FilesystemAdapter (#33) Improved the unique validation rule test cases (#29) Remove old build files Support multiple where clauses in Unique validation rules (#28)
Combines the following PRs for better testing: