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

Add MethodGenerator::copyMethodSignature without body and phpdoc #132

Merged
merged 3 commits into from
Oct 20, 2017
Merged

Add MethodGenerator::copyMethodSignature without body and phpdoc #132

merged 3 commits into from
Oct 20, 2017

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Oct 11, 2017

Adds a Zend\Code\Generator\MethodGenerator::copyMethodSignature method that is similar to fromReflection() but without the copying the method body and phpdoc as this is quite heavy to parse (it requires file IO, regexes, tokenization of code).
It's for example useful when creating proxies where you normally change the method body afterwards anyway. See Ocramius/ProxyManager#393 where it increases performance.

@Tobion Tobion changed the title Copy method signature Add MethodGenerator::copyMethodSignature without body and phpdoc Oct 11, 2017
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, nice work! 👍

@Tobion
Copy link
Contributor Author

Tobion commented Oct 19, 2017

@Ocramius can you merge this and make a release so I can use it in Ocramius/ProxyManager#393 ?

@Ocramius
Copy link
Member

@Tobion I'll try to do releases over the weekend.

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Ocramius Ocramius self-assigned this Oct 20, 2017
@Ocramius Ocramius added this to the 3.3.0 milestone Oct 20, 2017
@Ocramius Ocramius merged commit 2cd2574 into zendframework:master Oct 20, 2017
@Tobion Tobion deleted the copy-method-signature branch October 20, 2017 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants