Closed (fixed)
Project:
Mandrill
Version:
7.x-1.5
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2013 at 10:00 UTC
Updated:
23 Dec 2013 at 18:40 UTC
Jump to comment: Most recent
More details shared at http://drupal.stackexchange.com/questions/96635/avoiding-class-name-conf...
Comments
Comment #1
levelos commentedThe 2.x branch, with an official release coming soon, uses the "official API". In the meantime, any reason why you're using both? The API wrapper bundled with the module already includes complete coverage for the API.
Comment #2
sivaji_ganesh_jojodae commentedWe want rejects list from Mandrill (as to remove the hard bounced emails from simplenews) and per email address based webhooks action which we think as not supported by Mandrill class shipped with the module.
Comment #3
sivaji_ganesh_jojodae commentedThanks for the 2.x branch. Hope we will use it for the next iteration of the project.
Comment #5
j0rd commentedI've taken a look at the mandrill API implementation in packagist and it appears the 2.x version of the Drupal module does not use this version. So I'm confused. Perhaps it only uses a subset of the packagist stuff?NVM, found that you're using the /libraries/ module in 2.xI'm also running into conflicts with regards to namespace.
Since MailSystem and drupal_mail are simply structured differently than how mandrill functions, there's cases where you want/need to use the full raw API.
One use case is the use of merge variables. Currently we're using mandrill to send all our transactional emails, but now are developing our weekly bulk newsletter sending with mandrill and for this we'll need merge variables and other features like emails scheduling and pulling data down from the mandrill api to make more informed about our readership & users.
Comment #6
j0rd commentedDoes it not make sense to put the full mandrill library in the /libraries/ folder, and then use it. So it can also be updated independently of the module (providing library versions are backwards compatible)Hands faster than brain. Sorry.
Comment #7
j0rd commentedI just looked at class Mandrill() in /lib/ folder and I can see this was custom written for the Drupal module as it includes drupal specific functions.I see the 2.x version is using another "DrupalMandrill" namespace to not conflict as the solution.I'm going to personally backport that change into my 1.x version, so I can include the library with out problems.Perhaps it would be wise to start following a D8 namespace in the 2.x branch, to avoid extra work in the future.Hands faster than brain. Sorry.
Comment #8
sivaji_ganesh_jojodae commentedGlad! I'm not alone in this pitfall :) But I'm fortunate, as for the current release we found a workaround by extending the Mandrill class defined in /lib/mandrill.inc, in our custom module. The extended class will have methods forked from official library. So whenever / wherever additional api methods needed we will use our extended class. This could be cumbersome in long run, looking forward to a standard fix soon.