Open erickcomp opened 6 years ago
Hi @ericklima-comp!
Can you maybe write an example class and snippet of zend-code
that reproduces the actual crash?
If you want to, we can guide you through the pull-request process, so you familiarize with the platform and can apply the changes with your own attribution as well, but we first need a unit test. See https://github.com/zendframework/zend-code/blob/323188dc74e2780a401b8014804ef7edcc0fd865/test/Reflection/MethodReflectionTest.php for examples.
Hello. I'm kind a dinossaur when it comes to testing. Anyway, I've attached a whole test case. If you need anything else, just let me know. zend-code-bug-test-ericklima.comp_2018.04.17.zip
@ericklima-comp you uploaded the entire zip with the repo - can you maybe just add your test to https://gist.github.com/ for now? I can then show you how to open a pull request here.
@Ocramius . Here it is! https://gist.github.com/ericklima-comp/bb32e0b9ec1a7ad9c430a201a96d5c3f
This repository has been closed and moved to laminas/laminas-code; a new issue has been opened at https://github.com/laminas/laminas-code/issues/6.
When I use this method to grab the protype of a method of my class, it crashes with this error:
It happens because I have a method without return. My opinion is: the return type should be "void" on prototype. Issue #84 adresses the support for void. I've modified the code to make it return void. I could create a pull request if you guys want me to do so.
It was like this:
And I've changed to this:
If you don't think it should be void, at least set $returnType variable to empty string or null. I've read the CONTRIBUTING.md, but I'm still pretty new to contributing on github, so fell free to get this code and push it into repository.
Regards