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

Twig 2 #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Twig 2 #2

wants to merge 4 commits into from

Conversation

mnolte
Copy link

@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

👍

@timkelty
Copy link

Please merge!

Copy link

@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

@@ -41,15 +40,15 @@ public function __construct(TruncateInterface $truncateService)
public function getFunctions()
{
return array(
"truncateHTML" => new \Twig_Function_Method($this, "truncateHTML"),
"truncateHTML" => new \Twig_SimpleFunction($this, "truncateHTML"),
Copy link

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
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