diff --git a/CHANGELOG.md b/CHANGELOG.md index a20dd154..60ac4141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,28 @@ ## 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 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) +- 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)) +- Fix npm license warning (thanks to [Arthur Cinader](https://github.com/acinader)) +- 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 ### 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/README.md b/README.md index 725518d3..5aa5d38f 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) @@ -58,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.*" } } ``` @@ -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. diff --git a/package.json b/package.json index d2fa01ef..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", @@ -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" } } 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. diff --git a/tests/Parse/ParseInstallationTest.php b/tests/Parse/ParseInstallationTest.php index ba4187bb..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.3.0'; + $parseVersion = substr(ParseClient::VERSION_STRING, 3); // pull the version # $installation = new ParseInstallation(); $installation->set('installationId', $installationId);