-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP] Drop support for PHP5.5 on php-client (#993)
* Drop suport for PHP5.5 on php-client * Update samples bin/php-petstore.sh bin/openapi3/php-petstore.sh * Update security samples bin/security/php-petstore.sh
- Loading branch information
Showing
14 changed files
with
42 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
samples/client/petstore-security-test/php/OpenAPIClient-php/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore | ||
|
||
composer.phar | ||
/vendor/ | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
composer.lock |
2 changes: 1 addition & 1 deletion
2
samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.0-SNAPSHOT | ||
3.3.0-SNAPSHOT |
33 changes: 19 additions & 14 deletions
33
samples/client/petstore-security-test/php/OpenAPIClient-php/.php_cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
<?php | ||
|
||
return Symfony\CS\Config::create() | ||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) | ||
return PhpCsFixer\Config::create() | ||
->setUsingCache(true) | ||
->fixers( | ||
[ | ||
'ordered_use', | ||
'phpdoc_order', | ||
'short_array_syntax', | ||
'strict', | ||
'strict_param' | ||
] | ||
) | ||
->finder( | ||
Symfony\CS\Finder\DefaultFinder::create() | ||
->in(__DIR__) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'ordered_imports' => true, | ||
'phpdoc_order' => true, | ||
'array_syntax' => [ 'syntax' => 'short' ], | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'no_trailing_whitespace' => false, | ||
'no_trailing_whitespace_in_comment' => false, | ||
'braces' => false, | ||
'single_blank_line_at_eof' => false, | ||
'blank_line_after_namespace' => false, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('test') | ||
->exclude('tests') | ||
->in(__DIR__) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Contact: [email protected] *_/ ' \" =end -- \\r\\n \\n \\r | ||
* Generated by: https://openapi-generator.tech | ||
* OpenAPI Generator version: 3.2.0-SNAPSHOT | ||
* OpenAPI Generator version: 3.3.0-SNAPSHOT | ||
*/ | ||
|
||
/** | ||
|
@@ -68,7 +68,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n | |
if ($value !== null | ||
&& !in_array($openAPIType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) | ||
&& method_exists($openAPIType, 'getAllowableEnumValues') | ||
&& !in_array($value, $openAPIType::getAllowableEnumValues())) { | ||
&& !in_array($value, $openAPIType::getAllowableEnumValues(), true)) { | ||
$imploded = implode("', '", $openAPIType::getAllowableEnumValues()); | ||
throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); | ||
} | ||
|
@@ -287,7 +287,7 @@ public static function deserialize($data, $class, $httpHeaders = null) | |
|
||
return new \SplFileObject($filename, 'r'); | ||
} elseif (method_exists($class, 'getAllowableEnumValues')) { | ||
if (!in_array($data, $class::getAllowableEnumValues())) { | ||
if (!in_array($data, $class::getAllowableEnumValues(), true)) { | ||
$imploded = implode("', '", $class::getAllowableEnumValues()); | ||
throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters