So I'm having a really hard time finding out how to install the latest Mailchimp library. I hope someone can help clarify as there seem to be many options and none have worked fro me yet. I read this thread and with interest and reference the solutions suggested in that thread - however I was not able to make any combination of Mailchimp module versions and Mailchimp libraries work together.

I tried using the (latest stable) 4.8 version of the Mailchimp module, got the missing library error, read this info on the module homepage*

So from https://github.com/thinkshout/mailchimp-api-php/releases I downloaded the recommended https://github.com/thinkshout/mailchimp-api-php/releasesFor PHP 5.6 and greater, download v1.0.7-package-no-dev.zip (I'm running PHP 5.6.27 on my server)

That's when I got the missing Guzzle error. Came to this forum. Now I see everyone is looking for answers. I tried downloading earlier versions of the folder as recommended above - v1.0.4 - v1.0.6. But those now cause my site to no longer function and I need to disable the Mailchimp module using drush to get webpage pack.

Then I consider installing Composer - despite the overkill and apparent problems on Drupal 7. But first I read #5 above and try that on my mac however I get errors:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 6.3.0 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.4 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.3 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - phpunit/phpunit 6.2.2 requires php ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - Installation request for phpunit/phpunit ^6.2.2 -> satisfiable by phpunit/phpunit[6.2.2, 6.2.3, 6.2.4, 6.3.0].

So then I try installing the last dev version of Mailchimp module - but same problem.

So... a simple Mailchimp library.. how to download it today and with what version of Mailchimp module, stable 4.8 or latest dev - should I pair it?

----
*

7.x-4.x

The 7.x-4.x release uses version 3.0 of the MailChimp API. A new library is available here and will need to replace the old library if you are upgrading the module from 7.x-3.x or 7.x2.x.

See the README.txt for library installation instructions.

Readme says:

MailChimp Library Installation
--------------------------------------------------------------------------------

# For MailChimp version 7.x-4.x

To use the Libraries module:

- Install the Libraries module:
https://www.drupal.org/project/libraries

- Download the current release of the MailChimp library:
https://github.com/thinkshout/mailchimp-api-php/files/710410/v1.0.6-pack...

- Locate your libraries directory. Usually:
/sites/all/libraries/

- Extract the archive to:
libraries/mailchimp

- Ensure the directory structure looks like this:

- libraries/
- mailchimp/
- src/
- Mailchimp.php
- MailchimpAPIException.php
- MailchimpCampaigns.php
- MailchimpLists.php
- MailchimpReports.php
- MailchimpTemplates.php
- vendor/
- autoload.php
- composer/
- guzzlehttp/
- psr/
- composer.json
- README.md

--

Comments

dawnbuie created an issue. See original summary.

dawnbuie’s picture

Issue summary: View changes
dawnbuie’s picture

Issue summary: View changes
dawnbuie’s picture

Category: Support request » Bug report
dawnbuie’s picture

Title: How to install latest Mailchimp Library with guzzle requirements » How to install latest Mailchimp Library without guzzle requirements
Category: Bug report » Support request
Status: Active » Needs review

Ok doing further reading I found the following info here :

Installation

Dependencies are managed by Composer. After installing Composer, run the following command from the library root:

composer install --no-dev --ignore-platform-reqs

Or to install with phpunit:

composer install

So I tried #5's excellent local mac osx composer instructions again but using

composer install --no-dev --ignore-platform-reqs

this time. And it worked, updating all the dependencies (including Guzzle, but not including PHP Unit) within that folder on my computer. I was then able to ftp everything in that local folder to the /library directory of my drupal 7 site. So now I have a Mailchimp API 3 library that works with the latest stable Mailchimp drupal module/project 7.4.8

dawnbuie’s picture

ruscoe’s picture

Status: Needs review » Fixed

You're absolutely right. Using composer install --no-dev --ignore-platform-reqs will skip installing phpunit, which has a minimum PHP requirement of 5.6. It's only required for running tests so not having it won't cause you any problems.

Alternatively, you can download the .zip file in this release. It contains the library with all dependencies except phpunit.

gisle’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.