diff --git a/.travis.yml b/.travis.yml index 7982182..d6e8993 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: php +dist: trusty php: - - 5.4 - - 5.5 - - 5.6 + - 7.2 + - 7.3 + - 7.4 - hhvm env: diff --git a/README.md b/README.md index 23ee188..aade1e5 100755 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Constant Contact PHP SDK -[![Build Status](https://secure.travis-ci.org/constantcontact/php-sdk.png?branch=master)](http://travis-ci.org/constantcontact/php-sdk) [![Latest Stable Version](https://poser.pugx.org/constantcontact/constantcontact/v/stable.svg)](https://packagist.org/packages/constantcontact/constantcontact) [![Latest Unstable Version](https://poser.pugx.org/constantcontact/constantcontact/v/unstable.svg)](https://packagist.org/packages/constantcontact/constantcontact) ### This library utilizes [GuzzlePHP](http://guzzle.readthedocs.org/) ## Installing via Composer (recommended) -[Composer](https://getcomposer.org/) is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project. In order to use the Constant Contact PHP SDK through composer, you must add "constantcontact/constantcontact" as a dependency in your project's composer.json file. + +[Composer](https://getcomposer.org/) is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project. In order to use the Constant Contact PHP SDK through composer, you must add "yousaf-saqib/cc-php-sdk" as a dependency in your project's composer.json file which is a fork of "constantcontact/constantcontact". ```javascript { "require": { - "constantcontact/constantcontact": "2.1.*" + "yousaf-saqib/cc-php-sdk": "1.0.*" } } ``` @@ -25,7 +25,7 @@ API Documentation is located at http://developer.constantcontact.com/docs/develo ## Usage The ConstantContact class contains the underlying services that hold the methods that use the API. ```php -use Ctct\ConstantContact; +use YousafSaqib\ConstantContact\ConstantContact; $cc = new ConstantContact('your api key'); $contacts = $cc->contactService->getContacts('your access token') @@ -37,6 +37,11 @@ $params = array("limit" => 500); $contacts = $cc->contactService->getContacts('your access token', $params); ``` ## Minimum Requirements -Use of this library requires PHP 5.4+, and PHP cURL extension (http://php.net/manual/en/book.curl.php) +Use of this library requires PHP 7.2+, and PHP cURL extension (http://php.net/manual/en/book.curl.php) + +If you are being required to use an older version of PHP, it is highly recommended that you update to at least 7.2 . + + +## Changes from Orignal Client -If you are being required to use an older version of PHP, it is highly recommended that you update to at least 5.4 - but you can use version 1.3.* via composer, or [manually](https://github.com/constantcontact/php-sdk/tree/v1-master). +- New attribute added in connstant contant campaign tracking activity which contains clicked uri information \ No newline at end of file diff --git a/composer.json b/composer.json index 8bc7064..b92a621 100755 --- a/composer.json +++ b/composer.json @@ -1,28 +1,38 @@ { - "name": "constantcontact/constantcontact", + "name": "yousaf-saqib/cc-php-sdk", "type": "library", "description": "Constant Contact PHP SDK for v2", - "keywords": ["constantcontact", "ctct", "email marketing", "constant contact"], + "keywords": [ + "constantcontact", + "ctct", + "email marketing", + "constant contact" + ], "homepage": "http://developer.constantcontact.com", "license": "MIT", "require": { - "php": ">=5.4.0", - "ext-curl": "*", - "guzzlehttp/guzzle": "^5.1.0" + "guzzlehttp/guzzle": "^7.0", + "ext-curl": "^7.2", + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "4.4.1" + "phpunit/phpunit": "^8.5" }, "authors": [ { "name": "Constant Contact Web Services", "email": "webservices@constantcontact.com", "homepage": "http://developer.constantcontact.com" + }, + { + "name": "Yousaf Saqib", + "email": "yousafsaqib979@gmail.com", + "homepage": "http://developer.constantcontact.com" } ], "autoload": { - "psr-0": { - "Ctct": "src" + "psr-4": { + "YousafSaqib\\ConstantContact\\": "src" } } -} +} \ No newline at end of file diff --git a/examples/addOrUpdateContact.php b/examples/addOrUpdateContact.php index 02a02e8..ea4da8a 100644 --- a/examples/addOrUpdateContact.php +++ b/examples/addOrUpdateContact.php @@ -8,19 +8,19 @@ @@ -155,7 +155,7 @@ echo '
';
     print_r($returnContact);
     echo '
'; -} ?> +}?> diff --git a/examples/createAndScheduleCampaign.php b/examples/createAndScheduleCampaign.php index bb035b0..84aa400 100644 --- a/examples/createAndScheduleCampaign.php +++ b/examples/createAndScheduleCampaign.php @@ -18,13 +18,13 @@ contact_id = parent::getValue($props, "contact_id"); $click_activity->email_address = parent::getValue($props, "email_address"); $click_activity->link_id = parent::getValue($props, "link_id"); + $click_activity->link_uri = parent::getValue($props, "link_uri"); $click_activity->click_date = parent::getValue($props, "click_date"); return $click_activity; } diff --git a/src/Ctct/Components/Tracking/ForwardActivity.php b/src/Components/Tracking/ForwardActivity.php old mode 100755 new mode 100644 similarity index 90% rename from src/Ctct/Components/Tracking/ForwardActivity.php rename to src/Components/Tracking/ForwardActivity.php index f2118e8..0f4b69a --- a/src/Ctct/Components/Tracking/ForwardActivity.php +++ b/src/Components/Tracking/ForwardActivity.php @@ -1,7 +1,7 @@ diff --git a/src/Ctct/autoload.php b/src/autoload.php similarity index 100% rename from src/Ctct/autoload.php rename to src/autoload.php diff --git a/test/Auth/CtctOAuth2UnitTest.php b/test/Auth/CCOAuth2UnitTest.php similarity index 96% rename from test/Auth/CtctOAuth2UnitTest.php rename to test/Auth/CCOAuth2UnitTest.php index 70d9c82..d9643c9 100644 --- a/test/Auth/CtctOAuth2UnitTest.php +++ b/test/Auth/CCOAuth2UnitTest.php @@ -1,13 +1,13 @@