Skip to content

Twig 2#2

Open
mnolte wants to merge 4 commits intourodoz:masterfrom
mnolte:master
Open

Twig 2#2
mnolte wants to merge 4 commits intourodoz:masterfrom
mnolte:master

Conversation

@mnolte
Copy link
Copy Markdown

@mnolte mnolte commented Aug 16, 2017

Thanks for sharing your code! I've been using it for a while now.

Recently I upgraded symfony and sadly your plugin broke. So I made it work for Twig 2.
I thought I would return the favour and share the fix with you.

Kind regards!

mnolte added 3 commits August 16, 2017 01:36
Conflicts:
	src/Bridge/Twig/TruncateExtension.php
@timkelty
Copy link
Copy Markdown

👍

@timkelty
Copy link
Copy Markdown

Please merge!

Copy link
Copy Markdown

@micronax micronax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug detected

{
return array(
"truncateHTML" => new \Twig_Function_Method($this, "truncateHTML"),
"truncateHTML" => new \Twig_SimpleFunction($this, "truncateHTML"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument must be a string not an object.

@mnolte
Copy link
Copy Markdown
Author

mnolte commented Jun 4, 2018

Sorry guys, have been away for a while.

@micronax Was fixed in: e033992

Just tested in Symfony 4, works fine.

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

Successfully merging this pull request may close these issues.

3 participants