-
Notifications
You must be signed in to change notification settings - Fork 31
Fix Guzzle conflicts in Moodle 4.2 #58
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
Conversation
ed8e6cc
to
a4c38f6
Compare
Not sure why the master branch is failing with the error |
hey @sarahjcotton Thanks for working on this! There is an error in install Moodle step. Not your fault. Probably CI worflows should be updated and DB version bumped.
|
Thanks for fixing the workflow @keevan - Do you know when this PR is likely to get merged? We're in the middle of doing some upgrades which this is having an impact on. Many thanks. |
any update on this? |
@sarahjcotton looks like this ready to be merged. Just wondering if there is a Guzzle version difference between core and this plugin? |
@dmitriim From what I can tell the guzzle library included in 4.2 has deprecated the const VERSION and replaced it with MAJOR_VERSION in lib/guzzlehttp/guzzle/src/ClientInterface.php so yes, the versions are different. |
> This fix forces local_aws to use its own library and not the Moodle one. You mean opposite? Use Moodle one for 4.2+ ? Or am I missing something? |
Yes that's correct - if the branch is 402 or greater then use the Moodle one, otherwise use the local_aws one. |
I'm wondering if it might be because the value is a string and I've done a check for an int (>=), so the = part would work for 4.2 but not anything else. I'm working on something else now but someone else should be along soon. Edit: Probably really basic stuff I should already know but >= works on strings, so that's not it |
Hi @sarahjcotton , |
a4c38f6
to
9fd05a5
Compare
I've changed this slightly so that if |
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.
Confirmed this fixed local_aws in Moodle 4.2. @aspark21 can you confirm upgrade from 3.11 now works? (I was unable to reproduce the error, even before the updated patch)
Edit: Found an instance where upgrade fails. It still fails with the latest patch.
Co-authored-by: Mark Webster <[email protected]>
I'm not sure why those checks failed, bug in the workflow? |
We have this running on a client Moodle 4.3 site and have confirmed it is working. |
we’re using a forked version of this plugin in prod since it’s taken so long to get this fixed upstream (I’m assuming we’re the 4.3 client you were referring to) and we’re on a 4.2+ only version of the code with no version checks (the branch in #60) Sorry for not having much time to re-test this but the upgrade steps that failed were for things that were updating files during the upgrade. e.g. format_grid was doing some conversions of icons the code worked fine after the upgrade, it was just during the upgrade that it had problems. |
It's actually another site where we have this exact patch, and we're about to be upgrading some more, so hopefully we shouldn't see any further problems. |
Fixes #56