File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Please note that this documentation contains the latest changes that may as of y
4747
4848## Installation
4949There are various ways to install and use this sdk. We'll elaborate on a couple here.
50- Note that the Parse PHP SDK requires PHP 5.4 or newer.
50+ Note that the Parse PHP SDK requires PHP 5.4 or newer. It can also run on HHVM (recommended 3.0 or newer).
5151
5252### Install with Composer
5353
Original file line number Diff line number Diff line change 2020 "license" : " SEE LICENSE IN LICENSE" ,
2121 "homepage" : " https://github.com/montymxb/parse-server-test#readme" ,
2222 "dependencies" : {
23- "parse-server-test" : " 1.3.4 "
23+ "parse-server-test" : " 1.3.5 "
2424 }
2525}
Original file line number Diff line number Diff line change @@ -252,7 +252,10 @@ private function download()
252252 if ($ httpStatus > 399 ) {
253253 throw new ParseException ('Download failed, file may have been deleted. ' , $ httpStatus );
254254 }
255- $ this ->mimeType = $ httpClient ->getResponseContentType ();
255+ $ mimeType = $ httpClient ->getResponseContentType ();
256+ if (isset ($ mimeType ) && $ mimeType !== 'null ' ) {
257+ $ this ->mimeType = $ mimeType ;
258+ }
256259 $ this ->data = $ response ;
257260
258261 return $ response ;
Original file line number Diff line number Diff line change @@ -146,7 +146,12 @@ public function testParseFileTypes()
146146 $ this ->assertEquals ($ contents , $ file3Again ->getData ());
147147
148148 // check mime types after calling getData
149- $ this ->assertEquals ('application/octet-stream ' , $ fileAgain ->getMimeType ());
149+ $ mt = $ fileAgain ->getMimeType ();
150+ // both of the following are acceptable for a response from a submitted mime type of unknown/unknown
151+ $ this ->assertTrue (
152+ $ mt === 'application/octet-stream ' || // parse-server < 2.7.0
153+ $ mt === 'unknown/unknown ' // parse-server >= 2.7.0, unknown mime type response change
154+ );
150155 $ this ->assertEquals ('image/png ' , $ file2Again ->getMimeType ());
151156 $ this ->assertEquals ('image/png ' , $ file3Again ->getMimeType ());
152157 }
You can’t perform that action at this time.
0 commit comments