mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
[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
This commit is contained in:
parent
4a9b0a91aa
commit
1ead8bcca5
@ -21,7 +21,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"php": ">=5.6",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
|
8
samples/client/petstore-security-test/php/OpenAPIClient-php/.gitignore
vendored
Normal file
8
samples/client/petstore-security-test/php/OpenAPIClient-php/.gitignore
vendored
Normal file
@ -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
|
@ -1 +1 @@
|
||||
3.2.0-SNAPSHOT
|
||||
3.3.0-SNAPSHOT
|
@ -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__)
|
||||
);
|
||||
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"php": ">=5.6",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
@ -27,7 +27,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8",
|
||||
"squizlabs/php_codesniffer": "~2.6",
|
||||
"friendsofphp/php-cs-fixer": "~1.12"
|
||||
"friendsofphp/php-cs-fixer": "~2.12"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
|
||||
|
@ -17,7 +17,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =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 @@ class ObjectSerializer
|
||||
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 @@ class ObjectSerializer
|
||||
|
||||
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'");
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"php": ">=5.6",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"php": ">=5.6",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
|
Loading…
Reference in New Issue
Block a user