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

What would you like to see as major changes that would lead to a BC break for the next major release of Twig? #3951

Open
fabpot opened this issue Dec 22, 2023 · 125 comments

Comments

@fabpot
Copy link
Contributor

fabpot commented Dec 22, 2023

We've started working on the next major Twig release. As announced last year, this new version will probably land under the Symfony mono-repository.

For the first time in Twig history, I'd like to fix the major issues that would be BC breaks and that we've never done.

This issue acts as a community wish list for things you want to see in the next major version that could lead to BC breaks (hint: like operators precedence).

Feel free to comment and vote.

@nsetyo
Copy link

nsetyo commented Dec 22, 2023

I really like the askama approach to make template type safe, and a little out of topic, it would be great if twig had an up-to-date formatter (maybe with a prettier plugin maintained by core team)

@GromNaN
Copy link
Contributor

GromNaN commented Dec 22, 2023

I like that you started removing usage of echo and ob_* in #3950. That's a breaking change if some extension use echo instead of returning a string.

This will allow concurrent Twig renderings using fibers.

@aszenz
Copy link

aszenz commented Dec 22, 2023

I would like to see a focus on component based templating over overriding/inheritance.

For that macros need an improvement specifically the need to import them separately in every block.

Would be great to support ux html component syntax natively for creating components.

A type checker plugin (pslam/phpstan) would be nice to have as well.

@TheCelavi
Copy link
Contributor

Support for step debugging via source maps would be nice.

@JoshuaBehrens
Copy link

Plugin / Theme Structure like Shopware built around Twig. We had to built something as well and it feels bad to just copy if this could have been solved directly. And twig is already strong in multiple inheritance.

@JoshuaBehrens
Copy link

Static type support for generated php to increase performance and predictable execution. I already tried to approach it but optimisation levels were commented as too breaking. So we could break it here. #3928

@JoshuaBehrens
Copy link

JoshuaBehrens commented Dec 22, 2023

Still be able to use Twig without pulling a lot of more dependencies.

E.g when you merge the twig symfony bridge into the twig package and in a small project just want to get some templating, you don't get the whole dependency clutter from the framework bundle. I don't use laravel/blade because you always get so much laravel stuff with it. I just want something small that can do inheritance and autoescape. Otherwise I would just use php right away.

I see benefits in merging some code from expression language as twig has to parse expressions as well and has "just" some nodes on top.

@75th
Copy link

75th commented Dec 22, 2023

Change the null-coalescing operator to an empty- (or falsy-) coalescing operator. All the time I have a variable that is empty but not null, and I want to do variable ?? 'Something', but I can’t. And if ? : works on falsiness, then so should ??.

EDIT: I expected some 👎🏻 reactions but I'd like to hear an explanation for them

@neluba
Copy link

neluba commented Dec 22, 2023

Some type of script block to write multiple statements without typing {% %} for every line would be nice.

Something like this:

{% script %}
set counter = 0;
set color = "#33b5e5";
set list_items = [{  ... }, { ... }];

if (some_var is same as true)
    set list_items = [...list_items, { ... }];
endif
{% endscript %}

@ericmorand
Copy link
Contributor

Definitely two things:

Removing entirely the line tag

It is not a template syntax but a compilation syntax, as discussed there: #353.

Rethinking the block philosophy

As of today, the block tag serves two purposes: declare a block and output a block. This not only creates confusion but also forces the compiler to make some arbitrary and non consistent decision like allowing a block definition inside a set but forbidding it inside a if (see #3926).

I think that the block tag should be dedicated to declare a block - and should be at the root level of template - and the block and parent functions dedicated to display them.

If you're intested in discussing this, I can write a special version of Twing that implement this specification so that we can test the behaviour with embed.

Typically a big breaking change.

@reinierbutot
Copy link

Change the null-coalescing operator to an empty- (or falsy-) coalescing operator. All the time I have a variable that is empty but not null, and I want to do variable ?? 'Something', but I can’t. And if ? : works on falsiness, then so should ??.

EDIT: I expected some 👎🏻 reactions but I'd like to hear an explanation for them

Its called the null coalescing operator for a reason. The whole php community is moving towards more strict typing, let's not create unexpected results by changing a well known concept like ??. For your case I would implement a custom function or just make sure the data sent to the template is correct.

@reinierbutot
Copy link

Add the possibility for global macro inheritance. Import in base template and available in all inheriting templates. Maybe a globalmacro keyword?

@75th
Copy link

75th commented Dec 22, 2023

Its called the null coalescing operator for a reason.

It's called that because that is what it does. If it did something else, it could be called something else.

The whole php community is moving towards more strict typing,

Twig is not PHP. It is written in PHP, it compiles to PHP, but it is its own language with its own goals. (inb4 "Your idea would be an ’own goal!’”) I don't believe its goal is merely "Enable back-end OOP PHP experts to write 1:1 PHP code in fewer characters".

let's not create unexpected results

This thread is specifically about breaking changes. Anything accepted from this thread will be equally unexpected to the person who compiles an old Twig file with the new version without reading the new docs.

For your case I would implement a custom function

?? is syntactic sugar for an easily conceived but lengthily typed combination of other Twig logic. The entire point is the brevity, and making it way more useful for common cases in a language that is not striving to be as strict as PHP proper is. And frankly, even if a null-coalescing operator is more appropriate for a stricter language, it kind of sucks that the question marks in ? : and ?? mean similar but very-importantly-different things.

or just make sure the data sent to the template is correct.

Shall we deprecate the set tag, then? What about the |map filter? The Twig language could be a lot smaller if we told all its users to just make sure the data is correct before it's sent to the template's context.

Anyway, I won't say any more, this is clearly a non-starter. I don't think it should be, though. I'm full-stackish, I can write clean and pretty and strictly typed OOP PHP myself, but I don't think those same sensibilities should be uniformly applied to a template language meant to make front-end developers' lives easier.

@ericmorand
Copy link
Contributor

ericmorand commented Dec 22, 2023

I agree with most of the points @75th is raising, but let me add a bit of fuel to them:

Twig is not PHP. It is written in PHP, it compiles to PHP, but it is its own language with its own goals.

This should be in the front page of every article and documentation dedicated to Twig. Twig is not "a templating language for PHP" for a good reason: the definition does not make sense. No language can be a language for another language. I'm sure that said this way, everybody would agree that it makes no sense.

Twig is a language, with compilers dedicated to be run by different runtimes (PHP, Ruby, NodeJS, browser runtimes...). And as such, it can - and must in my opinion - make its own decisions.

the question marks in ? : and ?? mean similar but very-importantly-different things.

This should definitely raise some concern: that the ternary operator is not strict but that the nullish coallescing one is is something that it not consistent and goes against @reinierbutot "The whole [...] community is moving towards more strict typing". If one is strict, the other must be strict. If one is not, the other must not be.

Shall we deprecate the set tag, then? What about the |map filter? The Twig language could be a lot smaller if we told all its users to just make sure the data is correct before it's sent to the template's context.

Absolutely correct: @reinierbutot, if your position is "just make sure the data sent to the template is correct", then why these last years have seen more and more functions and filters added to Twig that are dedicated to manipulate and generate data instead of just outputting data?

Why do the formatting filters exist? The backend knows everything required to send appropriately formatted dates or numbers or currencies or countries to the templates, so why were these formatting features added if "just make sure the data sent to the template is correct"?

Why do the date creation function exist? The backend knows how to create a date and should send dates to the templates, right?

I think we must not forget that a templating language main purpose is to process plain text. So, yeah, @reinierbutot, I agree with you that we must "make sure the data sent to the template is correct". But you have to admit that it is not the direction that Twig has been taking - and it is getting worse and worse everyday (eg the infamous cache tag that is the strict definition of something that is not in the scope of a templating language).

@srsbiz
Copy link

srsbiz commented Dec 22, 2023

In template inheritance, variables set outside blocks in child templates should have priority over these declared in base template https://blog.srsbiz.pl/2021/07/scope-of-set-in-twig-templates/

@JoshuaBehrens
Copy link

JoshuaBehrens commented Dec 22, 2023

@ericmorand

Why do the formatting filters exist? The backend knows everything required to send appropriately formatted dates or numbers or currencies or countries to the templates, so why were these formatting features added if "just make sure the data sent to the template is correct"?

As someone coming from extending applications built-upon a framework I sometimes do not have the option to change the data, that I get. "Have no option" means no services in DI, no events in event dispatcher or as in "no data returned from a controller but rendered directly". There is always the vendor patching way but I try to focus on something maintainable.

Example: when someone is giving me a doctrine entity for the template I just get a DateTimeInterface property, that could be not yet timezoned or formatted. And I think this is good. So when I have a data cache, the entity can be held in the cache independent to who renders the entity.

Another example: Sometimes data is expressed twice. So when I display a date human readable, I have often have a structured data part, that expresses the same date but in a machine readable format. So I'd rather have the date once in the template data and be able to format it whenever I need it in whatever format I need it. This is the part, that gives me flexibility in changing templates of others.

@ericmorand
Copy link
Contributor

@JoshuaBehrens I get your point and I agree - but it says a lot about how backend are (not) specified - and mainly driven by the frameworks instead of by the requirements - and how frontend developers are left behind even today.

My point is that if one says that "data sent to the template is correct", then it makes all the filters and data manipulators of Twig not legit.

@jwage
Copy link

jwage commented Dec 22, 2023

I would love the ability to statically analyze twig templates with phpstan/psalm. Twig templates are one of the remaining vulnerable parts of codebases to breaking changes and not knowing it.

@reinierbutot
Copy link

@ericmorand @75th thanks guys.

So you want var ?? other_var logic to be identical to var ?: other_var?

It does actually feel more like the Twig way. I'll be looking forward to using this new falseycoalescing operator 😂

@ericmorand
Copy link
Contributor

@reinierbutot, well, I don't have a PHP setup ready but even in JavaScript, the behaviour of the ternary and the nullish coallescing operators are not consistent - or maybe they are but it is not obvious to me:

console.log(null ?? 5); // 5
console.log(null ? 4 : 5); // 5
console.log('' ?? 5); // <empty string>
console.log('' ? 4 : 5); // 5

As you can see, '' is considered as truthy in the third statement, but falsy in the fourth. So maybe Twig is right, and you are too.

@yguedidi
Copy link

Maybe not a BC break and even maybe discarded already, but what about allow to pass an object as context when rendering a template?

@75th
Copy link

75th commented Dec 23, 2023

So you want var ?? other_var logic to be identical to var ?: other_var?

Ohh, crap. I must confess: I didn’t realize that a ?: b was valid PHP and Twig, probably because it’s not valid JavaScript and I mistakenly wrote off the concept everywhere. I still think it’s kind of ugly to have ? mean something different in two different operators, but then I guess if you take ?: as “not a thing” and ?? as “REALLY not a thing” then it makes a certain sense.

So, request withdrawn.

(for that matter, it might have been nice to have it be ??: so you could do a ?? b : c, even though that would be useful infrequently)

@tjveldhuizen
Copy link

The fact that the default default value of the default filter (wow, that sounds complicated) is '' and not null cost me a lot of time in the past. I think it would meet dev's expectations more when it returns null if nothing else is specified.

- function _twig_default_filter($value, $default = '')
+ function _twig_default_filter($value, $default = null)

@smnandre
Copy link
Contributor

Having new extension points somewhere between Parser and Lexer could facilitate Twig/LiveComponent maintenance and unlock some new features :)

@smnandre
Copy link
Contributor

Very personal wish, but I'd love to have "private" templates (as in "not possible to override" with the multi-paths system, or extends)

@smnandre
Copy link
Contributor

I almost forgot... those are also old wishes of mine, but i can't remember / understand why i marked them at "not doable"

if set / ifset

The equivalent of PHP if ($foo = ..)

{% ifset foo = bar|blop %}. ... {% endifset %}

Break

Any method to "exit" while in loops, but ideally also inside blocks

@vinceAmstoutz
Copy link

vinceAmstoutz commented Dec 23, 2023

Strict typing for example using === instead of same as (faster DX)

@tacman
Copy link

tacman commented Dec 23, 2023

I'd like to be able to combine a set and if statement.

{% if count = post.comments.count %}
  There are {{ count }} comments.
{% endif %}

instead of

{% set count = post.comments.count %}
{% if count %}
  There are {{ count }} comments.
{% endif %}

@tacman
Copy link

tacman commented Dec 23, 2023

I find adding properties to objects to be complicated and hard to read. I'd like to be able to add an element to an object without doing the merge, e.g. instead of

{% if options.depth is not none %}
{% set options = options|merge({'depth': currentOptions.depth - 1}) %}
{% endif %}
{# update the matchingDepth for children #}
{% if options.matchingDepth is not none and options.matchingDepth > 0 %}
{% set options = options|merge({'matchingDepth': currentOptions.matchingDepth - 1}) %}
{% endif %}

from https://github.com/KnpLabs/KnpMenu/blob/master/src/Knp/Menu/Resources/views/knp_menu.html.twig#L34C29-L41

I'd like to be able to simply set an object property.

{% set options.currentDepth = currentOptions.depth - 1 %}

It'd be even better if there were a way to combine the if statement with the set

{% set options.currentDepth = (currentOptions.depth) - 1 if  options.depth is not none %}
{% options.depth is not none ? set options.currentDepth = (currentOptions.depth) - 1 %}

Just brainstorming on the if / set, but the ability to set a single property would be really nice.

@RobinDev
Copy link

I would love the ability to statically analyze twig templates with phpstan/psalm. Twig templates are one of the remaining vulnerable parts of codebases to breaking changes and not knowing it.

Clearly a must have even if it's not directly linked to twig codebase ! Extending this check to twig bridge render arguments would be perfect.

It's a bit off, but with sf router we have the same vulnerability when you change an arg name. How are you managing it ?
(except using static call like myClassController::routeParams(/* here a duplicate from __invoke params except Request*/) + fqcn-based route myClassController::class maybe, i did some similar experiments around league/plates).

@zmitic
Copy link

zmitic commented Mar 12, 2024

This issue acts as a community wish list for things you want to see in the next major version that could lead to BC breaks

I don't know if it is a BC, but a support for promises would be great. I have some ideas how it would be possible to work without making another HTTP call (as I do now), but the implementation is beyond my skills.


Another wish would be Twital syntax like:

<ul t:if="users">
    <li t:for="user in users">
        {{ user.name }}
    </li>
</ul>

@ericmorand
Copy link
Contributor

@zmitic how would your syntax proposal work exactly?

For example, how would you use it there?

{% for index in 1..10 %}
.foo-{{ index }} {
    z-index: {{ index }};
}
{% endfor %}

@alinceDev
Copy link

alinceDev commented Mar 13, 2024

Not a BC break, I would like to have the template path to be rendered in dev mode in the source code so that when inspecting the code in the browser, I can see the template of the block, similar to what Drupal does."

<div>.....
    <!-- @twig templates/components/button.html.twig -->
    <button>
       My button
    </button>
    ......
</div>

I know there is the toolbar, but I think it is more convenient to have this information when inspecting.

Thanks

@tacman
Copy link

tacman commented Mar 13, 2024

@twig templates/components/button.html.twig

you can use <!-- {{ _self }} -->

@alinceDev
Copy link

@twig templates/components/button.html.twig

you can use <!-- {{ _self }} -->

Does that mean adding this manually to all files? And then remembering to remove it before committing to git, as I only want to display it in the development environment.

@stof
Copy link
Member

stof commented Mar 14, 2024

@alinceDev the hard part about that is that Twig is not specific about HTML (if you render something else, using HTML comments will just break everything). And even in HTML, comments are not allowed in all contexts. So this is unlikely to go in the core.
But if you want to do that in your own project, it might be doable with a node visitor.

@GromNaN
Copy link
Contributor

GromNaN commented Mar 14, 2024

This could done in a third party package by wrapping the loader and prepend the template when the template contains an HTML tag.

@mikespub
Copy link

As someone who often switches from PHP to Python and back, I'd like to keep the Twig vs Jinja differences small for any future evolution, both in concept, syntax and implementation.

I'm not sure what top 3 changes that might require, but I'm sure you can think of some based on current/future feature set of both...

And since I sometimes have to deal with the same templates in Javascript as well, please keep twig.js up to date too :-)

@mx03
Copy link

mx03 commented Mar 14, 2024

date filter that return null if value is null instead current date, as its much more error prone than null.

If the value passed to the date filter is null, it will return the current date by default.
https://twig.symfony.com/doc/3.x/filters/date.html

At the moment its possible to achieve this with a ternary operator
{{ post.published_at is empty ? "-" : post.published_at|date("m/d/Y") }}

but its much more logically if you just can chain the default filter
{{ post.published_at|date("m/d/Y")|default('-') }}

@PabloKowalczyk
Copy link

switch/match (or both) , please :)

@pontus-mp
Copy link

I think this has already been mentioned earlier, but I'll still add my 2 cents. Something I miss is embed-style capabilities in a more local scope. I'd imagine doing this neatly would affect BC.

Something like this but more thought through:

{% embeddable Marquee %}
  {# Same content as in a normal .twig file for embedding, so it's easy to move into a separate file if needed later #}
  <marquee>
    {% block content %}
      Default content
    {% endblock %}
  </marquee>
{% endembeddable %}

{# Using same embed block as a classic embed, but with a named embed  #}
{% embed _self.Marquee %}
  {% block content %}
    <blink>A blink inside a marquee!</blink>
  {% endblock %}
{% endembed %}

{# Maybe even add macro-like import functionality, which would make them more or less replace macros #}
{% import 'my_embeds.twig' as Embeds %}
{% embed Embeds.Blink %}
  {% block content %}
    Blinky!
  {% endblock %}
{% endembed %}

@75th
Copy link

75th commented Mar 19, 2024

Functions written in Twig that work like macros, but return a value instead of printing something.

{% function restructure_data(data) %}
  {% set output = { title: data.post_title } %}
  {% if data.body is not empty %}
    {% set output = output|merge({description: data.body}) %}
  {% endif %}
  
  {% return output %}
{% endfunction %}

@cuchac
Copy link

cuchac commented Mar 26, 2024

Add support for HTML "attribute" expressions. For example

<ul twig:if="users">
    <li twig:for="user in users">
        {{ user.name }}
    </li>
</ul>

Or at least add support in Parser/Lexer/Tokenizer to write Extension supporting this syntax - able to parse HTML and add more syntactic sugar.

@ericmorand
Copy link
Contributor

@cuchac Twig is not an HTML superset, it is a templating language. How would Twig be able to detect "HTML"?

Would the following template be valid, and if not, how is Twig supposed to detect that the use of twig:for="user in users" is not valid here but valid in your example?

.foo twig:for="user in users" {
    {{ user.name }}
}

@cuchac
Copy link

cuchac commented Mar 27, 2024

@ericmorand Hello, there are many examples of PHP template languages that supports such syntax. Many frontend developers prefer such "attribute" control statements. For example https://phptal.org/, https://latte.nette.org/, https://github.com/goetas/twital, ...

Twig already knows about file type - it applies different escaping to variables in HTML and JS. I will happily write extension that supports such syntax, but as far as I know, there is no support for parsing context outside twig tags.

Look what Twig UX Components had to do - https://github.com/symfony/ux/blob/2.x/src/TwigComponent/src/Twig/TwigPreLexer.php - they had to write complex custom parser to hack components syntax like <twig:Button ...> and they regularly fix parsing errors - https://github.com/symfony/ux/commits/2.x/src/TwigComponent/src/Twig/TwigPreLexer.php

Every extension that wants to use such HTML-dependent syntax would have to create custom parser, introduce many bugs and probably break other extensions.

If internal tokenizer/lexer/parser will have support for HTML syntax, or some external extension will provide it with support from core, many valuable extensions can be created. For example let's close frequent XSS errors by activating JS escaping whenever <script> tag is hit inside HTML and it is very easy to forget to add proper {% autoescape 'js' %} tag.

@ericmorand
Copy link
Contributor

ericmorand commented Mar 27, 2024

If internal tokenizer/lexer/parser will have support for HTML syntax

That's my point: it would make Twig an HTML parser, opinionated in favor of just one syntax among the infinite possible things that Twig is able to output. Arguably, why not propose syntactic sugar for CSS - and thus make Twig a CSS parser too?

For example let's close frequent XSS errors by activating JS escaping whenever <script> tag is hit inside HTML and it is very easy to forget to add proper {% autoescape 'js' %} tag.

This is arguably not the purpose of Twig - or any templating language - to handle post-processing of this sort. We already have a fair amount of HTML post-processors - available for every technological stack existing - dedicated to achieve such things as detecting / fixing XSS issues.

Don't get me wrong: in my opinion, the danger here is to end-up with an unfocused engine that tries to support everything.

@cuchac
Copy link

cuchac commented Apr 2, 2024

@ericmorand I'm not suggesting to make Twig HTML-only parser. CSS syntactic sugar would be great, same as JS and HTML syntactic sugar. But everything as extension, optional. That is the point of extensions.
There already exists in Twig core way to extend tokenizer/lexer/parser and Symfony UX uses that support. But the support does not fit well some "modern" use-cases (as can be seen in TwigPreLexer) and I think it would be great to have some basic support for parsing text outside of twig blocks and be able to safely and more easily create extensions supporting HTML/CSS/... syntax.
I hope this clarifies my proposal enough and sorry for spamming the wish-list.

@u03c1
Copy link

u03c1 commented Apr 8, 2024

"it would be great if twig had an up-to-date formatter (maybe with a prettier plugin maintained by core team)"

One vote for this.

@vinceAmstoutz
Copy link

"it would be great if twig had an up-to-date formatter (maybe with a prettier plugin maintained by core team)"

One vote for this.

Actually https://github.com/VincentLanglet/Twig-CS-Fixer is the best option

@u03c1
Copy link

u03c1 commented Apr 12, 2024

"it would be great if twig had an up-to-date formatter (maybe with a prettier plugin maintained by core team)"
One vote for this.

Actually https://github.com/VincentLanglet/Twig-CS-Fixer is the best option

I think Twig-CS-fixer will fix coding standard issues in twig code, not format .html.twig files for web app and symfony UX components.

Ex, this code will be fine for Twig-CS-fixer.

<section>
    {% for item in items %}
    <div>{{ item }}</div>
{% endfor %}
</section>

I know twig code is not "only" dedicated to render html, and can be used inside yaml or other, but I suspect most of twig usages fall into templating for html output inside web page or email. Each IDE's support is own opinionated plugin and set of rules for linting, indenting etc... (https://twig.symfony.com/doc/3.x/templates.html#ides-integration), so in a team with several developer and designer, it's almost impossible to be consistent.

Anyway, not something that would lead to a BC break as stated in the subject for this issue.

@smnandre
Copy link
Contributor

Ex, this code will be fine for Twig-CS-fixer.

I'm 99.99% sure @VincentLanglet won't bite anyone adding a new rule to handle indentation levels :)

@u03c1
Copy link

u03c1 commented Apr 12, 2024

Ex, this code will be fine for Twig-CS-fixer.

I'm 99.99% sure @VincentLanglet won't bite anyone adding a new rule to handle indentation levels :)

He won't bite, but it seems that this is not trivial: VincentLanglet/Twig-CS-Fixer#47

@fabpot
Copy link
Contributor Author

fabpot commented Apr 13, 2024

Ex, this code will be fine for Twig-CS-fixer.

I'm 99.99% sure @VincentLanglet won't bite anyone adding a new rule to handle indentation levels :)

He won't bite, but it seems that this is not trivial: VincentLanglet/Twig-CS-Fixer#47

I've added a reference to the tool in #4017

@MauricioFauth
Copy link
Contributor

Changing the default value of the strict_variables environment option to true would be great.

@alexander-schranz
Copy link
Contributor

@MauricioFauth would not do that. I find the current solution in Symfony awesome. Strict Variables for Dev environment and on Prod no strict variables. Specially for Dynamic Systems like Content Managements templates devs forgot a lot of times to give all variables in into there includes templates as the reuse it on different parts and on strict variables the production side would end then in a 500 error. So think its currently a great balance with depending on require strict variables only on DEV environment.

@stof
Copy link
Member

stof commented Apr 18, 2024

@alexander-schranz my experience with that is that disabling strict_variables in prod does not avoid 500 errors but makes them much harder to debug. The fallback to null will break when this value is passed to a filter or function which does not support null (and at that point, it will be hard to know why the value is null) or will cause unwanted effects (formatting null as a date will format the current time, which won't break but will render an unexpected value to the user).

@MauricioFauth
Copy link
Contributor

@alexander-schranz I'm also using it this way (strict_variables enabled in dev env and disabled in prod env). I suggested to just change its default value, so instead of enabling strict_variables in dev, you will disable it in prod.

@alexander-schranz
Copy link
Contributor

@stof Understand that, but think the best way would for prod would be handle it as null but still log an error into the logger. Think currently it is ignored silently?

@azjezz
Copy link

azjezz commented Apr 28, 2024

possibility to render two templates at the same time. this requires that twig stops echoing strings, and instead collects them into a buffer, and stop using ob_start() .. etc.

ref: #3599

@alexander-schranz
Copy link
Contributor

@azjezz think they already on a good way with: #3950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests