-
Notifications
You must be signed in to change notification settings - Fork 4
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
Template with {form $form
throws "Ternary operator condition is always false."
#388
Comments
Includes are not covered very well :( personally, I don’t use them much, so we have to look at them closely. Would be very helpful if you could create failing test cases |
Thanks though it seems the issue is also present when the template is a top-level one and not included. I've updated the description. |
I see, this is because of dynamic form name (variable is used here). I will check if we know the value of variable at the point when we are processing forms, because phpstan knows it later. |
This has also allowed me to replace `{form $form}` with `{form date}`, similar work done previous commits. This works around efabrica-team/phpstan-latte#388.
I have a template with (source)
That template is included in another template with (source):
But the fact that it's an included template doesn't matter. It also happens when it's a top-level template with
{form $formName}
and the presenter does$this->template->formName = 'invoice';
The template is compiled to
Analyzing it on level 4 gives:
I don't know what to do with that :-(
The text was updated successfully, but these errors were encountered: