Skip to content

Commit

Permalink
Merge pull request #195 from weakish/release-0.11.0
Browse files Browse the repository at this point in the history
Release 0.11.0
  • Loading branch information
weakish authored Oct 25, 2019
2 parents 616ea57 + 59f8185 commit e7d3480
Show file tree
Hide file tree
Showing 57 changed files with 1,660 additions and 1,283 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

0.11.0 发布日期:2019-10-25
----

* 支持即时通讯服务新增的 `_clientOnline``_clientOffline` 这两个 hook。
* 支持 PHP 7.3。

0.10.3 发布日期:2019-08-30
----

Expand Down
46 changes: 36 additions & 10 deletions Hacking.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,45 @@
Hacking
----
# Hacking

## Pull Request

* Get and install [composer](https://getcomposer.org)
* Fork the SDK from leancloud/php-sdk
* Run `composer install` to get dependencies
* Setup app credential in env variables:

```
export LC_APP_ID=...
export LC_APP_KEY=...
export LC_APP_MASTER_KEY=...
export LC_API_REGION=US
```
```sh
export LC_APP_ID=...
export LC_APP_KEY=...
export LC_APP_MASTER_KEY=...
export LC_API_REGION=US
export LEANCLOUD_APP_HOST="127.0.0.1"
export LEANCLOUD_APP_PORT=8081
export LEANCLOUD_WILDCARD_DOMAIN="lncldglobal.com"
```

* Run tests:

```sh
make test_engine &
make test
```

* `make test` to run test
* `make doc` to build documentation (should running on PHP <= 7.2)
* `make doc` to build documentation (should running on PHP < 7.2)

* Send a pull request at leancloud/php-sdk

Thanks for your contribution!

## Prepare a Release

Make sure all tests are passed.

Run `make doc` and commit auto generated api doc.

Run `make release V=MAJOR.MINOR.PATCH` (e.g. `make release V=0.11.0`),
and edit `Changelog.md` (git log subjects are for reference only, do not leave them unchanged).

Commit changes and send a pull request at leancloud/php-sdk.

If everything is O.K., the maintainer will merge the pull request, push a new tag, and publish a new release at GitHub.
Then a new version will be published at Packagist automatically.
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h1>Page not found</h1>
</div>
</div>
</div>
<script src="resources/combined.js?768909401efe0895b1dd6335be9b2c57dc8be831"></script>
<script src="resources/combined.js?7115ad923cc5b57b06c7c24c5808ce8e57e9dc4e"></script>
<script src="elementlist.js"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions docs/class-LeanCloud.BatchRequestError.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ <h4>Overrides</h4>



<table class="summary inherited">
<caption>Properties inherited from <a href="class-LeanCloud.CloudException.html#properties">LeanCloud\CloudException</a></caption>
<tr>
<td><code>
<a href="class-LeanCloud.CloudException.html#$method"><var>$method</var></a>,
<a href="class-LeanCloud.CloudException.html#$status"><var>$status</var></a>,
<a href="class-LeanCloud.CloudException.html#$url"><var>$url</var></a>
</code></td>
</tr>
</table>
<table class="summary inherited">
<caption>Properties inherited from Exception</caption>
<tr>
Expand Down
28 changes: 14 additions & 14 deletions docs/class-LeanCloud.Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h1>Class Client</h1>
<b>Namespace:</b> <a href="namespace-LeanCloud.html">LeanCloud</a><br>


<b>Located at</b> <a href="source-class-LeanCloud.Client.html#15-716" title="Go to source code">LeanCloud/Client.php</a>
<b>Located at</b> <a href="source-class-LeanCloud.Client.html#15-718" title="Go to source code">LeanCloud/Client.php</a>
<br>
</div>

Expand Down Expand Up @@ -662,7 +662,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_request">#</a>
<code><a href="source-class-LeanCloud.Client.html#339-447" title="Go to source code">request</a>( <span>string <var>$method</var></span>, <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#339-449" title="Go to source code">request</a>( <span>string <var>$method</var></span>, <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue request to LeanCloud</p>
Expand Down Expand Up @@ -722,7 +722,7 @@ <h4>Throws</h4>

<td class="name"><div>
<a class="anchor" href="#_get">#</a>
<code><a href="source-class-LeanCloud.Client.html#449-464" title="Go to source code">get</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#451-466" title="Go to source code">get</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue GET request to LeanCloud</p>
Expand Down Expand Up @@ -773,7 +773,7 @@ <h4>See</h4>

<td class="name"><div>
<a class="anchor" href="#_post">#</a>
<code><a href="source-class-LeanCloud.Client.html#466-481" title="Go to source code">post</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#468-483" title="Go to source code">post</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue POST request to LeanCloud</p>
Expand Down Expand Up @@ -824,7 +824,7 @@ <h4>See</h4>

<td class="name"><div>
<a class="anchor" href="#_put">#</a>
<code><a href="source-class-LeanCloud.Client.html#483-498" title="Go to source code">put</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#485-500" title="Go to source code">put</a>( <span>string <var>$path</var></span>, <span>array <var>$data</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue PUT request to LeanCloud</p>
Expand Down Expand Up @@ -875,7 +875,7 @@ <h4>See</h4>

<td class="name"><div>
<a class="anchor" href="#_delete">#</a>
<code><a href="source-class-LeanCloud.Client.html#500-514" title="Go to source code">delete</a>( <span>string <var>$path</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#502-516" title="Go to source code">delete</a>( <span>string <var>$path</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue DELETE request to LeanCloud</p>
Expand Down Expand Up @@ -924,7 +924,7 @@ <h4>See</h4>

<td class="name"><div>
<a class="anchor" href="#_batch">#</a>
<code><a href="source-class-LeanCloud.Client.html#516-546" title="Go to source code">batch</a>( <span>array <var>$requests</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#518-548" title="Go to source code">batch</a>( <span>array <var>$requests</var></span>, <span>string <var>$sessionToken</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$headers</var> = <span class="php-keyword1">array</span>()</span>, <span>boolean <var>$useMasterKey</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">
<p>Issue a batch request</p>
Expand Down Expand Up @@ -973,7 +973,7 @@ <h4>See</h4>

<td class="name"><div>
<a class="anchor" href="#_encode">#</a>
<code><a href="source-class-LeanCloud.Client.html#548-609" title="Go to source code">encode</a>( <span>mixed <var>$value</var></span>, <span>string <var>$encoder</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$seen</var> = <span class="php-keyword1">array</span>()</span> )</code>
<code><a href="source-class-LeanCloud.Client.html#550-611" title="Go to source code">encode</a>( <span>mixed <var>$value</var></span>, <span>string <var>$encoder</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$seen</var> = <span class="php-keyword1">array</span>()</span> )</code>

<div class="description short">
<p>Recursively encode value as JSON representation</p>
Expand Down Expand Up @@ -1034,7 +1034,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_formatDate">#</a>
<code><a href="source-class-LeanCloud.Client.html#611-625" title="Go to source code">formatDate</a>( <span>DateTime <var>$date</var></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#613-627" title="Go to source code">formatDate</a>( <span>DateTime <var>$date</var></span> )</code>

<div class="description short">
<p>Format date according to LeanCloud spec.</p>
Expand Down Expand Up @@ -1073,7 +1073,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_decode">#</a>
<code><a href="source-class-LeanCloud.Client.html#627-682" title="Go to source code">decode</a>( <span>mixed <var>$value</var></span>, <span>string <var>$key</var></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#629-684" title="Go to source code">decode</a>( <span>mixed <var>$value</var></span>, <span>string <var>$key</var></span> )</code>

<div class="description short">
<p>Decode value from LeanCloud response.</p>
Expand Down Expand Up @@ -1114,7 +1114,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_getStorage">#</a>
<code><a href="source-class-LeanCloud.Client.html#684-691" title="Go to source code">getStorage</a>( )</code>
<code><a href="source-class-LeanCloud.Client.html#686-693" title="Go to source code">getStorage</a>( )</code>

<div class="description short">
<p>Get storage</p>
Expand Down Expand Up @@ -1148,7 +1148,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_setStorage">#</a>
<code><a href="source-class-LeanCloud.Client.html#693-702" title="Go to source code">setStorage</a>( <span><code><a href="class-LeanCloud.Storage.IStorage.html">LeanCloud\Storage\IStorage</a></code> <var>$storage</var></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#695-704" title="Go to source code">setStorage</a>( <span><code><a href="class-LeanCloud.Storage.IStorage.html">LeanCloud\Storage\IStorage</a></code> <var>$storage</var></span> )</code>

<div class="description short">
<p>Set storage</p>
Expand Down Expand Up @@ -1185,7 +1185,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_randomFloat">#</a>
<code><a href="source-class-LeanCloud.Client.html#704-714" title="Go to source code">randomFloat</a>( <span>float <var>$min</var> = <span class="php-num">0</span></span>, <span>float <var>$max</var> = <span class="php-num">1</span></span> )</code>
<code><a href="source-class-LeanCloud.Client.html#706-716" title="Go to source code">randomFloat</a>( <span>float <var>$min</var> = <span class="php-num">0</span></span>, <span>float <var>$max</var> = <span class="php-num">1</span></span> )</code>

<div class="description short">
<p>Generate a random float between [$min, $max)</p>
Expand Down Expand Up @@ -1245,7 +1245,7 @@ <h4>Returns</h4>
<td class="value">
<div>
<a href="#VERSION" class="anchor">#</a>
<code><span class="php-quote">'0.7.0'</span></code>
<code><span class="php-quote">'0.10.3'</span></code>
</div>
</td>
</tr>
Expand Down
84 changes: 81 additions & 3 deletions docs/class-LeanCloud.CloudException.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h4>Direct known subclasses</h4>
<b>Namespace:</b> <a href="namespace-LeanCloud.html">LeanCloud</a><br>


<b>Located at</b> <a href="source-class-LeanCloud.CloudException.html#4-15" title="Go to source code">LeanCloud/CloudException.php</a>
<b>Located at</b> <a href="source-class-LeanCloud.CloudException.html#4-42" title="Go to source code">LeanCloud/CloudException.php</a>
<br>
</div>

Expand All @@ -174,7 +174,7 @@ <h4>Direct known subclasses</h4>

<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-LeanCloud.CloudException.html#8-10" title="Go to source code">__construct</a>( <span> <var>$message</var></span>, <span> <var>$code</var> = <span class="php-num">1</span></span> )</code>
<code><a href="source-class-LeanCloud.CloudException.html#30-36" title="Go to source code">__construct</a>( <span> <var>$message</var></span>, <span> <var>$code</var> = <span class="php-num">1</span></span>, <span> <var>$status</var> = <span class="php-num">400</span></span>, <span> <var>$method</var> = <span class="php-keyword1">null</span></span>, <span> <var>$url</var> = <span class="php-keyword1">null</span></span> )</code>

<div class="description short">

Expand Down Expand Up @@ -206,7 +206,7 @@ <h4>Overrides</h4>

<td class="name"><div>
<a class="anchor" href="#___toString">#</a>
<code><a href="source-class-LeanCloud.CloudException.html#12-14" title="Go to source code">__toString</a>( )</code>
<code><a href="source-class-LeanCloud.CloudException.html#38-41" title="Go to source code">__toString</a>( )</code>

<div class="description short">

Expand Down Expand Up @@ -254,6 +254,84 @@ <h4>Overrides</h4>



<table class="summary properties" id="properties">
<caption>Properties summary</caption>
<tr data-order="status" id="$status">
<td class="attributes"><code>
public
integer
</code></td>

<td class="name">
<a href="source-class-LeanCloud.CloudException.html#9-14" title="Go to source code"><var>$status</var></a>

<div class="description short">
<p>Http status returned by API</p>
</div>

<div class="description detailed hidden">
<p>Http status returned by API</p>

</div>
</td>
<td class="value">
<div>
<a href="#$status" class="anchor">#</a>
<code></code>
</div>
</td>
</tr>
<tr data-order="method" id="$method">
<td class="attributes"><code>
public
string
</code></td>

<td class="name">
<a href="source-class-LeanCloud.CloudException.html#16-21" title="Go to source code"><var>$method</var></a>

<div class="description short">
<p>Http method request to API</p>
</div>

<div class="description detailed hidden">
<p>Http method request to API</p>

</div>
</td>
<td class="value">
<div>
<a href="#$method" class="anchor">#</a>
<code></code>
</div>
</td>
</tr>
<tr data-order="url" id="$url">
<td class="attributes"><code>
public
string
</code></td>

<td class="name">
<a href="source-class-LeanCloud.CloudException.html#23-28" title="Go to source code"><var>$url</var></a>

<div class="description short">
<p>Http url request to API</p>
</div>

<div class="description detailed hidden">
<p>Http url request to API</p>

</div>
</td>
<td class="value">
<div>
<a href="#$url" class="anchor">#</a>
<code></code>
</div>
</td>
</tr>
</table>

<table class="summary inherited">
<caption>Properties inherited from Exception</caption>
Expand Down
Loading

0 comments on commit e7d3480

Please sign in to comment.