diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache
index e4860c99bf187ce56408646c695537b5b2f8b711..6d50eb9718c1a8a2a7905cff3a09e78ff2e9eada 100644
--- a/modules/openapi-generator/src/main/resources/php/composer.mustache
+++ b/modules/openapi-generator/src/main/resources/php/composer.mustache
@@ -3,7 +3,7 @@
     {{#artifactVersion}}
     "version": "{{artifactVersion}}",
     {{/artifactVersion}}
-    "description": "{{description}}",
+    "description": "{{{appDescription}}}",
     "keywords": [
         "openapitools",
         "openapi-generator",
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION
index 6d94c9c2e12a1bd077604be440ff7eb83354cd54..d077ffb477a49179c7e67ca2a9fec020920b18da 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION
@@ -1 +1 @@
-3.3.0-SNAPSHOT
\ No newline at end of file
+3.3.4-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json b/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json
index 45b3c69726199ea9537a61950b4aa8ffd40a8dce..88a8bcd6ed9ad05e79899f6b3d36c4462e96f5c8 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json
@@ -1,6 +1,6 @@
 {
     "name": "GIT_USER_ID/GIT_REPO_ID",
-    "description": "",
+    "description": "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\  *_/ ' \" =end --",
     "keywords": [
         "openapitools",
         "openapi-generator",
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php
index b8df0f363deb67f94a807fcf0c4193bb06df3321..d210ab40797d25261bd9f1301140c4ba97ba4ea7 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
@@ -253,10 +253,10 @@ class FakeApi
         // for model (json/xml)
         if (isset($_tempBody)) {
             // $_tempBody is the method argument, if present
-            $httpBody = $_tempBody;
-            // \stdClass has no __toString(), so we should encode it manually
-            if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
-                $httpBody = \GuzzleHttp\json_encode($httpBody);
+            if ($headers['Content-Type'] === 'application/json') {
+                $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
+            } else {
+                $httpBody = $_tempBody;
             }
         } elseif (count($formParams) > 0) {
             if ($multipart) {
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php
index 516981727ba10eea896aa76e47a9dbf6c9e677be..85d35f8363072227825b4ae9139d7c9de7397762 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php
index 38464086bf4ec1ecda091cd2e84c4b9b6546ac2a..efcacba885d0455e9b563af21c8a46679a2623dc 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php
index 0a183e1a9ceb1d63eee9c1e8e9252288cb39cd5d..a08d9d4a0e5e0a9679d95ad18c2ba2fe9307fe62 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php
index 2970c2b72c03b590cf92da6be024cc705b2e040e..4b4c7449706589b3e7adad7690e5556b888d358f 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php
index 97a18252d864db1bfabb061f6f06336e0d2277b1..ada5d2e21549efb044dd5ac9a3632a0ce7dde008 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php
index f2142a2e86e5efe5cf3fdb9443e16792260dae23..c7da9e2f345b5380661d7e53d7941c64f371e10a 100644
--- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php
+++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php
@@ -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.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.3.4-SNAPSHOT
  */
 
 /**
@@ -29,6 +29,8 @@
 
 namespace OpenAPI\Client;
 
+use OpenAPI\Client\Model\ModelInterface;
+
 /**
  * ObjectSerializer Class Doc Comment
  *
@@ -61,19 +63,25 @@ class ObjectSerializer
             return $data;
         } elseif (is_object($data)) {
             $values = [];
-            $formats = $data::openAPIFormats();
-            foreach ($data::openAPITypes() as $property => $openAPIType) {
-                $getter = $data::getters()[$property];
-                $value = $data->$getter();
-                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(), true)) {
-                    $imploded = implode("', '", $openAPIType::getAllowableEnumValues());
-                    throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'");
+            if ($data instanceof ModelInterface) {
+                $formats = $data::openAPIFormats();
+                foreach ($data::openAPITypes() as $property => $openAPIType) {
+                    $getter = $data::getters()[$property];
+                    $value = $data->$getter();
+                    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(), true)) {
+                        $imploded = implode("', '", $openAPIType::getAllowableEnumValues());
+                        throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'");
+                    }
+                    if ($value !== null) {
+                        $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);
+                    }
                 }
-                if ($value !== null) {
-                    $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);
+            } else {
+                foreach($data as $property => $value) {
+                    $values[$property] = self::sanitizeForSerialization($value);
                 }
             }
             return (object)$values;
diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json
index 45b3c69726199ea9537a61950b4aa8ffd40a8dce..7b70070c55608dd7743027294dbd4eff3a0d1e7e 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/composer.json
+++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json
@@ -1,6 +1,6 @@
 {
     "name": "GIT_USER_ID/GIT_REPO_ID",
-    "description": "",
+    "description": "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\",
     "keywords": [
         "openapitools",
         "openapi-generator",
diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json
index 45b3c69726199ea9537a61950b4aa8ffd40a8dce..7b70070c55608dd7743027294dbd4eff3a0d1e7e 100644
--- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json
+++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json
@@ -1,6 +1,6 @@
 {
     "name": "GIT_USER_ID/GIT_REPO_ID",
-    "description": "",
+    "description": "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\",
     "keywords": [
         "openapitools",
         "openapi-generator",