-
Notifications
You must be signed in to change notification settings - Fork 42
Add ability to auto-document complex types #53
Add ability to auto-document complex types #53
Conversation
Hrm... travis is failing on PHP5.6 - I'm using return types. Will the next version be targetting PHP7+? |
…it's inside <xsd:annotation>
I think php 7+ support only can be applied in separate pull request |
Thanks @samsonasik - so should I ditch the return types or ignore the errors? |
@kynx I think return type can be removed for this PR |
* Property documentation | ||
*/ | ||
public $foo; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you remove the scalar type hints and return type hints, you'll also need to update this test to remove anonymous class usage. Create classes under a TestAsset
directory, and instantiate them here.
|
||
public function testGetPropertyDocumentationSkipsAnnotations() | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to run via phpcs when done; extra lines like this one should be picked up and flagged.
test/WsdlTest.php
Outdated
@@ -573,6 +573,20 @@ public function testAddDocumentationToSetInsertsBefore() | |||
$this->assertEquals('documentation', $nodes->item(0)->nodeName); | |||
} | |||
|
|||
public function testComplexTypeDocumentationAddedAsAnnotation() | |||
{ | |||
$this->wsdl->addComplexType('\ZendTest\Soap\TestAsset\WsdlTestClass'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import the class and use ::class
notation instead of a string.
Add ability to auto-document complex types
Thanks, @kynx! |
This PR adds the ability to generate
<xsd:documentation>
elements for complex types from class and property docblocks. This is useful when auto-generating API documentation from the WSDL file.