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

EngineInterface is deprecated in Symfony 4.3, and they will only work with Twig #45

Closed
Richard87 opened this issue Aug 22, 2019 · 0 comments · Fixed by #46
Closed

EngineInterface is deprecated in Symfony 4.3, and they will only work with Twig #45

Richard87 opened this issue Aug 22, 2019 · 0 comments · Fixed by #46

Comments

@Richard87
Copy link
Contributor

TwigEngine is deprecated in Symfony 4.3

/**
 * This engine knows how to render Twig templates.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @deprecated since version 4.3, to be removed in 5.0; use Twig instead.
 */
class TwigEngine implements EngineInterface, StreamingEngineInterface
{

Since APYBreadcrumbTrailBundle uses Twig anyway:

        <service id="apy_breadcrumb_trail.twig.extension" class="%apy_breadcrumb_trail.twig.extension.class%">
            <argument type="service" id="apy_breadcrumb_trail" />
            <argument type="service" id="twig" />
            <tag name="twig.extension" />
        </service>

(by the name twig.extension, it should just take the twig service, wich solves the problem).

    /**
     * BreadcrumbTrailExtension constructor.
     * @param Trail $trail
     * @param Environment $templating
     */
    public function __construct(Trail $trail, Twig\Environment $templating)
    {
        $this->trail = $trail;
        $this->templating = $templating;
    }
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 a pull request may close this issue.

1 participant