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 1-3: Deprecated: Unparenthesized #3003

Closed
owsPro opened this issue May 13, 2019 · 4 comments
Closed

Twig 1-3: Deprecated: Unparenthesized #3003

owsPro opened this issue May 13, 2019 · 4 comments

Comments

@owsPro
Copy link

owsPro commented May 13, 2019

Deprecated: Unparenthesized comes with PHP 7.4-dev & 8.0.0-dev

File: Twig/Node/Node.php

At Twig 1-3:
Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in D:\Laragon.4.0.13\www\Twig\1\Twig\Node\Node.php on line 43

At Twig 1:
Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in D:\Laragon.4.0.13\www\Twig\1\Twig\Node\Node.php on line 199

Solution:

@trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, \get_class($this)), E_USER_DEPRECATED);

@fabpot
Copy link
Contributor

fabpot commented May 14, 2019

Will be fixed by #3004

@fabpot fabpot closed this as completed May 14, 2019
@owsPro
Copy link
Author

owsPro commented May 14, 2019

You forgot at Twig 1.x the correction on line 199!

@fabpot
Copy link
Contributor

fabpot commented May 14, 2019

indeed, fixed in 44f02b2

@owsPro
Copy link
Author

owsPro commented May 14, 2019

Thanks for the quickly fix!

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

2 participants