Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Separate from #2833969: Document that there is no support for Twilio 5 PHP library:
The module currently doesn't support Twilio's 5.x version of their php sdk and only works with the 4.x version.
Since 4.x is deprecated and we don't know why (security? using legacy api features that will get dropped?) it would be good to upgrade the tfa_basic code to work with the 5.x version of Twilio's code.
This will require the minimum php version to be 5.5, which seems fine for anyone interested in security is likely already on that or newer anyway.
Comment | File | Size | Author |
---|---|---|---|
#16 | twilio-v5-2997261-16.patch | 5.55 KB | klausi |
Comments
Comment #2
esolitosI might be able to step in to help as I'll need to use a PIN authentication for a project soon.
I'll be in touch with a patch hopefully soon.
Comment #3
gregglesGood to hear, esolitos! Would be great to get this support working well with a modern version of the Twilio library.
Comment #4
jpsalter CreditAttribution: jpsalter commentedThis patch supports the latest version of the Twilio PHP library (5.26.0).
You can install the library via composer or direct download and it should work correctly.
Comment #5
gregglesThanks so much for your work!
I noticed a few nitpick things:
Comments should start with an upper case and be a sentence that ends with punctuation.
Same punctuation missing here and comments should be on a line on their own (no trailing comments).
These are very small issues so I'll leave it at needs review, but would be good to fix prior to commit.
Comment #6
greggleswhoops and need to fix up my credit.
Comment #7
jpsalter CreditAttribution: jpsalter commentedI've added punctuation to the comments. Thanks for the feedback.
Comment #8
gregglesThanks, jpsalter. I just noticed a few more things:
Missing punctuation on that one.
This comment should be moved to it's own line like below.
Or the comment could be removed.
I'm unlikely to be able to test this functionality - would be great if other folks could.
Comment #9
jpsalter CreditAttribution: jpsalter commentedMore comment cleanup.
Comment #10
klausithere is still an old "@return Services_Twilio|FALSE" doc comment.
Please make sure to update all references to Services_Twilio.
Comment #11
jpsalter CreditAttribution: jpsalter commentedUpdated the comments. Changed the catching of an exception too.
Comment #12
jpsalter CreditAttribution: jpsalter commentedFixing logic for library load.
Comment #13
jpsalter CreditAttribution: jpsalter commentedSorry - wrong diff before. This fixes the logic.
Comment #14
hoegrammer CreditAttribution: hoegrammer commentedHi, the patch in #13 nearly worked for me but I had to make a further change:
with
I'm puzzled as to why this made any difference, but without it I found that the Twilio fields (SID, etc) were missing from the setup form.
It's odd, because I don't see why that change should make any difference! (If anyone can shed light on this I'd be grateful). Thanks!
Comment #15
klausiUpdated patch which has a couple more safe guards to not throw fatal errors when the library is not available.
@hoegrammer: I think the problem was that there was an assignment in the if(), which is never a good idea. Also changed that in the patch.
The most annoying thing about this upgrade is that the Twilio library version 5 is now 190k lines of code!! This is huge and I don't want to add all the irrelevant Twilio class files to my composer classmap. I decided to use it with the libraries API instead.
Comment #16
klausiForgot to update info file where the library is also referenced.
Comment #17
Graber CreditAttribution: Graber as a volunteer commentedBumping priority as this is a serious issue, the module doesn't even document which version of the library is supported (currently none probably).