12 Commits

Author SHA1 Message Date
Thomas Hansen
0d1e31324b
[PHP] Accept 0 as value for query parameters (#13868) 2022-11-02 14:08:21 +08:00
Thomas Hansen
a37d18a7e4
[PHP] Bugfix: DateTime object on query (#13583)
* [PHP] BUGFIX: fix code breaking when query params contain a DateTime object

* [PHP] Autogenerated files
2022-10-07 00:45:33 +08:00
Thomas Hansen
c0ad6357df
[PHP] ObjectSerializerTest: add tests for ObjectSerializer::deserialize() associative arrays bugfix (#12989)
* [PHP] ObjectSerializerTest.php: code cleanup

* [PHP] ObjectSerializerTest.php: added tests for ::deserialize() associative arrays bugfix - related to PR #12849
2022-07-23 10:07:21 +08:00
Kuzma
45cbd5f7a7
[Php] Convert boolean value for query string (Configuration) (#12385)
* convert bool to query string format

* add variable

* update samples

* add test
2022-05-25 10:36:21 +08:00
Kuzma
6b3abd9421
[Php] Exclude query params when they're not required (#12120)
* exclude query params when they are not required

* fix check on empty

* update samples

* fix

* add tests

* update test

* Fix style

I guess PHPCodeSniffer would find PSR12 violated but we use CS-Fixer
instead. Anyway, conditions should contain spaces between logical
operators for readability.

* Apply CS-Fixer changes to templates

* Refresh samples

* Add required param to docblock

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2022-04-25 18:16:00 +08:00
fengelniederhammer
8a83a34bb4
[php] make ObjectSerializer::toString actually return a string (#12158) 2022-04-20 14:02:09 +08:00
Basil
196b9f266f
[php] use http_build_query for deepObject support (#11225)
* Update ObjectSerializer::toQueryValue method

It looks a bit ugly right now, but at least all tests has been passed.

* Add tests of query serialization

I used fixtures from OpenAPISpec main doc. Some prop combinations are not
officially documented yet, for instance behavior for nested objects and
arrays.

* Add test fixture from @nadar

* Add tests of Guzzle query build failure

* Add query build wrapper static method

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2022-03-22 12:56:15 +03:00
Juan Treminio
905e59c238
[PHP] Allows passing filename to deserialize (#11582)
* Allows passing filename to deserialize

* Code review changes
2022-02-14 17:38:16 +08:00
Yuriy Belenko
0a09f1faa3
[php][bug] Fix DateTime microseconds bug in ObjectSerializer (#11213)
* fixing precision for php

* remove a bracket

* handling whitespace

* format comment

* Use regexp to trim needless microseconds

That way we can save timezone suffix.

Co-authored-by: Carmen Quan <cquan@launchdarkly.com>
2022-01-04 13:41:22 +08:00
Hiromi Hishida
8a3b434d54
[php] Handle \SplFileObject before primitive(to avoid php8 settype() error) (#11184)
* Handle \SplFileObject before primitive(to avoid php8 settype() error)

* Add test case

* Add array check to fix type error

Code throws error:
array_key_exists() expects parameter 2 to be array, null given
When $httpHeaders argument is null.

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2021-12-30 13:57:01 +03:00
Akihito Nakano
34abedeb8a
[PHP] Bump minimum required version to PHP7.1 (#1491)
* Bump minimum required version to PHP7.1

ref: http://php.net/supported-versions.php

* Bump phpunit

* Update [api|model]_test.mustache

* Update samples

bin/openapi3/php-petstore.sh

* Update namespace of PHPUnit ("tests" folder)

* `setExpectedException` is deleted in PHPUnit 7.4

* Update namespace of "Assert" class

* The attribute 'name' is required

* Add anotation to exclude the test from risky testcheck

* Update samples (samples/client/petstore/php)

* Apply updates to "test" in openapi2 folder (samples/client/petstore/php)

b3495ecbfe
15e00ae89d
2fc6917d13
0d016c00ed

* Install php7.1

* Switch to php7

* Update samples (security)

bin/security/php-petstore.sh
2018-11-26 08:59:22 +07:00
William Cheng
e5be838fa8
Update PHP client default value (#417)
* update php default value

* update php samples with oas3
2018-05-11 15:28:09 +08:00