Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

[Zend-Code] Fix Code Generation for non namespace classes#4988

Closed
danez wants to merge 3 commits into
zendframework:masterfrom
danez:master
Closed

[Zend-Code] Fix Code Generation for non namespace classes#4988
danez wants to merge 3 commits into
zendframework:masterfrom
danez:master

Conversation

@danez
Copy link
Copy Markdown
Contributor

@danez danez commented Aug 20, 2013

ClassGenerator and ParameterGenerator had some issues with non-namespace classes.

The ClassGenerator tried to concatenate the namespace in the check if a reflectionmethod is from the same class.

The ParameterGenerator removed the first character for non-namespace classnames.
And there is a backslash missing for non-namespace classnames. As zf2 requires 5.3.3 this slash does not hurt anyone.

@weierophinney
Copy link
Copy Markdown
Member

Please add unit tests.

@danez
Copy link
Copy Markdown
Contributor Author

danez commented Aug 21, 2013

Added unit tests before fixing issue.

Daniel Tschinder and others added 3 commits August 21, 2013 10:27
If using ClassGenerator for non namespace classes no methods are found inside classes, as the classname check fails always.
…pace and add backslash for non namespace classes

For non-namespace classes this substr/strlen algorithm removed the first character of the classname.
The slash is needed when generating namespace classes, which use non-namespace classes.
@danez
Copy link
Copy Markdown
Contributor Author

danez commented Aug 21, 2013

Same here, composer on travis not working atm -> failed

@danez danez closed this Aug 21, 2013
@danez danez reopened this Aug 21, 2013
weierophinney added a commit that referenced this pull request Aug 21, 2013
[Zend-Code] Fix Code Generation for non namespace classes
weierophinney added a commit that referenced this pull request Aug 21, 2013
@ghost ghost assigned weierophinney Aug 21, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants