Skip to content

Commit e7d3480

Browse files
authored
Merge pull request #195 from weakish/release-0.11.0
Release 0.11.0
2 parents 616ea57 + 59f8185 commit e7d3480

File tree

57 files changed

+1660
-1283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1660
-1283
lines changed

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
0.11.0 发布日期:2019-10-25
3+
----
4+
5+
* 支持即时通讯服务新增的 `_clientOnline``_clientOffline` 这两个 hook。
6+
* 支持 PHP 7.3。
7+
28
0.10.3 发布日期:2019-08-30
39
----
410

Hacking.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1-
Hacking
2-
----
1+
# Hacking
2+
3+
## Pull Request
34

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

9-
```
10-
export LC_APP_ID=...
11-
export LC_APP_KEY=...
12-
export LC_APP_MASTER_KEY=...
13-
export LC_API_REGION=US
14-
```
10+
```sh
11+
export LC_APP_ID=...
12+
export LC_APP_KEY=...
13+
export LC_APP_MASTER_KEY=...
14+
export LC_API_REGION=US
15+
export LEANCLOUD_APP_HOST="127.0.0.1"
16+
export LEANCLOUD_APP_PORT=8081
17+
export LEANCLOUD_WILDCARD_DOMAIN="lncldglobal.com"
18+
```
19+
20+
* Run tests:
21+
22+
```sh
23+
make test_engine &
24+
make test
25+
```
1526

16-
* `make test` to run test
17-
* `make doc` to build documentation (should running on PHP <= 7.2)
27+
* `make doc` to build documentation (should running on PHP < 7.2)
28+
29+
* Send a pull request at leancloud/php-sdk
1830

1931
Thanks for your contribution!
32+
33+
## Prepare a Release
34+
35+
Make sure all tests are passed.
36+
37+
Run `make doc` and commit auto generated api doc.
38+
39+
Run `make release V=MAJOR.MINOR.PATCH` (e.g. `make release V=0.11.0`),
40+
and edit `Changelog.md` (git log subjects are for reference only, do not leave them unchanged).
41+
42+
Commit changes and send a pull request at leancloud/php-sdk.
43+
44+
If everything is O.K., the maintainer will merge the pull request, push a new tag, and publish a new release at GitHub.
45+
Then a new version will be published at Packagist automatically.

docs/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ <h1>Page not found</h1>
146146
</div>
147147
</div>
148148
</div>
149-
<script src="resources/combined.js?768909401efe0895b1dd6335be9b2c57dc8be831"></script>
149+
<script src="resources/combined.js?7115ad923cc5b57b06c7c24c5808ce8e57e9dc4e"></script>
150150
<script src="elementlist.js"></script>
151151
</body>
152152
</html>

docs/class-LeanCloud.BatchRequestError.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,16 @@ <h4>Overrides</h4>
405405

406406

407407

408+
<table class="summary inherited">
409+
<caption>Properties inherited from <a href="class-LeanCloud.CloudException.html#properties">LeanCloud\CloudException</a></caption>
410+
<tr>
411+
<td><code>
412+
<a href="class-LeanCloud.CloudException.html#$method"><var>$method</var></a>,
413+
<a href="class-LeanCloud.CloudException.html#$status"><var>$status</var></a>,
414+
<a href="class-LeanCloud.CloudException.html#$url"><var>$url</var></a>
415+
</code></td>
416+
</tr>
417+
</table>
408418
<table class="summary inherited">
409419
<caption>Properties inherited from Exception</caption>
410420
<tr>

docs/class-LeanCloud.Client.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h1>Class Client</h1>
139139
<b>Namespace:</b> <a href="namespace-LeanCloud.html">LeanCloud</a><br>
140140

141141

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

@@ -662,7 +662,7 @@ <h4>Returns</h4>
662662

663663
<td class="name"><div>
664664
<a class="anchor" href="#_request">#</a>
665-
<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>
665+
<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>
666666

667667
<div class="description short">
668668
<p>Issue request to LeanCloud</p>
@@ -722,7 +722,7 @@ <h4>Throws</h4>
722722

723723
<td class="name"><div>
724724
<a class="anchor" href="#_get">#</a>
725-
<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>
725+
<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>
726726

727727
<div class="description short">
728728
<p>Issue GET request to LeanCloud</p>
@@ -773,7 +773,7 @@ <h4>See</h4>
773773

774774
<td class="name"><div>
775775
<a class="anchor" href="#_post">#</a>
776-
<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>
776+
<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>
777777

778778
<div class="description short">
779779
<p>Issue POST request to LeanCloud</p>
@@ -824,7 +824,7 @@ <h4>See</h4>
824824

825825
<td class="name"><div>
826826
<a class="anchor" href="#_put">#</a>
827-
<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>
827+
<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>
828828

829829
<div class="description short">
830830
<p>Issue PUT request to LeanCloud</p>
@@ -875,7 +875,7 @@ <h4>See</h4>
875875

876876
<td class="name"><div>
877877
<a class="anchor" href="#_delete">#</a>
878-
<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>
878+
<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>
879879

880880
<div class="description short">
881881
<p>Issue DELETE request to LeanCloud</p>
@@ -924,7 +924,7 @@ <h4>See</h4>
924924

925925
<td class="name"><div>
926926
<a class="anchor" href="#_batch">#</a>
927-
<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>
927+
<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>
928928

929929
<div class="description short">
930930
<p>Issue a batch request</p>
@@ -973,7 +973,7 @@ <h4>See</h4>
973973

974974
<td class="name"><div>
975975
<a class="anchor" href="#_encode">#</a>
976-
<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>
976+
<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>
977977

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

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

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

10741074
<td class="name"><div>
10751075
<a class="anchor" href="#_decode">#</a>
1076-
<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>
1076+
<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>
10771077

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

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

11191119
<div class="description short">
11201120
<p>Get storage</p>
@@ -1148,7 +1148,7 @@ <h4>Returns</h4>
11481148

11491149
<td class="name"><div>
11501150
<a class="anchor" href="#_setStorage">#</a>
1151-
<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>
1151+
<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>
11521152

11531153
<div class="description short">
11541154
<p>Set storage</p>
@@ -1185,7 +1185,7 @@ <h4>Parameters</h4>
11851185

11861186
<td class="name"><div>
11871187
<a class="anchor" href="#_randomFloat">#</a>
1188-
<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>
1188+
<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>
11891189

11901190
<div class="description short">
11911191
<p>Generate a random float between [$min, $max)</p>
@@ -1245,7 +1245,7 @@ <h4>Returns</h4>
12451245
<td class="value">
12461246
<div>
12471247
<a href="#VERSION" class="anchor">#</a>
1248-
<code><span class="php-quote">'0.7.0'</span></code>
1248+
<code><span class="php-quote">'0.10.3'</span></code>
12491249
</div>
12501250
</td>
12511251
</tr>

docs/class-LeanCloud.CloudException.html

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h4>Direct known subclasses</h4>
154154
<b>Namespace:</b> <a href="namespace-LeanCloud.html">LeanCloud</a><br>
155155

156156

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

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

175175
<td class="name"><div>
176176
<a class="anchor" href="#___construct">#</a>
177-
<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>
177+
<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>
178178

179179
<div class="description short">
180180

@@ -206,7 +206,7 @@ <h4>Overrides</h4>
206206

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

211211
<div class="description short">
212212

@@ -254,6 +254,84 @@ <h4>Overrides</h4>
254254

255255

256256

257+
<table class="summary properties" id="properties">
258+
<caption>Properties summary</caption>
259+
<tr data-order="status" id="$status">
260+
<td class="attributes"><code>
261+
public
262+
integer
263+
</code></td>
264+
265+
<td class="name">
266+
<a href="source-class-LeanCloud.CloudException.html#9-14" title="Go to source code"><var>$status</var></a>
267+
268+
<div class="description short">
269+
<p>Http status returned by API</p>
270+
</div>
271+
272+
<div class="description detailed hidden">
273+
<p>Http status returned by API</p>
274+
275+
</div>
276+
</td>
277+
<td class="value">
278+
<div>
279+
<a href="#$status" class="anchor">#</a>
280+
<code></code>
281+
</div>
282+
</td>
283+
</tr>
284+
<tr data-order="method" id="$method">
285+
<td class="attributes"><code>
286+
public
287+
string
288+
</code></td>
289+
290+
<td class="name">
291+
<a href="source-class-LeanCloud.CloudException.html#16-21" title="Go to source code"><var>$method</var></a>
292+
293+
<div class="description short">
294+
<p>Http method request to API</p>
295+
</div>
296+
297+
<div class="description detailed hidden">
298+
<p>Http method request to API</p>
299+
300+
</div>
301+
</td>
302+
<td class="value">
303+
<div>
304+
<a href="#$method" class="anchor">#</a>
305+
<code></code>
306+
</div>
307+
</td>
308+
</tr>
309+
<tr data-order="url" id="$url">
310+
<td class="attributes"><code>
311+
public
312+
string
313+
</code></td>
314+
315+
<td class="name">
316+
<a href="source-class-LeanCloud.CloudException.html#23-28" title="Go to source code"><var>$url</var></a>
317+
318+
<div class="description short">
319+
<p>Http url request to API</p>
320+
</div>
321+
322+
<div class="description detailed hidden">
323+
<p>Http url request to API</p>
324+
325+
</div>
326+
</td>
327+
<td class="value">
328+
<div>
329+
<a href="#$url" class="anchor">#</a>
330+
<code></code>
331+
</div>
332+
</td>
333+
</tr>
334+
</table>
257335

258336
<table class="summary inherited">
259337
<caption>Properties inherited from Exception</caption>

0 commit comments

Comments
 (0)