GithubHelp home page GithubHelp logo

php-customerio's People

Contributors

chrisvanpatten avatar ericlbarnes avatar fideloper avatar frankmichel avatar grahamcampbell avatar ianlandsman avatar ninjaparade avatar patromo avatar waylanwong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-customerio's Issues

Importing old events

I can't import old events, it still shows me current date. Is there any available function to import old events?

Event errors due to empty data arrays being improperly converted

When sending an event with no data attached, the empty PHP array ($data = array()) is converted by PHP to an empty JSON collection (data: []) in the request.

Technically this is correct but Customer.io's servers need it to come in as an empty object/hash (data: {}). Previously they were more forgiving about it, but a recent update (Thursday or Friday of last week) has made their API more restrictive, causing it to reject events where the data attribute is an empty JSON collection instead of an empty object.

I've contacted Customer.io about the issue, in hopes that they will fix it on their end.

However if they don't, the fix is pretty simple. The parseData() method simply needs to check to see if it's being given an empty array and conditionally return an empty object:

<?php namespace Customerio;

use stdClass;

...

protected function parseData(array $data)
{
    if (empty($data))
    {
        return new stdClass;
    }

    return array('data' => $data);
}

If Customer.io gets back to me and says they won't be revert the change on their end (so their API is more forgiving), I'll file this fix as a formal pull request. Just wanted to note it here in case anyone is running into trouble and wants to apply a hotfix.

Guzzle version

Getting a guzzle version conflict in L4.2, which has guzzle 3.9.*

Can we bump this in here please?

SemVer

Would you consider re-tagging 1.0.4 as 2.0.0?

From a semver perspective, minor and patch releases (1.*.*) should only provide non-breaking fixes.

Because the Guzzle 6 change in #18 will break back-compat with PHP 5.3 and 5.4, semver would require a bump in the major version 2.0.0 (patch and minor releases, e.g. 1.0.4 or 1.1.0, must maintain backcompat with the major version).

The git commands to remove 1.0.4 and retag as 2.0.0:

git tag -d 1.0.4 && git push origin :refs/tags/1.0.4 && git tag -a 2.0.0 -m "2.0.0" && git push --tags

Just want to avoid folks who get caught off-guard, if they're doing 1.* or ~1.0 in their composer.json files and expect no breaking changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.