-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
magento/magento2#8607: Interface constructor if present will break Magento compilation #9524
Merged
magento-team
merged 1 commit into
magento:2.1-develop
from
LoganayakiK:LoganayakiK-patch-1
May 15, 2017
Merged
magento/magento2#8607: Interface constructor if present will break Magento compilation #9524
magento-team
merged 1 commit into
magento:2.1-develop
from
LoganayakiK:LoganayakiK-patch-1
May 15, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pilation - $class->isInterface() method of an php reflection class will implement the getConstructor() function not to pull any dependencies from the interface constructor. So we must have to add this condition in order to call getConstructor(). This solves the issue
Could you fix the code style to be something like this? if ($class->isInterface() ||
!$class->getFileName() ||
false == $class->hasMethod('__construct') ||
!$inherited &&
$class->getConstructor()->class != $class->getName()
) {
return $output;
} It looks awful atm. |
@LoganayakiK thank you for your contribution. Could you please cover the fix with unit test? |
Hi Oleksii,
Good day !
I will do the unit test. Could you please share me the book details that
you have shared me on friday?
If so that would be helpful for me to understand and do well in a right way.
Thanks in advance.
Regards,
Loganayaki Kathirvel
…On 9 May 2017 11:56 pm, "Oleksii Korshenko" ***@***.***> wrote:
@LoganayakiK <https://github.com/LoganayakiK> thank you for your
contribution. Could you please cover the fix with unit test?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9524 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AbEyH5L176GmYdZOVxxY1CzRtXpV6E8iks5r4K_FgaJpZM4NRuOt>
.
|
@LoganayakiK Try this book: Test Driven Development: By Example (author Kent Beck). This is good book to start |
magento-team
pushed a commit
that referenced
this pull request
May 15, 2017
…ento compilation #9524 - covered fix with the unit test
@LoganayakiK thank you for your contribution to Magento 2 project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
$class->isInterface() method of an php reflection class will implement the getConstructor() function not to pull any dependencies from the interface constructor.
So we must have to add this condition in order to call getConstructor(). This solves the issue
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist