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

Show available getters in the Latte Tracy panel #259

Closed
janbarasek opened this issue Feb 8, 2021 · 2 comments
Closed

Show available getters in the Latte Tracy panel #259

janbarasek opened this issue Feb 8, 2021 · 2 comments

Comments

@janbarasek
Copy link

janbarasek commented Feb 8, 2021

David, thank you very much for the great Tracy panel for Latte, which shows the available variables in the template. Frontend developers can then easily remove their own {dump} macro.

However, when dumping variables, I very often encounter the problem that the frontend developer does not always know what the getters are available.

For example, if a template accepts an Article variable with an App\Entity\Article entity, there is a getter for each property (for example, there is a getTitle() for the $title property), but there may be other getters that the frontend developer may not find because they do not understand PHP code and find.

I try to remove SmartObject from entities and force the use of getters, because they are safer in type and there is no magical behavior.

Thanks a lot.

@dg
Copy link
Member

dg commented Feb 11, 2021

A possible solution would be to make dumping of variables optional so that it doesn't confuse encoders?

@janbarasek
Copy link
Author

janbarasek commented Feb 11, 2021

Yes I agree. However, this is not a system solution for large projects that have thousands of classes and entities that cannot be refactored.

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

No branches or pull requests

2 participants