-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed issue #1742 where the creation of GPM object tried to connect t… #1746
Conversation
…nnect to Remote repositories even if only Local package was needed
/** | ||
* Loads Remote Grav package available | ||
*/ | ||
public function loadRemoteGrav() |
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.
Cannot see this being called from anywhere...?
It's used in the admin plugin, in the classes/gpm.php to allow to load the Remote Grav repository. |
The issue I'm seeing here is that it is a new function which wasn't there before. So it's not compatible backwards, which needs to be noted. |
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.
I need to test this. Also it will require the dependency of the admin on this Grav update as without it you will get an error.
These kinds of changes are a bit scary because if you manually update admin before core, the GPM will be broken because the method will not exist, and you won't be able to update core past that point. I would prefer a more backwards compatible approach to prevent this scenario.
@rhukster I have already made the modifications and PR in the admin plugin to use this new function, so if the PR in the admin plugin is accepted, it will not cause any issue. As you suggested in the admin plugin, checking if the method exists before using it is a good solution for now. |
…o Remote repositories even if only Local package was needed
Now, it only tries to connect to the outside world when really required and not when just creating a new GPM object.
This could break client classes with the following code:
The above code must be replaced with: