rybakit / twig-deferred-extension

An extension for Twig that allows to defer block rendering.
MIT License
109 stars 3 forks source link

The compiled methods can lead to invalid PHP code due to duplicate method names #21

Open stof opened 2 months ago

stof commented 2 months ago

If a template contains a deferred block named foo and another block named foo_deferred, the compiled template will contain 2 methods block_foo_deferred (corresponding to different cases). The method names for block_*_deferred should probably be changed to deferred_block_* to avoid conflicts with the block_* pattern of block methods.