We need to implement this hook for any core modules that require PHP features like SimpleXML, cURL, and SOAP. While these are included by default, a lot of hosts limit what's available in PHP by disabling some of these default features.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 2.x_readme.patch | 381 bytes | Island Usurper |
| #12 | hook_requirements.2.x.patch | 11.01 KB | cha0s |
| #9 | hook_requirements.2.x.patch | 11.59 KB | cha0s |
| #1 | hook_requirements.1.x.patch | 8.55 KB | cha0s |
| #1 | hook_requirements.2.x.patch | 8.56 KB | cha0s |
Comments
Comment #1
cha0s commentedPatches for both versions follow.
Comment #2
Island Usurper commentedUbercart 1.x doesn't use SimpleXML, so it's not a requirement for those modules. The libraries they use are distributed in the Ubercart download.
Comment #3
rszrama commentedWe can just stick w/ the 2.x patch and not worry about it for 1.x.
Comment #4
rszrama commentedI should've marked this back to code needs review... we can ignore the 1.x patch, but please review the 2.x patch for inclusion. My quick overview doesn't turn up anything out of the ordinary. I might add that we should review at least the payment modules for places where they're doing their own requirements checking. I believe I do this in PayPal, Auth.Net, Cyber Source, and maybe more. If we're using this hook, my hunch is we can take out the local checks in those modules.
Comment #5
cha0s commented"I might add that we should review at least the payment modules for places where they're doing their own requirements checking. I believe I do this in PayPal, Auth.Net, Cyber Source, and maybe more. If we're using this hook, my hunch is we can take out the local checks in those modules."
Would you like me to add this into the patch, or should we keep 'em separated?
Comment #6
Island Usurper commentedI think we can add it to this patch. Since we're taking the checks out because we're adding this hook in, that seems reasonable.
Comment #7
Island Usurper commented:)
Comment #8
rszrama commentedAhh, my bad - I was meaning for it to go ahead and go in this patch.
Comment #9
cha0s commentedPatch improved to remove any extraneous checks.
Comment #10
cha0s commentedAccidentally double posted... ;p
Comment #11
Island Usurper commentedThe way it is, it looks like uc_cybersource won't ever install if the server doesn't have cURL support. It sounds plausible to me that someone might have SOAP and DOM, but not cURL, but they wouldn't be able to use even the SOAP interface to CyberSource. You can get around that by checking that $phase == 'runtime', but then you have to put in all of the additional checks back in throughout the module.
Everything else looks good, though.
Comment #12
cha0s commentedAlright, updated the module. Here's the changelog:
Fixed cybersource's installation behavior (would fail if user only had SOAP and DOM but not cURL), and made those checks at runtime...
An installation check is done to ensure at least one library combo exists.
At installation time, the best candidate for the cybersource method is chosen, defaulting to POST if possible.
The runtime checks for Cybersource were added back in to make the error more user-friendly
aaand, patchie:
Comment #13
Island Usurper commentedLooks good to me.
Comment #15
ñull commentedI would say that beside software warning, it would be good to mention these dependencies in the system requirements in the documentation. Some people, before installing a module, actually read the documentation to find out beforehand if the module is suitable for their hosting environment.
Comment #16
Island Usurper commentedComment #17
cha0s commentedComment #18
Island Usurper commentedAdded module-specific requirements to the installation page at ubercart.org. The README.txt file needed to be changed to the 2.x version of the docs, so I figured it was the right place for it.