gomoob / php-pushwoosh Goto Github PK
View Code? Open in Web Editor NEWA PHP Library to easily send push notifications with the Pushwoosh REST Web Services.
Home Page: http://gomoob.github.io/php-pushwoosh
License: MIT License
A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.
Home Page: http://gomoob.github.io/php-pushwoosh
License: MIT License
It appears that Code Climate displays a bad code coverage (71% but should be 93% now).
This is because Code Climate does not support multiple code coverage payloads for one commit. As a workaround I added a code-climate-test-reporter
custom publisher script at the root of the project. This scripts publishes to code climate only if the PHP version is 5.3.
Check if it works when the develop
branch is merge into the master
branch.
The master branch have version 1.0.6 in composer.json
and package.json
but the last release is the 1.0.5.
Version 1.0.6 should definitly fixe this !
Examples are complicated to follow because no use
definitions are documented.
For example first example:
// Create a Pushwoosh client
$pushwoosh = Pushwoosh::create()
->setApplication('XXXX-XXX')
->setAuth('xxxxxxxx');
// Create a request for the '/createMessage' Web Service
$request = CreateMessageRequest::create()
->addNotification(Notification::create()->setContent('Hello Jean !'));
// Call the REST Web Service
$response = $pushwoosh->createMessage($request);
// Check if its ok
if($response->isOk()) {
print 'Great, my message has been sent !';
} else {
print 'Oups, the sent failed :-(';
print 'Status code : ' . $response->getStatusCode();
print 'Status message : ' . $response->getStatusMessage();
}
Could be documented as:
use Gomoob\Pushwoosh\Client\Pushwoosh;
use Gomoob\Pushwoosh\Model\Request\CreateMessageRequest;
use Gomoob\Pushwoosh\Model\Notification\Notification;
// Create a Pushwoosh client
$pushwoosh = Pushwoosh::create()
->setApplication('XXXX-XXX')
->setAuth('xxxxxxxx');
// Create a request for the '/createMessage' Web Service
$request = CreateMessageRequest::create()
->addNotification(Notification::create()->setContent('Hello Jean !'));
// Call the REST Web Service
$response = $pushwoosh->createMessage($request);
// Check if its ok
if($response->isOk()) {
print 'Great, my message has been sent !';
} else {
print 'Oups, the sent failed :-(';
print 'Status code : ' . $response->getStatusCode();
print 'Status message : ' . $response->getStatusMessage();
}
Thanks :)
Trying to build version 1.5.3 on Travis it appears that our version of phpdocumentor cannot be installed because of Zend packages and PHP version.
$ composer install
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for zendframework/zend-serializer 2.8.0 -> satisfiable by zendframework/zend-serializer[2.8.0].
- zendframework/zend-serializer 2.8.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 2
- zendframework/zend-serializer 2.8.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- phpdocumentor/phpdocumentor v2.0.1 requires zendframework/zend-serializer 2.* -> satisfiable by zendframework/zend-serializer[2.8.0].
- Installation request for phpdocumentor/phpdocumentor v2.0.1 -> satisfiable by phpdocumentor/phpdocumentor[v2.0.1].
The command "composer install" failed and exited with 2 during .
As end of life associated to PHP 5.5 is planned for 10 July 2016 (http://php.net/supported-versions.php) version 1.6 of php-pushwoosh should require a minimum version of PHP 5.6.
As a workaround for version 1.5.3 phpdocumentor has been downgraded to version 2.7.0
(see also FIXME comment in Gruntfile).
This line could be removed right or like the other method in that class you should return the instance.
Implement a request and a response for the /createTargetedMessage
web service.
The docs
directory is not useful anymore because documentation is available on Github pages.
The library has a version equal to 0.1.0, this is not compliant with Semantic Versioning (http://semver.org).
Change the version to 1.0.0 because the library is already stable, explain this version change on the home page of the project.
For now the TargetedMessageRequest
allows to set a devicesFilter
property as a string only.
It would be great to have a powerful DSL to create the device filters, for example.
$filters = StringTagFilter::create('username')->eq('my_username')->and(IntTagFilter::create('age')->between(15, 50))->join(ApplicationTagFilter::create('XXXXX-XXXXX');
This sample will be equivalent to (T("username", EQ, "my_username"), T("favorite_color", IN, ["red","green","blue"])) + A('XXXXX-XXXXX)
.
A first implementation has been started on the devices-filter
branch.
It seems Pushwoosh added new Android notification properties in their documentation, we should reflect this in our implementation.
// Android related
"android_root_params": {"key": "value"}, // custom key-value object. root level parameters for the android payload recipients
"android_sound" : "soundfile", // Optional. No file extension
"android_header":"header", // Optional. Android notification header
"android_icon": "icon",
"android_custom_icon": "http://example.com/image.png", // Optional. Full path URL to the image file
"android_banner": "http://example.com/banner.png", // Optional. Full path URL to the image file
"android_badges": 5, // Optional, integer. Android application icon badge number
"android_gcm_ttl": 3600, // Optional. Time to live parameter - the maximum lifespan of a message in seconds
"android_vibration": 0, // Android force-vibration for high-priority pushes, boolean
"android_led":"#rrggbb", // LED hex color, device will do its best approximation
"android_priority":-1, // Priority of the push in the Android push drawer, valid values are -2, -1, 0, 1 and 2
"android_ibc":"#RRGGBB", // Icon background color on Lollipop, #RRGGBB, #AARRGGBB, "red", "black", "yellow", etc.
We should also check properties for other OS.
Several users encounter difficulties to use the library without composer :
We should explain how to use the library without composer, a code sample will also help.
As explained in the http://docs.pushwoosh.com/docs/createmessage documentation it is possible to specify Country
and Language
conditions.
For example.
"conditions": [["Country", "EQ", "BR"],["Language", "EQ", "pt"]]
It would be useful to have 2 new conditions names CountryCondition
and LanguageCondition
with utility constants for country codes (i.e ISO_3166-2
) and language codes (i.e ISO-639-1
).
Here is a sample.
CountryCondition::create()->eq(CountryCode::FR);
LanguageCondition::create()->noteq(LanguageCode::GB);
The CountryCondition
and LanguageCondition
classes are specific StringCondition
which do not allow to specify the name of the tag.
I am using php-pushwoosh library and am getting an internal server error. I believe we may need to white list the ip but it seems it is constantly changing based on the server data. Also I find it strange that no folder/library was added to vendor for php-pushwoosh after installing it using composer. It shows when doing “php composer.phar show” but has no files it seems in the vendor folder. I was hoping you could help me figure out what I may need to do for this to work. Here is some screen shots of the afore mentioned instances.
To give more indications about the quality of the library it would be great to use a code quality check service like :
The Gomoob\Pushwoosh\Client\PushwooshMock
class has several functions, each function is empty and returns nothing which is not really good.
We should be able to return testing payloads in return to those functions, also we should be able to configure the Mock to test several scenarios (success, errors, etc.).
Adding a SensioLabs Insight badge on the home page would be great.
But before that we have to fix some coding errors, see the first analysis here.
https://insight.sensiolabs.com/projects/0b7fbff7-63c6-4083-84c3-ec4f61bec80a/analyses/1
See also http://www.php-fig.org/bylaws/psr-naming-conventions.
Algolia documentation search is great, we should add it to the documentation site.
We found an issue, that in the CurlClient, you are using there is no default timeout-value set.
In our case the call got stuck.
CURLOPT_CONNECTTIMEOUT
The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.
CURLOPT_TIMEOUT
The maximum number of seconds to allow cURL functions to execute.
http://gomoob.github.io/php-pushwoosh/create-message.html
$notification = Notification::create()
->addCondition(ListCondition::create('listCondition')->in('value 1', 'value 2', 'value 3'));
Should be
$notification = Notification::create()
->addCondition(ListCondition::create('listCondition')->in(array('value 1', 'value 2', 'value 3')));
The Pushwoosh client uses plain CURL calls https://github.com/gomoob/php-pushwoosh/blob/master/src/main/php/Gomoob/Pushwoosh/Client/CURLClient.php.
It works but it does not allow to unit test the class easily, we should create the following abstraction to improve it.
<?php
/**
* Copyright 2015 SARL GOMOOB. All rights reserved.
*/
namespace Gomoob\Curl;
/**
* Interface used to abstract the CURL PHP methods.
*
* @author Baptiste GAILLARD ([email protected])
* @see http://php.net/manual/book.curl.php
*/
interface ICurlRequest
{
/**
* Set an option for a cURL transfer.
*
* @param int option The CURLOPT_ option to set.
* @param mixed $value The value to be set on option.
*
* @return {Boolean} Returns TRUE on success or FALSE on failure.
*/
public function setOpt($option, $value);
/**
* Perform a cURL session.
*
* @return mixed Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set,
* it will return the result on success, FALSE on failure.
*/
public function exec();
/**
* Get information regarding a specific transfer.
*
* @param int $opt This may be one of the following constants:
* * CURLINFO_EFFECTIVE_URL - Last effective URL
* * CURLINFO_HTTP_CODE - Last received HTTP code
* * CURLINFO_FILETIME - Remote time of the retrieved document, if -1 is returned the time of
* the document is unknown
* * CURLINFO_TOTAL_TIME - Total transaction time in seconds for last transfer
* * CURLINFO_NAMELOOKUP_TIME - Time in seconds until name resolving was complete
* * CURLINFO_CONNECT_TIME - Time in seconds it took to establish the connection
* * CURLINFO_PRETRANSFER_TIME - Time in seconds from start until just before file transfer begins
* * CURLINFO_STARTTRANSFER_TIME - Time in seconds until the first byte is about to be transferred
* * CURLINFO_REDIRECT_COUNT - Number of redirects, with the CURLOPT_FOLLOWLOCATION option enabled
* * CURLINFO_REDIRECT_TIME - Time in seconds of all redirection steps before final transaction was
* started, with the CURLOPT_FOLLOWLOCATION option enabled
* * CURLINFO_REDIRECT_URL - With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found
* in the last transaction, that should be requested manually next. With
* the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The
* redirect URL in this case is available in CURLINFO_EFFECTIVE_URL
* * CURLINFO_PRIMARY_IP - IP address of the most recent connection
* * CURLINFO_PRIMARY_PORT - Destination port of the most recent connection
* * CURLINFO_LOCAL_IP - Local (source) IP address of the most recent connection
* * CURLINFO_LOCAL_PORT - Local (source) port of the most recent connection
* * CURLINFO_SIZE_UPLOAD - Total number of bytes uploaded
* * CURLINFO_SIZE_DOWNLOAD - Total number of bytes downloaded
* * CURLINFO_SPEED_DOWNLOAD - Average download speed
* * CURLINFO_SPEED_UPLOAD - Average upload speed
* * CURLINFO_HEADER_SIZE - Total size of all headers received
* * CURLINFO_HEADER_OUT - The request string sent. For this to work, add the
* CURLINFO_HEADER_OUT option to the handle by calling curl_setopt()
* * CURLINFO_REQUEST_SIZE - Total size of issued requests, currently only for HTTP requests
* * CURLINFO_SSL_VERIFYRESULT - Result of SSL certification verification requested by setting
* CURLOPT_SSL_VERIFYPEER
* * CURLINFO_CONTENT_LENGTH_DOWNLOAD - content-length of download, read from Content-Length: field
* * CURLINFO_CONTENT_LENGTH_UPLOAD - Specified size of upload
* * CURLINFO_CONTENT_TYPE - Content-Type: of the requested document, NULL indicates server did
* not send valid Content-Type: header
* * CURLINFO_PRIVATE - Private data associated with this cURL handle, previously set with
* the CURLOPT_PRIVATE option of curl_setopt()
*
* @return mixed If opt is given, returns its value. Otherwise, returns an associative array with the following
* elements (which correspond to opt), or FALSE on failure:
* * "url"
* * "content_type"
* * "http_code"
* * "header_size"
* * "request_size"
* * "filetime"
* * "ssl_verify_result"
* * "redirect_count"
* * "total_time"
* * "namelookup_time"
* * "connect_time"
* * "pretransfer_time"
* * "size_upload"
* * "size_download"
* * "speed_download"
* * "speed_upload"
* * "download_content_length"
* * "upload_content_length"
* * "starttransfer_time"
* * "redirect_time"
* * "certinfo"
* * "primary_ip"
* * "primary_port"
* * "local_ip"
* * "local_port"
* * "redirect_url"
* * "request_header" (This is only set if the CURLINFO_HEADER_OUT is set by a previous call to
* curl_setopt())
*
* Note that private data is not included in the associative array and must be retrieved individually with
* the CURLINFO_PRIVATE option.
*/
public function getInfo($opt = 0);
/**
* Close a cURL session.
*/
public function close();
}
For example here:
"content":{ // Object( language1: 'content1', language2: 'content2' ) OR string.
It would be nice if you update the related phpdocs.
Today our premium subscription to pushwoosh ended. When we tried to push a message to the API it returned the following:
array (size=3)
'status_code' => int 210
'status_message' => string 'This feature is available for Premium accounts only' (length=51)
'response' => null
Though, the package didn't return the status message as an error. Instead it returned this:
array_key_exists() expects parameter 2 to be array, null given
// Gomoob/Pushwoosh/Model/Response/CreateMessageResponse.php:43
if (array_key_exists('Messages', $json['response'])) {
Maybe we could implement a way to handle these kinds of status messages? What do you think?
We need help to find why the tests are now failing on PHPUnit getMock()
method with HHVM.
See the result of the following build https://travis-ci.org/gomoob/php-pushwoosh/jobs/142600741.
Do you have any idea why this is failing with HHVM ?
Seems to be a bug with HHVM bug its weird to fail on a so simple case !
Issue #13 describes an error message This feature is available for Premium accounts only
returned by Pushwoosh when the Pushwoosh subscription ended.
As @vinkla indicated in the issue re-activating the subscription takes several hours, so developers will receive a message to activate their premium account even if it is already activated.
The Puhswoosh support indicates that it usually takes up to a half hour before it kicks in.
It could be great to be able to attach additional informations to the php-pushwoosh responses when an error is encountered and this error is not presice enough.
For example we could do something like that :
if(!$response->isOk()) {
// Display the HTTP status code
echo $response->getStatusCode();
// Standard error message returned by Pushwoosh
echo $response->getStatusMessage();
// The previous error message gives a clue but its not precise enough
// So we ask the php-pushwoosh library if it has more indications about our
// error
echo $response->getStatusMessageHelp();
}
The third echo
could display something like.
The Pushwoosh servers indicates your Premium account subscription is expired. If you reniewed your subscription please be aware that re-activating the subscription could take several hours.
For the version 2.0.0
all the PSR naming conventions should be respected (http://www.php-fig.org/bylaws/psr-naming-conventions).
If possible the project should use a tool to automatically check those naming conventions on Travis.
The following fork https://github.com/jhumez/php-pushwoosh/commit/150cecd8b910e8f63b9aa630fdca259ca5d2a8c1 add Chrome and Firefix support in RegisterDeviceRequest
, we should add this also.
Official documentation http://docs.pushwoosh.com/docs/registerdevice.
It seems Travis now supprts PHP 7.1 with identifier 7.1.0alpha1
, we should add it to our travis confuguration.
We are implementing pushwoosh in production and I don't know how to send push messages only to test devices. That's why I have to be careful doing tests.
Looking in the documentation I found that filters can be applied, can it be that there is a native filter "TestDevices"?
Notification::create()->setFilter ("TestDevices")->setContent ("Content");
If not, as would be the steps to send push notification only to test device, sorry if it is in the documentation and I did not see it.
Fatal Error while using Gomoob\Pushwoosh\Client\PushwooshMock
class, Gomoob\Pushwoosh\IPushwoosh::createTargetedMessage
abstract method is not implemented.
See http://blog.madewithlove.be/post/gitattributes, this will allow users of the library to pull a lighten dist package and so improve download time.
Today our premium account had ended and we had no idea what was going on until I tried making a request directly against the Pushwoosh API. The answer from the Pushwoosh API was:
{#363
+"status_code": 210
+"status_message": "This feature is available for Premium accounts only"
+"response": null
}
Though, this is what I got back from this library:
ErrorException array_key_exists() expects parameter 2 to be array, null given
vendor/gomoob/php-pushwoosh/src/main/php/Gomoob/Pushwoosh/Model/Response/CreateMessageResponse.php:43
Maybe we can return the error messages whenever the Pushwoosh API return 210?
When using the sample code with my api key and application code set I receive an internal server error. The library has been added by composer and when using the update command it says it has been generated. I tried putting the code in a page controller instead of the api and still no luck or reason why. If you could help me with this I would greatly appreciate it. I apologize and thank you for your time.
Yesterday the Pushwoosh team published a new version of their documentation (http://docs.pushwoosh.com/docs/createmessage). The link to our library has been removed from this documentation.
We should ask Pushwoosh to add the link back, or even better propose to the Pushwoosh team to add a php-pushwoosh tab in each PHP sample (we could write those samples).
Currently the Gomoob\Pushwoosh\Model\Notification\Notification
class has an F note on Code Climate. This is bad and we have to fix it.
See also https://codeclimate.com/changelog/5670481aac74390098001828 because the Notification
class has no design problems.
For unknown reasons Pager https://poser.pugx.org does not work, so we have to replace Badge Poser by an other badge service. Shields.io seems to be a good candidate.
Here is the Markdown code to replace de 3 first badges :
[![Total Downloads](https://img.shields.io/packagist/dt/gomoob/php-pushwoosh.svg)](https://packagist.org/packages/gomoob/php-pushwoosh)
[![Latest Stable Version](https://img.shields.io/github/release/gomoob/php-pushwoosh.svg)](https://packagist.org/packages/gomoob/php-pushwoosh)
[![License](https://img.shields.io/packagist/l/gomoob/php-pushwoosh.svg)](https://packagist.org/packages/gomoob/php-pushwoosh)
As the library should be a good quality one we could also add the following badges :
[![Issues](https://img.shields.io/github/issues/gomoob/php-pushwoosh.svg)](https://github.com/gomoob/php-pushwoosh/issues)
Create a pull request to add it here https://github.com/ziadoz/awesome-php
Hi! Great work!
Is it ok to put the link to your SDK on official Pushwoosh website?
The timezone attribute is optional as described into the Pushwoosh documentation of API v1.3.
We have a note about this here https://github.com/gomoob/php-pushwoosh/blob/master/src/main/php/Gomoob/Pushwoosh/Client/CURLClient.php#L32.
In fact its very simple to fix :
The client should be able to specify a path to ca.pem and control SSL certificate verification.
This should also be added in the documentation.
A good source of inspiration for the documentation is also http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html#verify.
Pushwoosh now includes in its raw createMessage response a list of devices/tokens for which it does not know what they are (likely because the user removed the app or the token was renewed.) This is similar to the bulk /getunregistereddevices call, but applies to each message in the moment as you try to send it. See example output $json from CreateMessageResponse::create below:
Array
(
[status_code] => 200
[status_message] => OK
[response] => Array
(
[Messages] => Array
(
[0] => CODE_NOT_AVAILABLE
)
[UnknownDevices] => Array
(
[] => Array
(
[0] => 0017a2859e0cc1d37bdfc83cf3e92a8bb47f6405b213516eba76082562d3a646
)
)
)
)
It would be helpful if CreateMessageResponse could pass these unknown devices back up the chain to userland code to allow me to remove my records of those bad tokens. A method similar to the existing setMessages
would be nice, something like setUnknownDevices
:
// If 'UnknownDevices' are provided
if (array_key_exists('UnknownDevices', $json['response'])) {
$createMessageResponseResponse->setUnknownDevices($json['response']['UnknownDevices']);
}
Recently Pushwoosh updated its Remote Guide API documentation, version 2.x.x
of the library should progressively implement the new requests.
/getMessageDetails
(http://docs.pushwoosh.com/docs/getmessagedetails)/addTag
(http://docs.pushwoosh.com/docs/addtag) (see work already done on this here https://github.com/gigigoapps/php-pushwoosh/commits/master)/deleteTag
(http://docs.pushwoosh.com/docs/deletetag)/listTags
(http://docs.pushwoosh.com/docs/listtags)/applicationOpen
(http://docs.pushwoosh.com/docs/applicationopen)/messageDeliveryEvent
(http://docs.pushwoosh.com/docs/messagedeliveryevent)/setPurchase
(http://docs.pushwoosh.com/docs/setpurchase)/addGeoZone
(http://docs.pushwoosh.com/docs/addgeozone)/addGeoZoneCluster
(http://docs.pushwoosh.com/docs/addgeozonecluster)/deleteGeoZone
(http://docs.pushwoosh.com/docs/deletegeozone)/deleteGeoZoneCluster
(http://docs.pushwoosh.com/docs/deletegeozonecluster)/listGeoZoneClusters
(http://docs.pushwoosh.com/docs/listgeozoneclusters)/listGeoZones
(http://docs.pushwoosh.com/docs/listgeozones)/updateGeoZone
(http://docs.pushwoosh.com/docs/updategeozone)/listTestDevices
(http://docs.pushwoosh.com/docs/listtestdevices)/getApplicationSubscribersStats
(http://docs.pushwoosh.com/docs/getapplicationsubscribersstats)/getTagStats
(http://docs.pushwoosh.com/docs/gettagstats)/getAppStats
(http://docs.pushwoosh.com/docs/getappstats)/getCampaignStats
(http://docs.pushwoosh.com/docs/getcampaignstats)/getMsgStats
(http://docs.pushwoosh.com/docs/getmsgstats)/getMsgPlatformsStats
(http://docs.pushwoosh.com/docs/getmsgplatformsstats)/getResults
(http://docs.pushwoosh.com/docs/getresults)/configureApplication for iOS
(http://docs.pushwoosh.com/docs/configureapplication-for-ios)/configureApplication for Android
(http://docs.pushwoosh.com/docs/configureapplication-for-android)/configureApplication for Windows Phone
(http://docs.pushwoosh.com/docs/configureapplication-for-windows-phone)/configureApplication for Mac OS X
(http://docs.pushwoosh.com/docs/configureapplication-for-os-x)/configureApplication for Blackberry
(http://docs.pushwoosh.com/docs/configureapplication-for-blackberry)/configureApplication for Windows 8
(http://docs.pushwoosh.com/docs/configureapplication-for-windows-8)/configureApplication for Amazon
(http://docs.pushwoosh.com/docs/configureapplication-for-amazon)/configureApplication for Safari and Chrome
(http://docs.pushwoosh.com/docs/configureapplication-for-safari-and-chrome)/createApplication
(http://docs.pushwoosh.com/docs/createapplication)/updateApplication
(http://docs.pushwoosh.com/docs/updateapplication)/deleteApplication
(http://docs.pushwoosh.com/docs/deleteapplication)/createCampaign
(http://docs.pushwoosh.com/docs/createcampaign)/deleteCampaign
(http://docs.pushwoosh.com/docs/deletecampaign)/createTestDevice
(http://docs.pushwoosh.com/docs/createtestdevice)/getApplication
(http://docs.pushwoosh.com/docs/getapplication)/getApplications
(http://docs.pushwoosh.com/docs/getapplications)/getApplicationFile
(http://docs.pushwoosh.com/docs/getapplicationfile)/postEvent
(http://docs.pushwoosh.com/docs/postevent)/registerUser
(http://docs.pushwoosh.com/docs/registeruser)/getPushHistory
(http://docs.pushwoosh.com/docs/getpushhistory)/getUnregisteredDevices
(http://docs.pushwoosh.com/docs/getunregistereddevices)/getApplicationSubscribers
(http://docs.pushwoosh.com/docs/getapplicationsubscribers)/getPreset
(http://docs.pushwoosh.com/docs/getpreset)To day we encountered a strange error while trying to send a Pushwoosh message.
Here it is :
Argument 1 passed to Gomoob\Pushwoosh\Model\Response\CreateMessageResponse::create() must be of the type array, null given, called in /home/ec2-user/project-xxxx/zf2/vendor/gomoob/php-pushwoosh/src/main/php/Gomoob/Pushwoosh/Client/Pushwoosh.php on line 142 and defined
It appears the CURLClient.pushwooshCall($method, array $data)
returned a null
response which is not normal.
The implementation of the CURLClient
is not robust enough because it simply log errors in the console which is very very bad.
...
$response = curl_exec($ch);
$error = curl_error($ch);
if ($error) {
$info = curl_getinfo($ch);
// FIXME
var_dump($error);
var_dump($info);
}
curl_close($ch);
return json_decode($response, true);
Here we should do 2 things :
PushwooshException
(perhaps this class has to be improved to be able to attach more details to an exception)$response
variable is null
create a PushwooshException
tooIn all cases throw the exception if an error is encountered.
Hello!
Please remove minimize_link value 3(baidu).
It deprecated and removed.
Proof https://www.facebook.com/Pushwoosh/posts/756668594476249
Following a message from @rjbijl, we could add a link to their Symfony 2 integration of php-pushwoosh https://github.com/Prezent/pushwoosh-bundle.
Thanks !
For now the builds on Travis are executed with PHP 5.3, 5.4 and 5.5.
We should execute the unit tests with all the PHP versions available on Travis : http://docs.travis-ci.com/user/ci-environment/#PHP-VM-images
Today Guzzle is used in many Web Services PHP libraries, it would be great to allow the library to use Guzzle instead of the CURL HTTP client.
The current documentation is good but not enough :-)
Update the Jekyll documentation to have something more modern like the following sample http://gomoob.github.io/backbone.hateoas.
Hi, last updates was almost 3 years ago, is this package still working against pushwoosh API ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.