parse-community / parse-php-sdk

The PHP SDK for Parse Platform
https://parseplatform.org/
Other
811 stars 346 forks source link

getServerHealth not available in SDK installed via composer #376

Closed Gerungofulus closed 6 years ago

Gerungofulus commented 6 years ago

Issue Description

Hey there! I just installed parse using composer and for some reason some functions in the ParseClient such as getServerHealth() are missing. Simply copying that function showed that some other function was missing, too. Does anyone else have that problem?

Steps to reproduce

Start a project with this composer file

{
    "require": {
        "parse/php-sdk" : "1.3.*",
        "vlucas/phpdotenv": "^2.4"
    }
}

Environment Details

Logs/Traces

PHP Fatal error:  Uncaught Error: Call to undefined method Parse\ParseClient::getServerHealth() in         /Users/name/path/main.php:16
Stack trace:
#0 /Users/name/path/main.php(8): setupParse()
#1 {main}
  thrown in /Users/name/path/main.php on line 16

Fatal error: Uncaught Error: Call to undefined method Parse\ParseClient::getServerHealth() in /Users/name/path/main.php:16
Stack trace:
#0 /Users/name/path/main.php(8): setupParse()
#1 {main}
  thrown in /Users/name/path/main.php on line 16 
require 'vendor/autoload.php';
include_once 'config.php';
use Parse\ParseClient;

....

function setupParse(){
  ParseClient::initialize( getenv('PARSE_APP_ID'), null, getenv('PARSE_KEY') );
  ParseClient::setServerURL(getenv('PARSE_SERVER'),getenv('PARSE_MOUNT_POINT'));
  $health = ParseClient::getServerHealth();
  return $health['status'] === 200;
}
davidtavarez commented 6 years ago

True. Same here.

montymxb commented 6 years ago

@Gerungofulus @davidtavarez although this has been added to the sdk it hasn't yet been published in a release.

We'll be making an upcoming 1.4.0 release as soon as we have index management via ParseSchema. getServerHealth and quite a few other features will be present in that one 👍 . You can check out the project for the upcoming release to see what's going to be added. Sorry to keep you guys waiting on the features though, hopefully we'll have those coming along soon enough!

Gerungofulus commented 6 years ago

@montymxb No worries. Thanks for the heads up! It's only because the git repository's readme is already reporting that feature right after discussing how to start using it, which is a little confusing.

montymxb commented 6 years ago

The README on the github repo here will contain the latest changes, bleeding edge stuff. Generally I would recommend checking out the latest docs for what's currently released and available. You can checkout the README as it was for the 1.3.0 release for what was available at the time.

I'm keeping this open for the moment as this seems like a bit of a pitfall for devs to run into. I think we could add a nice disclaimer at the top indicating this may include the latest unreleased changes and providing a link to the README at the last release's mark. Kind of like:

This documentation contains the latest changes that may as of yet be unreleased! Click here to see the official README for the 1.3.0 Release.

montymxb commented 6 years ago

Closing as a disclaimer and link to the appropriate README for the latest release has been added via #376.