-
Notifications
You must be signed in to change notification settings - Fork 2.5k
WSDL Generation rewrite (with new tests also) as a base for future changes. #3919
Conversation
Conflicts: library/Zend/Soap/Wsdl.php tests/Zend/Soap/Server/DocumentLiteralWrapperTest.php tests/Zend/Soap/WsdlTest.php
Complete rewrite of wsdl generation from strings and simple dom to full object oriented from the begining. It uses dom and proper namespaces. All tests are also rewritten to new structure and now are using xpath versus old string comparison.
Conflicts: library/Zend/Soap/Wsdl.php tests/Zend/Soap/WsdlTest.php
When runing clean from command line one test was failing. Fixed.
Code formating in accordance with Coding Style. More tests. Integration of recent code changes from ayastreb and weierophinney. Even more tests and test data.
Your commits cannot be merged because are in conflict with the actual master branch. For fix this merge the most recent version of master in your PR branch. Also it's a good thing make your commits in a specific branch rather than master or develop. See this article for to see how to do this http://blog.evan.pro/keeping-a-clean-github-fork-part-1 Finally some files has now different chmod rigts (00644 > 00755) please restore the original chmod rights |
* @param array $input An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} | ||
* @param array $output An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} | ||
* @param array $fault An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} | ||
* @param string $name |
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.
Check this kind of indentations along all the PR
Fixed files permissions
public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri=null, $wsdlClass=null, array $classMap = array()) | ||
{ | ||
public function __construct(ComplexTypeStrategy $strategy = null, | ||
$endpointUri=null, $wsdlClass=null, array $classMap = array() |
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.
According PSR-2 guidelines when the arguments line is splitted must be only one argument by line
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.
So PSR-2 is now standard for Zend Framework ? Because in coding standard there is no info about one argument per line: http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-FunctionandMethodDeclaration
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.
Yes, PSR-2 is the statndard for ZF2
case 'featues': | ||
trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE); | ||
trigger_error(__METHOD__ . ': the option "featues" is deprecated'. |
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.
You can remove case
I just committed merge with master and file permission fix. |
@@ -329,6 +357,7 @@ public function setActor($actor) | |||
{ | |||
$this->validateUrn($actor); | |||
$this->actor = $actor; | |||
|
|||
return $this; | |||
} | |||
|
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.
Please restore the return type
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.
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.
true
is a valid phpDoc type. A different thing is that some IDE's doesn't support it
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.
Are you sure?
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.return.pkg.html
States: "The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object returned, or simply "mixed". "
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.
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.
Thank you for a link :) I did not know that phpdoc and phpdocumentator differ about that.
Code is reformatted according to Your suggestions: multi-line arguments and more loose line length (only when line length excess 120 chars new line is introduced. Maybe it is time to change guide for contributors? It still points to outdated code style rules? I don't know how to move commits to other branch. Is this necessary? My next PR are in separate branches, only this one is on master because I started to work on it so long ago. |
return; | ||
} | ||
|
||
// Echo the response, if we're not returning it | ||
if (!$this->returnResponse) { | ||
echo $this->response; | ||
|
||
return; |
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.
Remove the blank preceding line.
@GrzegorzDrozd This looks like an EXCELLENT addition. I made a ton of comments, but there are some general ones I want to point out:
Finally, make sure you rebase, as master has diverged from when you created the original work. Thanks in advance -- again, looks EXCELLENT! |
Thank you for your appreciation :) I'll fix the code and apply your comments. But due to lack of time, I might not finish before the weekend. Or even next weekend. :( I will try to do my best. |
WSDL Generation rewrite (with new tests also) as a base for future changes. Conflicts: library/Zend/Soap/AutoDiscover.php library/Zend/Soap/Client/DotNet.php library/Zend/Soap/Server.php library/Zend/Soap/Server/DocumentLiteralWrapper.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php tests/ZendTest/Soap/Wsdl/CompositeStrategyTest.php
- Ensure params/return/throws annotations are in correct order, with no whitespace between. - Remove unnecessary empty lines. - Ensure properties are in alphabetical order. - Ensure classes referenced in docblocks are imported and/or resolved from current namespace.
- instead of is_object() && is_subclass_of()
Merged to develop for release with 2.2.0 -- thanks, @GrzegorzDrozd ! (I made the changes requested on merge) |
Thank you! :) I have deadline on my project so I planned to take care of Your feedback during this, 5 day (at least in Poland ;) ) weekend. Sorry for extra work which You had to do. ps. batch of next improvements coming soon :) This time smaller ;) |
…d/master WSDL Generation rewrite (with new tests also) as a base for future changes. Conflicts: library/Zend/Soap/AutoDiscover.php library/Zend/Soap/Client/DotNet.php library/Zend/Soap/Server.php library/Zend/Soap/Server/DocumentLiteralWrapper.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php tests/ZendTest/Soap/Wsdl/CompositeStrategyTest.php
- Ensure params/return/throws annotations are in correct order, with no whitespace between. - Remove unnecessary empty lines. - Ensure properties are in alphabetical order. - Ensure classes referenced in docblocks are imported and/or resolved from current namespace.
- instead of is_object() && is_subclass_of()
- per php-cs-fixer
Hello.
Serious Rewrite of WSDL generation from strings and simple DOM to full object oriented from the begining. This is a base for more changes like: multiple faults, missing xsd types etc.
It uses dom and proper namespaces. All tests are also rewritten to new structure and now are using xpath versus old string comparison.
Code formating in accordance with Coding Style.
More tests.
Integration of recent code changes introduced among others by ayastreb and weierophinney.
Even more tests and test data.
I checked current test output wsdl files against new xpath rules and everything was in green. I also checked new wsdl files against old tests.
I have more patches almost ready and all of them are based on this rewrite.
This is my first pull request so if I did something wrong please let me know so I can fix it.
Best regards.