This bundle wrap the Mailchimp official PHP SDK for using inside Symfony as service.
This bundle uses V2 of Mailchimp API.
Add this line to your composer.json "require" section:
"require": {
...
"godisco/mailchimp-bundle": "dev-master"
Add this to your AppKernel.php (in the registerBundles() section):
class AppKernel extends Kernel
{
public function registerBundles()
{
// ...
new GoDisco\MailchimpBundle\MailchimpBundle()
}
Just request for the mailchimp
service.
$mailchimp = $container->get("mailchimp");
You can get your default list id by:
$mailchimp->getDefualtList();