Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel Version Support #18

Closed
andreliem opened this issue Feb 24, 2016 · 3 comments
Closed

Laravel Version Support #18

andreliem opened this issue Feb 24, 2016 · 3 comments

Comments

@andreliem
Copy link

Does this package only work on Laravel version 5.x? Wasn't quite sure from the documentation.

Thanks

@thaddow
Copy link

thaddow commented Feb 24, 2016

I am coming up with the same issue while trying to update composer. pacely/mailchimp-apiv3 dev-master requires illuminate/support ~5.0 -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev], illuminate/support[5.0.x-dev, 5.1.x-dev .......

@andreliem
Copy link
Author

I think it only works with 5.x due to the illuminate/support 5.0 requirement, which I believe is due to a dependancy on the Collection class.

I have been able to use a modified version no problem though with Laravel 4.2. I might create a pull request if there's any interest for those of us stuck on Laravel 4

In case you want a quick solution for now, just update the makeRequest function in
https://github.com/pacely/mailchimp-api-v3/blob/master/src/Mailchimp.php

To do something like this:


            $body = json_decode($response->getBody(), true);

            if (!$body) {
                return $body;
            }

            $collection = new Collection($body);

Warning though, this is not well tested, just trying it out now until I can spend more time on it and will send a pull request if it actually makes sense.

@andreliem
Copy link
Author

Also, this might be obvious, but I'm not using the package right now due to the composer issues. Just testing out a direct copy&paste of the MailChimp class for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants