What’s Trending in 2026? Let’s Plan Ahead—Together. šŸ“ˆ
Explore the trends + tell us how you’d use them.

PHP SDK Compatiblity with PHP 7

Hi there:

I set up a Constant Contact integration for our website using the PHP SDK adapted from the sample code for the email signup form (https://github.com/constantcontact/php-sdk/blob/development/examples/addOrUpdateContact.php). We recently upgraded our server to PHP 7.2.12 and have been receiving the following error:

Ā 

Fatal error: Cannot use lexical variable $eventName as a parameter name inĀ /nfs/c04/h02/mnt/67435/domains/mysticchorale.org/html/wp-content/themes/mc/constant_contact_library/vendor/guzzlehttp/guzzle/src/Event/Emitter.phpĀ on lineĀ 48

Ā 

Is there any way of updating the PHP SDK files to address this error and make the library usable with PHP 7?

Ā 

If the library is not compatible is there an equivalent example you can provide similar to the sample code I linked above for a sign up form that would be compatible with V3 of the API? I did briefly review the V3 documentation and was confused, I don't understand how to duplicate the functionality I was able to set up using the PHP SDK with V2 in V3 of the API.

Ā 

Without going into detail the Constant Contact integration on our site is more complicated than a simple sign up form. The integration is handled as part of a larger member registration process which triggers list updates in a few different circumstances (including being initiated by the purchase of a product in WooCommerce).

Ā 

Hope all of the above makes sense. Please get back to me when you have a chance. I need to have a solution in place for this by Monday December 2nd. Thanks for your help!

-Robert

Join Our New Small Business Marketplace!

We're highlighting small businesses from our community. Add your business to the Marketplace to get discovered by new customers and support other entrepreneurs.