Open othercorey opened 4 years ago
Would you want this info in the readme, or should we start a docs site like some of the other plugins have?
It would help me decide if I knew what documentation requests people have.
I don't want to re-create View documentation -- more like link to View and explain TwigView changes.
I want it to be easy to use -- but if I have to write more than very simple explanations then a separate document is probably easier.
Starting off with the README until it gets too long is a good place to start then :smile:
How these methods can be used avoiding this warning?
For now I created a TwigView
that overrides the assign
method to return nothing. I don't know if this is the way to go, but it seems to work.
Use the do
tag - https://twig.symfony.com/doc/3.x/tags/do.html
{% do _view.assign() %}
Thanks, it worked out great and makes a lot more sense. I should have read the docs more carefully.
The previous package didn't complain about it at all, so I though it was ok.
The assign()
function returns $this
and the previous TwigView had a hack to convert itself to an empty string. It didn't throw an error, but it wasn't supposed to work like that.
Users will get a confusing php error about casting to string.
Provide a better explanation for some of the porting gotchas.