hugofirth / laravel-mailchimp

A composer package for the MailChimp API PHP class (as provided by MailChimp) which supports the Laravel 4 framework.
96 stars 27 forks source link

The Wrapper is redundant and will break on any changes in mailchimp's available properties #3

Closed rtablada closed 10 years ago

rtablada commented 10 years ago

Currently the wrapper requires a rewrite any time Mailchimp may add or remove possible properties (or if properties don't exist for some reason).

This can easily be solved using PHP's magic __call method instead of writing a ton of accessor methods.

I'm working on a PR, but just wanted to give you a heads up to the reason behind this PR.

hugofirth commented 10 years ago

Agreed - I knew this was a bit bad, but was just under pressure to update to version 2.0 of the Mailchimp API and the MC provided API class is a bit poor. I'm flat out but will implement this change tomorrow if you don't fancy it - otherwise, I look forward to your pull request. Always embarrassed when someone points out a code smell I've been too lazy to fix haha. Thanks for contributing.

rtablada commented 10 years ago

No worries! I'm testing out my __call method and working on some pass through things. Should have it done today.

hugofirth commented 10 years ago

Any word on the __call() version or shall I knock one up? I don't want to step on your toes if you just haven't had a chance to submit the PR. Let me know. Cheers

philippzentner commented 10 years ago

Any progress on this?