Skip to content
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

Delete detailed mode for Class Phalcon\\Debug\\Dump , because the protected and private vars of the object should not be obtained outside. #13316

Closed
wants to merge 3 commits into from

Conversation

limingxinleo
Copy link
Contributor

Hello!

Delete detailed mode for Class Phalcon\\Debug\\Dump when php version >= 7.2, because I can not get the object protected or private vars.

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change:

Thanks

sergeyklay and others added 2 commits March 6, 2018 18:54
…n >= 7.2, because I can not get the object protected or private vars.
@limingxinleo limingxinleo changed the title Issue/#13315 Delete detailed mode for Class Phalcon\\Debug\\Dump when php version >= 7.2, because I can not get the object protected or private vars. Mar 8, 2018
for key, value in variable {
do {

let attr = each(variable);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please avoid each function. See: #13308

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I not find a method to replace each.So I remove detailed mode for Phalcon\\Debug\\Dump . When php version < 7.2, it works.

Copy link
Contributor

Choose a reason for hiding this comment

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

Anyway this code will introduce E_DEPRECATED error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, maybe someone can fix it later. I'll try it, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

expect(true)->true();
} catch (\Exception $ex) {
expect(false)->true();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is not necessary to use try/catch because tests will fail in case of exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see , thanks

…rotected and private vars of the object should not be obtained outside.
@limingxinleo limingxinleo changed the title Delete detailed mode for Class Phalcon\\Debug\\Dump when php version >= 7.2, because I can not get the object protected or private vars. Delete detailed mode for Class Phalcon\\Debug\\Dump , because the protected and private vars of the object should not be obtained outside. Mar 12, 2018
@limingxinleo
Copy link
Contributor Author

This is not a good PR, I think the best solution should start with Zephir, not cphalcon. But my level is limited and I'm sorry.

@sergeyklay
Copy link
Contributor

@limingxinleo Closing this in favor of #13332.
Thank you for the report, and for helping us make Phalcon better.

@sergeyklay sergeyklay closed this Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants