From 61f0a9cb43ee89d449882aaed36fb6234c1204a2 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Fri, 10 Mar 2017 15:28:39 -0800 Subject: [PATCH 1/9] CE-2889 remove all vestiges of MPNS --- docs/push.rst | 6 ----- src/UrbanAirship/Push/Audience.php | 18 +-------------- src/UrbanAirship/Push/Notification.php | 32 ++------------------------ src/tests/NotificationTest.php | 14 +---------- 4 files changed, 4 insertions(+), 66 deletions(-) diff --git a/docs/push.rst b/docs/push.rst index bf22b44..204ab21 100644 --- a/docs/push.rst +++ b/docs/push.rst @@ -83,9 +83,6 @@ Simple Selectors :function:`UrbanAirship\\Push\\wns` Select a single Windows 8 APID. -:function:`UrbanAirship\\Push\\mpns` - Select a single Windows Phone 8 APID. - :function:`UrbanAirship\\Push\\tag` Select a single tag. @@ -220,9 +217,6 @@ You can override the payload with platform-specific values as well. :function:`UrbanAirship\\Push\\wnsPayload` WNS specific platform override payload. -:function:`UrbanAirship\\Push\\mpnsPayload` - MPNS specific platform override payload. - Device Types ------------ diff --git a/src/UrbanAirship/Push/Audience.php b/src/UrbanAirship/Push/Audience.php index b91d1b7..6e78c4c 100644 --- a/src/UrbanAirship/Push/Audience.php +++ b/src/UrbanAirship/Push/Audience.php @@ -1,6 +1,6 @@ $uuid); } -/** - * Select a single Windows Phone 8 APID - * @param $uuid - * @return array - * @throws \InvalidArgumentException - */ -function mpns($uuid) -{ - // This could return a non boolean false if there is an error - if (preg_match(UUID_FORMAT, $uuid) == 0) { - throw new InvalidArgumentException("Invalid MPNS"); - } - - return array("mpns" => $uuid); -} - /** * Select a single tag. * @param string $tag diff --git a/src/UrbanAirship/Push/Notification.php b/src/UrbanAirship/Push/Notification.php index aecd35c..306d1fc 100644 --- a/src/UrbanAirship/Push/Notification.php +++ b/src/UrbanAirship/Push/Notification.php @@ -1,6 +1,6 @@ "Badge")); } - public function testMpns(){ - $this->assertEquals( - P\mpnsPayload("Alert", "Toast", "Tile"), - array('alert'=>"Alert", - 'toast'=>"Toast", - 'tile'=>"Tile")); - - $this->assertEquals( - P\mpnsPayload("Alert", null, null), - array('alert'=>"Alert")); - } - /** * @expectedException InvalidArgumentException */ From 8101796bb0db80cc8fadeac2ac4eca6e5a3a0adb Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Fri, 10 Mar 2017 15:29:49 -0800 Subject: [PATCH 2/9] update changelog --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 761e674..65d3905 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------- +0.4.0 +-------------------- +- Removed support for MPNS + -------------------- 0.3.0 -------------------- From ffe426c8538da590f98c7ab29fa78afb3e5685b8 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Mon, 10 Apr 2017 15:22:22 -0700 Subject: [PATCH 3/9] update contribution agreement link --- README.md | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a25f00..475e22a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Urban Airship PHP Library (Beta) ================================ PHP library for use with the Urban Airship API for sending push notifications. Supports iOS, Android, and Windows. -Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed [contribution agreement](http://urbanairship.com/legal/contribution-agreement/). +Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed [contribution agreement](http://docs.urbanairship.com/contribution-agreement/). Requirements ------------ diff --git a/docs/index.rst b/docs/index.rst index 684b5fe..eb41dab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ Urban Airship PHP Library This library is a wrapper for the `Urban Airship API`_ for PHP. -Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed `contribution agreement `__. +Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed `contribution agreement `__. Goals ----- From d4cb6bd786de9581d798ae2e34486ded7fbf3324 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Tue, 11 Apr 2017 09:37:09 -0700 Subject: [PATCH 4/9] version change --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 65d3905..767c5ab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,5 @@ -------------------- -0.4.0 +1.0.0 -------------------- - Removed support for MPNS From d384006c9b722e7bb70e1cd9d06c38224dc99490 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Tue, 11 Apr 2017 09:38:23 -0700 Subject: [PATCH 5/9] windoze --- docs/push.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/push.rst b/docs/push.rst index 204ab21..1d74ee4 100644 --- a/docs/push.rst +++ b/docs/push.rst @@ -81,7 +81,7 @@ Simple Selectors Select a single Android APID. :function:`UrbanAirship\\Push\\wns` - Select a single Windows 8 APID. + Select a single Windows APID. :function:`UrbanAirship\\Push\\tag` Select a single tag. From 735f31e3e8e6e64b034057e747b867c606d12a4b Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Wed, 13 Nov 2019 11:23:32 -0800 Subject: [PATCH 6/9] Redirect to support for issues and PR, fix docs, links, device type all --- README.md | 24 +++++++++++++++--------- docs/index.rst | 21 ++++++++++++--------- docs/push.rst | 35 ++++++++++++++--------------------- example/.DS_Store | Bin 0 -> 6148 bytes example/README.rst | 2 +- example/pushTest.php | 4 ++-- example/pusher.php | 18 ------------------ 7 files changed, 44 insertions(+), 60 deletions(-) create mode 100644 example/.DS_Store delete mode 100644 example/pusher.php diff --git a/README.md b/README.md index 475e22a..fb3fa9e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ -Urban Airship PHP Library (Beta) -================================ -PHP library for use with the Urban Airship API for sending push notifications. Supports iOS, Android, and Windows. +Airship PHP Library +=================== -Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed [contribution agreement](http://docs.urbanairship.com/contribution-agreement/). +PHP library for use with the Airship API for sending push notifications. +Supports iOS, Android, and Windows. + +Airship is no longer actively developing this library, but will respond to +feature requests, issues, and pull requests that are submitted via +https://support.airship.com. This library is provided as sample code, and +Airship makes no guarantees as to completeness or regularity of updates. +However, we do welcome pull requests with a signed `contribution agreement `__. Requirements ------------ @@ -40,9 +46,9 @@ $airship = new Airship("", ""); try { $response = $airship->push() - ->setAudience(P\all) - ->setNotification(P\notification("Hello from php")) - ->setDeviceTypes(P\all) + ->setAudience(P\iosChannel("Insert your iOS channel here!")) + ->setNotification(P\notification("Hello from PHP")) + ->setDeviceTypes(P\deviceTypes("ios")) ->send(); } catch (AirshipException $e) { print_r($e); @@ -52,6 +58,6 @@ try { Resources --------- -- [Home page](http://docs.urbanairship.com/reference/libraries/php/) +- [Home page](https://docs.airship.com/api/libraries/php/) - [Source](https://github.com/urbanairship/php-library2) -- [Support](http://support.urbanairship.com/) +- [Support](https://support.airship.com/) diff --git a/docs/index.rst b/docs/index.rst index eb41dab..2a33b22 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,10 +1,13 @@ -Urban Airship PHP Library -========================= +Airship PHP Library +=================== -This library is a wrapper for the `Urban Airship API`_ for -PHP. +This library is a PHP wrapper for the `Airship API`_. -Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed `contribution agreement `__. +Airship is no longer actively developing this library, but will respond to +feature requests, issues, and pull requests that are submitted via +https://support.airship.com. This library is provided as sample code, and +Airship makes no guarantees as to completeness or regularity of updates. +However, we do welcome pull requests with a signed `contribution agreement `__. Goals ----- @@ -32,9 +35,9 @@ Quick example use UrbanAirship\Push as P; $response = $airship->push() - ->setAudience(P\deviceToken("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")) - ->setNotification(P\notification("Hello from php!")) - ->setDeviceTypes(P\all) + ->setAudience(P\iosChannel("Insert your iOS channel here!")) + ->setNotification(P\notification("Hello from PHP")) + ->setDeviceTypes(P\deviceTypes("ios")) ->send(); print "Push sent!. Push IDs:" . $response.push_ids; @@ -82,6 +85,6 @@ Indices and tables * :ref:`search` -.. _Urban Airship API: http://docs.urbanairship.com/api/overview.html +.. _Airship API: https://docs.airship.com/api/ua/ .. _PHP-FIG Standards: http://www.php-fig.org/ .. _Monolog: https://github.com/Seldaek/monolog diff --git a/docs/push.rst b/docs/push.rst index 1d74ee4..f4cad41 100644 --- a/docs/push.rst +++ b/docs/push.rst @@ -10,8 +10,7 @@ notification, you: #. Specify device types. #. Deliver the notification. -This example performs a broadcast with the same alert to all recipients and -device types: +This example performs a broadcast with the same alert to all recipients: .. code-block:: php @@ -23,7 +22,7 @@ device types: $response = $airship->push() ->setAudience(P\all) ->setNotification(P\notification("Hello, World!")) - ->setDeviceTypes(P\all) + ->setDeviceTypes(P\deviceTypes("ios", "android")) ->send(); These selector functions are all in the :namespace:`Urbanairship\\Push` @@ -39,15 +38,14 @@ Audience Selectors An audience should specify one or more devices. An audience can be a device, such as a **Channel**; a tag, named user, or segment; a location; or a combination. Audience selectors are combined with ``and_``, ``or_``, and -``not_``. All selectors are available in the :namespace:`UrbanAirship\\Push` namespace. +``not_``. All selectors are available in the :namespace:`UrbanAirship\\Push` +namespace. Simple Selectors ++++++++++++++++ :constant:`UrbanAirship\\Push\\all` - Select all, to do a broadcast. - - Used in both ``audience`` and ``deviceTypes``. + Select all to do a broadcast to all devices. .. code-block:: php @@ -221,22 +219,18 @@ Device Types ------------ In addition to specifying the audience, you must specify the device types you -wish to target, either with a list of strings: - -.. code-block:: php - - $push->setDeviceTypes(P\deviceTypes('ios', 'android')); - -or with the :constant:`UrbanAirship\\Push\\all` shortcut. +wish to target with a list of strings: .. code-block:: php - $push->setDeviceTypes(P\all); + $push->setDeviceTypes(P\deviceTypes("ios", "android")); In-App Message -------------- -You can send an in-app message alone or with a push notification by using setInAppMessage. See :function:`UrbanAirship\\Push\\inAppMessage` for more information about parameters. +You can send an in-app message alone or with a push notification by using +setInAppMessage. See :function:`UrbanAirship\\Push\\inAppMessage` for more +information about parameters. .. code-block:: php @@ -253,8 +247,8 @@ You can send an in-app message alone or with a push notification by using setInA Message Center -------------- -If you'd like to send a Message Center message along with your notification (or alone), use -setMessage. See :function:`UrbanAirship\\Push\\message` for more information +If you'd like to send a Message Center message along with your notification (or +alone), use setMessage. See :function:`UrbanAirship\\Push\\message` for more information about parameters. .. code-block:: php @@ -266,6 +260,5 @@ about parameters. 0) ); -Note: Message Center is not supported on Windows or Windows Phone and -requires additional setup for other platforms. See our API and implementation -docs for more information. +Note: Message Center is not supported all platforms. See our API and +implementation docs for more information. diff --git a/example/.DS_Store b/example/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0push() - ->setAudience(P\iosChannel("")) + ->setAudience(P\iosChannel("Insert your iOS channel here!")) ->setNotification(P\notification("Hello from PHP")) - ->setDeviceTypes("ios") + ->setDeviceTypes(P\deviceTypes("ios")) ->send(); diff --git a/example/pusher.php b/example/pusher.php deleted file mode 100644 index 6fdf0a6..0000000 --- a/example/pusher.php +++ /dev/null @@ -1,18 +0,0 @@ -push() - ->setAudience(P\all) - ->setNotification(P\notification("Hello from PHP")) - ->setDeviceTypes(P\all) - ->send(); From 27eb15237bcca3b347fbe93094880db7e8e2f3b8 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Wed, 13 Nov 2019 11:45:32 -0800 Subject: [PATCH 7/9] also removing AUTHORS file because not really used, not in most other libs --- AUTHORS | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 1412d4e..0000000 --- a/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -This is a list of people who have contributed to the codebase located in this repository. If you make or have made a contribution to this codebase, you may add your name and, optionally, your email address below. - -Adam Lowry -Mele Sax-Barnett -Jennifer Miller \ No newline at end of file From 354ce581627874a50820aee1729fb896014badd4 Mon Sep 17 00:00:00 2001 From: Melelani Sax-Barnett Date: Wed, 13 Nov 2019 12:56:29 -0800 Subject: [PATCH 8/9] a few things I missed --- CHANGELOG | 3 ++- README.md | 6 +++--- src/UrbanAirship/About.php | 2 +- src/UrbanAirship/Push/Audience.php | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 767c5ab..485437a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,8 @@ -------------------- -1.0.0 +0.4.0 -------------------- - Removed support for MPNS +- Updated documentation -------------------- 0.3.0 diff --git a/README.md b/README.md index fb3fa9e..6ca5e4c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ Airship PHP Library =================== -PHP library for use with the Airship API for sending push notifications. -Supports iOS, Android, and Windows. +PHP library for use with the Airship REST API for sending notifications. +Supports iOS, Android, Amazon, and Windows. Airship is no longer actively developing this library, but will respond to -feature requests, issues, and pull requests that are submitted via +feature requests, issues, and pull requests when they are submitted via https://support.airship.com. This library is provided as sample code, and Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed `contribution agreement `__. diff --git a/src/UrbanAirship/About.php b/src/UrbanAirship/About.php index 4020426..691b9cc 100644 --- a/src/UrbanAirship/About.php +++ b/src/UrbanAirship/About.php @@ -3,5 +3,5 @@ namespace UrbanAirship; class About { - const LIBRARY_VERSION = '0.3.0'; + const LIBRARY_VERSION = '0.4.0'; } \ No newline at end of file diff --git a/src/UrbanAirship/Push/Audience.php b/src/UrbanAirship/Push/Audience.php index 6e78c4c..3548cfc 100644 --- a/src/UrbanAirship/Push/Audience.php +++ b/src/UrbanAirship/Push/Audience.php @@ -15,7 +15,7 @@ /** * Select all, to do a broadcast. * - * Used in both `audience` and `deviceTypes`. + * Used in `audience`. Previously also used in `deviceTypes` (now deprecated for that). */ CONST all = "all"; From f0719a7d3cb4e62885c41bcac83f06c5b260e611 Mon Sep 17 00:00:00 2001 From: Jade Westover <42981520+Jahdeh@users.noreply.github.com> Date: Thu, 9 Sep 2021 10:27:23 -0700 Subject: [PATCH 9/9] [TOOLSLIBS-330] Updated monolog to allow versions greater than 1 (#35) * Updated monolog to allow versions greater than 1 * version change --- CHANGELOG | 5 +++++ VERSION.txt | 2 +- composer.json | 2 +- src/UrbanAirship/About.php | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 485437a..687e8ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------- +0.4.1 +-------------------- +- Monolog versions greater than 1 are now allowed + -------------------- 0.4.0 -------------------- diff --git a/VERSION.txt b/VERSION.txt index 0d91a54..267577d 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.3.0 +0.4.1 diff --git a/composer.json b/composer.json index 812b8d6..f71ebda 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require":{ - "monolog/monolog":"1.*", + "monolog/monolog":">=1.0", "nategood/httpful":">=0.1.2" }, "require-dev": { diff --git a/src/UrbanAirship/About.php b/src/UrbanAirship/About.php index 691b9cc..0161f83 100644 --- a/src/UrbanAirship/About.php +++ b/src/UrbanAirship/About.php @@ -3,5 +3,5 @@ namespace UrbanAirship; class About { - const LIBRARY_VERSION = '0.4.0'; + const LIBRARY_VERSION = '0.4.1'; } \ No newline at end of file