diff --git a/.travis.yml b/.travis.yml
index d8493d013f5..70b7f54a160 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,7 +85,7 @@ before_install:
#- sudo apt-get update
#- sudo apt-get install dart
# switch to php7
- - phpenv global 7.1
+ - phpenv global 7.3
- php -v
# install perl module
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache
index 99317cce997..d96d2c46cb4 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache
@@ -13,13 +13,13 @@ This server has been generated with [Nyholm PSR-7](https://github.com/Nyholm/psr
This server has been generated with [Guzzle PSR-7](https://github.com/guzzle/psr7) implementation and [Guzzle HTTP Factory](https://github.com/http-interop/http-factory-guzzle).
{{/isGuzzlePsr7}}
{{#isZendDiactoros}}
-This server has been generated with [Zend Diactoros](https://github.com/zendframework/zend-diactoros).
+This server has been generated with [Laminas (Zend) PSR-7 implementation](https://github.com/laminas/laminas-diactoros).
{{/isZendDiactoros}}
## Requirements
* Web server with URL rewriting
-* PHP 7.1 or newer
+* PHP 7.2 or newer
This package contains `.htaccess` for Apache configuration.
If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc.
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache
index 7b077c8dd76..68433fc3402 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{invokerPackage}};
use Slim\Factory\AppFactory;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache
index 40e9aee2780..82fd8f648ea 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/abstract_authenticator.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{authPackage}};
use Psr\Container\ContainerInterface;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache
index ff90a276a00..f2a4a686f53 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache
@@ -1,31 +1,6 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache
index eabddfa16cd..fb17fbe2f67 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api_test.mustache
@@ -1,37 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Please update the test case below to test the endpoint.
- */
+ */{{#operations}}
namespace {{apiPackage}};
use PHPUnit\Framework\TestCase;
@@ -52,28 +27,28 @@ class {{userClassname}}Test extends TestCase
/**
* Setup before running any test cases
*/
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
- public function setUp()
+ public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
- public function tearDown()
+ public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
}
{{#operation}}
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache
index 10b4ec4a10c..ad746666cb2 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache
@@ -8,27 +8,27 @@
}
],
"require": {
- "php": "^7.1",
- "slim/slim": "^4.0",
+ "php": "^7.2",
+ "slim/slim": "^4.5.0",
"dyorg/slim-token-authentication": "dev-slim4",
{{#isSlimPsr7}}
- "slim/psr7": "^0.4.0"
+ "slim/psr7": "^1.1.0"
{{/isSlimPsr7}}
{{#isNyholmPsr7}}
- "nyholm/psr7": "^1.1.0",
- "nyholm/psr7-server": "^0.3.0"
+ "nyholm/psr7": "^1.3.0",
+ "nyholm/psr7-server": "^0.4.1"
{{/isNyholmPsr7}}
{{#isGuzzlePsr7}}
"guzzlehttp/psr7": "^1.6.1",
"http-interop/http-factory-guzzle": "^1.0.0"
{{/isGuzzlePsr7}}
{{#isZendDiactoros}}
- "zendframework/zend-diactoros": "^2.1.3"
+ "laminas/laminas-diactoros": "^2.3.0"
{{/isZendDiactoros}}
},
"require-dev": {
- "phpunit/phpunit": "^6.0 || ^7.0",
- "overtrue/phplint": "^1.0",
+ "phpunit/phpunit": "^8.0 || ^9.0",
+ "overtrue/phplint": "^2.0.2",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
@@ -46,8 +46,6 @@
],
"test-apis": "phpunit --testsuite Apis",
"test-models": "phpunit --testsuite Models",
- "test-mock": "phpunit --testsuite Mock",
- "test-utils": "phpunit --testsuite Utils",
"phpcs": "phpcs",
"phplint": "phplint ./ --exclude=vendor"
}
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore
index 3203d7d7814..2424ad0dc92 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/gitignore
@@ -12,6 +12,7 @@ composer.lock
# Do not commit local PHPUnit config
/phpunit.xml
+/.phpunit.result.cache
# Do not commit local PHP_CodeSniffer config
/phpcs.xml
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache
index cb98beb8f30..01c9049226d 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/index.mustache
@@ -1,15 +1,11 @@
licenseInfo}}
+
+/**
+ * NOTE: This class is auto generated by the openapi generator program.
+ * https://github.com/openapitools/openapi-generator
+ */{{#apiInfo}}
require_once __DIR__ . '/vendor/autoload.php';
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache
index 55ad7b637fd..509ec7247c9 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/json_body_parser_middleware.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{invokerPackage}}\Middleware;
use Psr\Http\Message\ResponseInterface;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache
new file mode 100644
index 00000000000..cf26381b5f5
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache
@@ -0,0 +1,23 @@
+/**
+ {{#appName}}
+ * {{{appName}}}
+ {{/appName}}
+ * PHP version 7.2
+ *
+ * @package {{invokerPackage}}
+ * @author OpenAPI Generator team
+ * @link https://github.com/openapitools/openapi-generator
+ */
+
+/**
+ {{#appDescription}}
+ * {{{appDescription}}}
+ {{/appDescription}}
+ {{#version}}
+ * The version of the OpenAPI document: {{{version}}}
+ {{/version}}
+ {{#infoEmail}}
+ * Contact: {{{infoEmail}}}
+ {{/infoEmail}}
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache
index 67112c85227..e9ec40e4b6e 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache
@@ -1,19 +1,11 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
- */
+ */{{#models}}{{#model}}
namespace {{modelPackage}};
use {{interfacesPackage}}\{{interfaceNamePrefix}}Model{{interfaceNameSuffix}};
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache
index eb440ee5598..07b75f7d558 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{interfacesPackage}};
/**
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model_test.mustache
index 1b762f228fd..7aa842baef3 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/model_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model_test.mustache
@@ -1,39 +1,13 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Please update the test case below to test the model.
- */
+ */{{#models}}
+{{#model}}
namespace {{modelPackage}};
use PHPUnit\Framework\TestCase;
@@ -54,28 +28,28 @@ class {{classname}}Test extends TestCase
/**
* Setup before running any test cases
*/
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
- public function setUp()
+ public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
- public function tearDown()
+ public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
}
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait.mustache
index 7f068fa1c77..2c29d3ae820 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{utilsPackage}};
use {{utilsPackage}}\{{traitNamePrefix}}StringUtils{{traitNameSuffix}};
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait_test.mustache
index f3d365eba67..123d9cf648b 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model_utils_trait_test.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{utilsPackage}};
use {{utilsPackage}}\{{traitNamePrefix}}ModelUtils{{traitNameSuffix}} as ModelUtils;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache
index 5cb7ec947f4..a432434d924 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{mockPackage}};
use {{mockPackage}}\{{interfaceNamePrefix}}OpenApiDataMocker{{interfaceNameSuffix}} as IMocker;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache
index eaa28ba2b42..72920c76812 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache
@@ -1,37 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{mockPackage}};
use InvalidArgumentException;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware.mustache
index c7c6192f768..d710ec6c24e 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{mockPackage}};
use Slim\Factory\AppFactory;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware_test.mustache
index 2ea22728930..b341a98ed4c 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_middleware_test.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{mockPackage}};
use {{mockPackage}}\OpenApiDataMockerMiddleware;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache
index e02fa3ed3c9..51e50bc16f2 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{mockPackage}};
use {{mockPackage}}\OpenApiDataMocker;
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache
index 82f86439083..b8852944a12 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/phpunit.xml.mustache
@@ -17,19 +17,11 @@
{{modelTestPath}}
-
- {{mockTestPath}}
-
-
- {{utilsTestPath}}
-
{{apiSrcPath}}
{{modelSrcPath}}
- {{mockSrcPath}}
- {{utilsSrcPath}}
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait.mustache
index 6d5d15feff6..f303bd7cc95 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{utilsPackage}};
/**
diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait_test.mustache
index 9698d6bcf6c..d54c6bbee38 100644
--- a/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait_test.mustache
+++ b/modules/openapi-generator/src/main/resources/php-slim4-server/string_utils_trait_test.mustache
@@ -1,36 +1,12 @@
licenseInfo}}
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
- */
+ */{{#apiInfo}}
namespace {{utilsPackage}};
use {{utilsPackage}}\{{traitNamePrefix}}StringUtils{{traitNameSuffix}} as StringUtils;
diff --git a/samples/server/petstore/php-slim4/.gitignore b/samples/server/petstore/php-slim4/.gitignore
index 3203d7d7814..2424ad0dc92 100644
--- a/samples/server/petstore/php-slim4/.gitignore
+++ b/samples/server/petstore/php-slim4/.gitignore
@@ -12,6 +12,7 @@ composer.lock
# Do not commit local PHPUnit config
/phpunit.xml
+/.phpunit.result.cache
# Do not commit local PHP_CodeSniffer config
/phpcs.xml
\ No newline at end of file
diff --git a/samples/server/petstore/php-slim4/.openapi-generator/FILES b/samples/server/petstore/php-slim4/.openapi-generator/FILES
index 08d44362bcf..ba22c031220 100644
--- a/samples/server/petstore/php-slim4/.openapi-generator/FILES
+++ b/samples/server/petstore/php-slim4/.openapi-generator/FILES
@@ -81,61 +81,7 @@ lib/Utils/ModelUtilsTrait.php
lib/Utils/StringUtilsTrait.php
phpcs.xml.dist
phpunit.xml.dist
-test/Api/AnotherFakeApiTest.php
-test/Api/FakeApiTest.php
-test/Api/FakeClassnameTags123ApiTest.php
-test/Api/PetApiTest.php
-test/Api/StoreApiTest.php
-test/Api/UserApiTest.php
test/Mock/OpenApiDataMockerMiddlewareTest.php
test/Mock/OpenApiDataMockerTest.php
-test/Model/AdditionalPropertiesAnyTypeTest.php
-test/Model/AdditionalPropertiesArrayTest.php
-test/Model/AdditionalPropertiesBooleanTest.php
-test/Model/AdditionalPropertiesClassTest.php
-test/Model/AdditionalPropertiesIntegerTest.php
-test/Model/AdditionalPropertiesNumberTest.php
-test/Model/AdditionalPropertiesObjectTest.php
-test/Model/AdditionalPropertiesStringTest.php
-test/Model/AnimalTest.php
-test/Model/ApiResponseTest.php
-test/Model/ArrayOfArrayOfNumberOnlyTest.php
-test/Model/ArrayOfNumberOnlyTest.php
-test/Model/ArrayTestTest.php
-test/Model/BigCatAllOfTest.php
-test/Model/BigCatTest.php
-test/Model/CapitalizationTest.php
-test/Model/CatAllOfTest.php
-test/Model/CatTest.php
-test/Model/CategoryTest.php
-test/Model/ClassModelTest.php
-test/Model/ClientTest.php
-test/Model/DogAllOfTest.php
-test/Model/DogTest.php
-test/Model/EnumArraysTest.php
-test/Model/EnumClassTest.php
-test/Model/EnumTestTest.php
-test/Model/FileSchemaTestClassTest.php
-test/Model/FileTest.php
-test/Model/FormatTestTest.php
-test/Model/HasOnlyReadOnlyTest.php
-test/Model/MapTestTest.php
-test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php
-test/Model/Model200ResponseTest.php
-test/Model/ModelListTest.php
-test/Model/ModelReturnTest.php
-test/Model/NameTest.php
-test/Model/NumberOnlyTest.php
-test/Model/OrderTest.php
-test/Model/OuterCompositeTest.php
-test/Model/OuterEnumTest.php
-test/Model/PetTest.php
-test/Model/ReadOnlyFirstTest.php
-test/Model/SpecialModelNameTest.php
-test/Model/TagTest.php
-test/Model/TypeHolderDefaultTest.php
-test/Model/TypeHolderExampleTest.php
-test/Model/UserTest.php
-test/Model/XmlItemTest.php
test/Utils/ModelUtilsTraitTest.php
test/Utils/StringUtilsTraitTest.php
diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md
index 325111aa624..7c550d25424 100644
--- a/samples/server/petstore/php-slim4/README.md
+++ b/samples/server/petstore/php-slim4/README.md
@@ -8,7 +8,7 @@ This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim
## Requirements
* Web server with URL rewriting
-* PHP 7.1 or newer
+* PHP 7.2 or newer
This package contains `.htaccess` for Apache configuration.
If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc.
diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json
index c1afb518ef1..0bc4d34e177 100644
--- a/samples/server/petstore/php-slim4/composer.json
+++ b/samples/server/petstore/php-slim4/composer.json
@@ -8,14 +8,14 @@
}
],
"require": {
- "php": "^7.1",
- "slim/slim": "^4.0",
+ "php": "^7.2",
+ "slim/slim": "^4.5.0",
"dyorg/slim-token-authentication": "dev-slim4",
- "slim/psr7": "^0.4.0"
+ "slim/psr7": "^1.1.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0 || ^7.0",
- "overtrue/phplint": "^1.0",
+ "phpunit/phpunit": "^8.0 || ^9.0",
+ "overtrue/phplint": "^2.0.2",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
@@ -33,8 +33,6 @@
],
"test-apis": "phpunit --testsuite Apis",
"test-models": "phpunit --testsuite Models",
- "test-mock": "phpunit --testsuite Mock",
- "test-utils": "phpunit --testsuite Utils",
"phpcs": "phpcs",
"phplint": "phplint ./ --exclude=vendor"
}
diff --git a/samples/server/petstore/php-slim4/index.php b/samples/server/petstore/php-slim4/index.php
index 8baabc9b139..ffeb1b88200 100644
--- a/samples/server/petstore/php-slim4/index.php
+++ b/samples/server/petstore/php-slim4/index.php
@@ -2,15 +2,24 @@
/**
* OpenAPI Petstore
+ * PHP version 7.2
*
- * PHP version 7.1
- *
- * @package OpenAPIServer\Api
+ * @package OpenAPIServer
* @author OpenAPI Generator team
- * @version 1.0.0
* @link https://github.com/openapitools/openapi-generator
*/
+/**
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+/**
+ * NOTE: This class is auto generated by the openapi generator program.
+ * https://github.com/openapitools/openapi-generator
+ */
+
require_once __DIR__ . '/vendor/autoload.php';
use OpenAPIServer\SlimRouter;
diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractAnotherFakeApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractAnotherFakeApi.php
index 14cf312d692..64347eabd0b 100644
--- a/samples/server/petstore/php-slim4/lib/Api/AbstractAnotherFakeApi.php
+++ b/samples/server/petstore/php-slim4/lib/Api/AbstractAnotherFakeApi.php
@@ -1,18 +1,15 @@
'AnotherFakeApi',
'operationId' => 'call123TestSpecialTags',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -89,7 +86,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'createXmlItem',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -110,7 +107,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'fakeOuterBooleanSerialize',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Output boolean',
'jsonSchema' => '{
@@ -137,7 +134,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'fakeOuterCompositeSerialize',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Output composite',
'jsonSchema' => '{
@@ -164,7 +161,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'fakeOuterNumberSerialize',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Output number',
'jsonSchema' => '{
@@ -191,7 +188,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'fakeOuterStringSerialize',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Output string',
'jsonSchema' => '{
@@ -218,7 +215,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testBodyWithFileSchema',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Success',
'jsonSchema' => '{
@@ -239,7 +236,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testBodyWithQueryParams',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Success',
'jsonSchema' => '{
@@ -260,7 +257,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testClientModel',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -374,7 +371,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testInlineAdditionalProperties',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -395,7 +392,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testJsonFormData',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -416,7 +413,7 @@ class SlimRouter
'userClassname' => 'FakeApi',
'operationId' => 'testQueryParameterCollectionFormat',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'Success',
'jsonSchema' => '{
@@ -437,7 +434,7 @@ class SlimRouter
'userClassname' => 'FakeClassnameTags123Api',
'operationId' => 'testClassname',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -476,7 +473,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'addPet',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -517,7 +514,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'findPetsByStatus',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -575,7 +572,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'findPetsByTags',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -635,7 +632,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'updatePet',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -692,7 +689,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'deletePet',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -733,7 +730,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'getPetById',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -826,7 +823,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'uploadFile',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -865,7 +862,7 @@ class SlimRouter
'userClassname' => 'PetApi',
'operationId' => 'uploadFileWithRequiredFile',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -904,7 +901,7 @@ class SlimRouter
'userClassname' => 'StoreApi',
'operationId' => 'getInventory',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -947,7 +944,7 @@ class SlimRouter
'userClassname' => 'StoreApi',
'operationId' => 'placeOrder',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -1016,7 +1013,7 @@ class SlimRouter
'userClassname' => 'StoreApi',
'operationId' => 'getOrderById',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -1127,7 +1124,7 @@ class SlimRouter
'userClassname' => 'UserApi',
'operationId' => 'loginUser',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
@@ -1233,7 +1230,7 @@ class SlimRouter
'userClassname' => 'UserApi',
'operationId' => 'getUserByName',
'responses' => [
- 'default' => [
+ '200' => [
'code' => 200,
'message' => 'successful operation',
'jsonSchema' => '{
diff --git a/samples/server/petstore/php-slim4/lib/Utils/ModelUtilsTrait.php b/samples/server/petstore/php-slim4/lib/Utils/ModelUtilsTrait.php
index 97bb2ae884a..5eb771b9484 100644
--- a/samples/server/petstore/php-slim4/lib/Utils/ModelUtilsTrait.php
+++ b/samples/server/petstore/php-slim4/lib/Utils/ModelUtilsTrait.php
@@ -1,9 +1,8 @@
./test/Model
-
- ./test/Mock
-
-
- ./test/Utils
-
./lib/Api
./lib/Model
- ./lib/Mock
- ./lib/Utils
diff --git a/samples/server/petstore/php-slim4/test/Api/AnotherFakeApiTest.php b/samples/server/petstore/php-slim4/test/Api/AnotherFakeApiTest.php
index 25bca78aa0f..14b6cf86da4 100644
--- a/samples/server/petstore/php-slim4/test/Api/AnotherFakeApiTest.php
+++ b/samples/server/petstore/php-slim4/test/Api/AnotherFakeApiTest.php
@@ -1,18 +1,15 @@