From 792d1b64bfc89a0be68929849ec8306f1902a1db Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Sun, 12 Nov 2017 21:47:05 -0800 Subject: [PATCH 1/7] prepped for 1.4.0 release --- CHANGELOG.md | 21 ++++++++++++++++++++- src/Parse/ParseClient.php | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a20dd154..08259d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,26 @@ ## Parse PHP SDK Changelog ### master -[Full Changelog](https://github.com/parse-community/parse-php-sdk/compare/1.3.0...master) +[Full Changelog](https://github.com/parse-community/parse-php-sdk/compare/1.4.0...master) + +### 1.4.0 +[See the diff between 1.3.0 and 1.4.0](https://github.com/parse-community/parse-php-sdk/compare/1.3.0...1.4.0) + +- Fixes encode/decode method descriptors +- Adds Relative Time Queries (#360) +- Adds Server Info (#361) +- README & Code Cleanup, adds CHANGELOG & CODE_OF_CONDUCT +- Adds Purge & Polygon to ParseSchema (#365) +- Adds Parse Server Health Check (#366) +- Adds the ability to upgrade to a revocable session (#368) +- Adds ability to Request Verification Emails (#369) +- Adds the ability to set/save in `ParseConfig` (#371) +- Adds `ParseLogs` (#370) +- Adds `ParseAudience` (#372) +- Adds jobs to `ParseCloud` (#373) +- Adds support for aggregate queries (#355) (thanks to [Diamond Lewis](https://github.com/dplewis)) +- > MAY ADD INDEX MANAGEMENT VIA PARSE SCHEMA +- Slight test adjustments ### 1.3.0 [See the diff between 1.2.10 and 1.3.0](https://github.com/parse-community/parse-php-sdk/compare/1.2.10...1.3.0) diff --git a/src/Parse/ParseClient.php b/src/Parse/ParseClient.php index 5a0b7d72..45b58b5d 100755 --- a/src/Parse/ParseClient.php +++ b/src/Parse/ParseClient.php @@ -111,11 +111,11 @@ final class ParseClient private static $caFile; /** - * Constant for version string to include with requests. Currently 1.3.0. + * Constant for version string to include with requests. Currently 1.4.0. * * @var string */ - const VERSION_STRING = 'php1.3.0'; + const VERSION_STRING = 'php1.4.0'; /** * Parse\Client::initialize, must be called before using Parse features. From 8af897bf27ef7da1a44be9aac03effcb4cb1b5db Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Fri, 1 Dec 2017 23:55:43 -0800 Subject: [PATCH 2/7] new additions to changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08259d1f..0f4553b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Fixes encode/decode method descriptors - Adds Relative Time Queries (#360) - Adds Server Info (#361) -- README & Code Cleanup, adds CHANGELOG & CODE_OF_CONDUCT +- README and code cleanup, adds **CHANGELOG** and **CODE_OF_CONDUCT** - Adds Purge & Polygon to ParseSchema (#365) - Adds Parse Server Health Check (#366) - Adds the ability to upgrade to a revocable session (#368) @@ -19,7 +19,9 @@ - Adds `ParseAudience` (#372) - Adds jobs to `ParseCloud` (#373) - Adds support for aggregate queries (#355) (thanks to [Diamond Lewis](https://github.com/dplewis)) -- > MAY ADD INDEX MANAGEMENT VIA PARSE SCHEMA +- Fix npm license warning (thanks to [Arthur Cinader](https://github.com/acinader)) +- Updates **parse-server-test** dependency to 1.3.5 +- Support for managing indexes via **ParseSchema** (#357) (thanks to [Diamond Lewis](https://github.com/dplewis)) - Slight test adjustments ### 1.3.0 From 534eadf80b98220c31fc48b8afe5b253eeb2f4bf Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Sat, 2 Dec 2017 00:13:50 -0800 Subject: [PATCH 3/7] adds verification emails & ParseConfig to README --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 725518d3..73b5143b 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Please note that this documentation contains the latest changes that may as of y - [Use Declarations](#use-declarations) - [Parse Objects](#parse-objects) - [Users](#users) + - [Verification Emails](#verification-emails) - [ACLs/Security](#acls) - [Queries](#queries) - [Aggregate](#aggregate) @@ -30,6 +31,7 @@ Please note that this documentation contains the latest changes that may as of y - [Relative Time](#relative-time) - [Cloud Functions](#cloud-functions) - [Cloud Jobs](#cloud-jobs) + - [Config](#config) - [Analytics](#analytics) - [Files](#files) - [Push Notifications](#push) @@ -285,6 +287,14 @@ try { $user = ParseUser::getCurrentUser(); ``` +#### Verification Emails + +If you are using email verification in your parse server setup you can request to send verification emails by hand. +```php +ParseUser::requestVerificationEmail('email@example.com'); +``` +Note that this will only send if the account for the email requested has not already been verified. + ### ACLs Access Control Lists (ACLs) allow you to granularly control access to individual Parse Objects. @@ -432,6 +442,25 @@ $status = $jobStatus->get('status'); // failed / succeeded when done ``` +### Config + +**ParseConfig** allows you to access the global **Config** object for your parse server setup. +You can get, set and update simple values much like you would on an instance of **ParseObject**. Through this all your SDKs and applications can have access to global settings, options, and more. +What you choose to put in your config is purely up to you however. +```php +$config = new ParseConfig(); + +// check a config value of yours +$allowed = $config->get('feature_allowed'); + +// add a simple config value +$config->set('feature_allowed', true); + +// save this global config +$config->save(); +``` + + ### Analytics A specialized Parse Object built purposely to make analytics easy. From 0dff71ebdf415a0c5a569d7e8105bee8b2f07665 Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Sat, 2 Dec 2017 15:31:46 -0800 Subject: [PATCH 4/7] update README & test version to 1.4.0 --- README.md | 2 +- tests/Parse/ParseInstallationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 73b5143b..5aa5d38f 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Note that the Parse PHP SDK requires PHP 5.4 or newer. It can also run on HHVM ( ```json { "require": { - "parse/php-sdk" : "1.3.*" + "parse/php-sdk" : "1.4.*" } } ``` diff --git a/tests/Parse/ParseInstallationTest.php b/tests/Parse/ParseInstallationTest.php index ba4187bb..fa6527d9 100644 --- a/tests/Parse/ParseInstallationTest.php +++ b/tests/Parse/ParseInstallationTest.php @@ -98,7 +98,7 @@ public function testInstallation() $appVersion = '1.0.0'; $appName = 'Foo Bar App'; $appIdentifier = 'foo-bar-app-id'; - $parseVersion = '1.3.0'; + $parseVersion = '1.4.0'; $installation = new ParseInstallation(); $installation->set('installationId', $installationId); From 75a4992e53f361709a3b9983bce77783ceebdc90 Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Sat, 2 Dec 2017 15:34:18 -0800 Subject: [PATCH 5/7] pull version from current sdk version --- tests/Parse/ParseInstallationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Parse/ParseInstallationTest.php b/tests/Parse/ParseInstallationTest.php index fa6527d9..b03b194e 100644 --- a/tests/Parse/ParseInstallationTest.php +++ b/tests/Parse/ParseInstallationTest.php @@ -2,6 +2,7 @@ namespace Parse\Test; +use Parse\ParseClient; use Parse\ParseInstallation; class ParseInstallationTest extends \PHPUnit_Framework_TestCase @@ -98,7 +99,7 @@ public function testInstallation() $appVersion = '1.0.0'; $appName = 'Foo Bar App'; $appIdentifier = 'foo-bar-app-id'; - $parseVersion = '1.4.0'; + $parseVersion = substr(ParseClient::VERSION_STRING, 3); // pull the version # $installation = new ParseInstallation(); $installation->set('installationId', $installationId); From 3e00569ffea115b9b1e0a7afba40c3d07376c266 Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Mon, 4 Dec 2017 22:15:37 -0800 Subject: [PATCH 6/7] Update parse-server-test to 1.3.6, pinning mongodb to v3.4 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4553b3..60ac4141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ - Adds jobs to `ParseCloud` (#373) - Adds support for aggregate queries (#355) (thanks to [Diamond Lewis](https://github.com/dplewis)) - Fix npm license warning (thanks to [Arthur Cinader](https://github.com/acinader)) -- Updates **parse-server-test** dependency to 1.3.5 +- Updates **parse-server-test** dependency to 1.3.6 - Support for managing indexes via **ParseSchema** (#357) (thanks to [Diamond Lewis](https://github.com/dplewis)) - Slight test adjustments diff --git a/package.json b/package.json index d2fa01ef..2a4b3f7b 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,6 @@ "license": "SEE LICENSE IN LICENSE", "homepage": "https://github.com/montymxb/parse-server-test#readme", "dependencies": { - "parse-server-test": "1.3.5" + "parse-server-test": "1.3.6" } } From 20f3b5eee2219e11411a1f259ffc9507b07cde50 Mon Sep 17 00:00:00 2001 From: Benjamin Friedman Date: Mon, 4 Dec 2017 23:02:04 -0800 Subject: [PATCH 7/7] Use mongodb 3.4 on prestart --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a4b3f7b..462b0828 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "test-stream:coverage": "./vendor/bin/phpunit --bootstrap=./tests/bootstrap-stream.php --coverage-clover=coverage.xml", "lint": "./vendor/bin/phpcs --standard=./phpcs.xml.dist ./src/Parse ./tests/Parse", "lint:fix": "./vendor/bin/phpcbf --standard=./phpcs.xml.dist ./src/Parse ./tests/Parse", - "prestart": "mongodb-runner start", + "prestart": "MONGODB_VERSION=3.4 mongodb-runner start", "start": "forever start ./node_modules/parse-server-test/server.js", "stop": "forever stop ./node_modules/parse-server-test/server.js", "poststop": "mongodb-runner stop",