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.
Lifted to PSR-4, Plugin gets recognized. Remark: tmgmt core neeeds a 'tmgmt.translator_delete' route for the plugin to work.
Got stuck with Guzzle at the GetToken Post request. Error message:
No method can handle the grant_type config key
Any hint?
Comment | File | Size | Author |
---|---|---|---|
#13 | tmgmt_microsoft_2372047_13.interdiff.txt | 11.89 KB | miro_dietiker |
#13 | tmgmt_microsoft_2372047_13.patch | 24.22 KB | miro_dietiker |
#11 | port_translator_plugin_to_d8_2372047_11.patch | 18.52 KB | cgalli |
Comments
Comment #1
cgalli CreditAttribution: cgalli commentedComment #2
cgalli CreditAttribution: cgalli commentedComment #3
BerdirPatch is empty
Comment #4
cgalli CreditAttribution: cgalli commentedHere it comes....
Comment #5
miro_dietikerHello! Looks awesome.
A few minor corrections to consider... And one general question about the status of the port.
I think we should properly name them:
clientid => client_id
clientsecret => client_secret
Should be only {@inheritdoc}... and more similar locations.
Executes, not Execute.
Gets not Get.
I can't see where this mocking is provided. I fear this test can not work without it? Did you run these tests?
Wrong indentation.
Comment #6
miro_dietikerSome more common title for port issues. :-)
Comment #7
cgalli CreditAttribution: cgalli commentedCorrection: wrong issue :-) this belongs to #2381149: Catchup with D8 core, remove unused code
little corrections:
- remove $temp
- repalces deprecated drupalt_strlen()
Comment #8
cgalli CreditAttribution: cgalli commentedUpdated to Drupal 8 Dev
Working with tests
Comment #9
cgalli CreditAttribution: cgalli commentedComment #10
miro_dietikerNice update. Just some smaller fixings needed. :-)
I think we should drop backwards compatibility for old settings / microsoft api keys.
Wrapping 80 chars.
This is a TMGMT API problem. Here we should throw an exception. Otherwise we risk the reply (no languages supported) end up cached.
Possibly prepend the exception message here to make the origin of the message clear.
A comment here would be nice... "Remove source language from targets."
Api => API
microsoft => Microsoft.
api => API
mok => mock
Useless empty line.
response => Response and plz check the argument sequence... (the second can not work... so we don't even test it ever?)
Hint: We were a bit confused about the XML / JSON mix here. JSON seems needed for the service token and XML is for all the actual services payload work (languages, translate body).
Comment #11
cgalli CreditAttribution: cgalli commentedImproved according to #10
Comment #12
miro_dietikerVerry nice. One final thing from my side.
This leads to double fromUri wrapping.
Comment #13
miro_dietikerOK fixed some stuff...
Renamed clientid to client_id... and similar.
Added missing @file headers.
Added some type hints.
Consistently use TMGMTException instead of Exception.
Comment #14
miro_dietikerAdditionally reverted one wrong type hint fix (create() array argument).
Yay! Committed, pushed.
Comment #21
Berdir