Problem/Motivation

The twig.engine is manually included for BC reasons in Drupal\Core\Template\TwigEnvironment. See #2591515: Move twig_without() to the TwigExtension where all the other filters are and deprecate for more information.

Proposed resolution

Remove the manual inclusion of twig.engine as well as the deprecated twig_without() procedural function in twig.engine, which was the purpose of the include.

Passing tests will allow us to know for sure that the deprecated functions in twig.engine aren't being used.

Remaining tasks

  • Create patch

User interface changes

None

API changes

Removes the already deprecated twig_without() proceedural function in twig.engine.

Data model changes

None

Release notes snippet

The deprecated twig_without() proceedural function in twig.engine has been removed.

Comments

lauriii created an issue. See original summary.

andypost’s picture

Issue tags: +Drupal 9
scott_euser’s picture

Removed in patch so we can at least see what failures this results in (Drupal\KernelTests\Core\Theme\TwigEnvironmentTest passes fine).

scott_euser’s picture

Status: Active » Needs review
scott_euser’s picture

Status: Needs review » Active
andypost’s picture

Status: Active » Needs review

Proper ststus when there's patch https://www.drupal.org/issue-queue/status

scott_euser’s picture

Sorry about that! Updated patch which should solve the issue the test runner found.

scott_euser’s picture

voleger’s picture

Status: Needs review » Active

Thanks for the patch. But 9.x not branched yet. Leaving active status till active dev phase.

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.

krzysztof domański’s picture

Status: Active » Needs work
Issue tags: +Needs reroll

Needs a reroll.

TylerMarshall’s picture

Status: Needs work » Needs review
StatusFileSize
new2.06 KB

I've re-rolled the patch against the new 9.0.x branch. Let me know if I need to make any improvements. Tests pass locally.

scott_euser’s picture

Status: Needs review » Needs work

Can you add an interdiff please? It is difficult to review what you have changed otherwise.

markhalliwell’s picture

Issue summary: View changes
Issue tags: -Needs reroll +Needs change record

Can you add an interdiff please?

Rerolls, inherently, make interdiffs impossible to create due to the divergence of code between the patches, hence the need for a re-roll.

It is difficult to review what you have changed otherwise.

How is reviewing 11 added/removed lines manually difficult? I visually checked #12 against #7; it's fine.

---

Leaving as CNW since this should probably go ahead and also remove the twig_without() procedural function in twig.engine, which is the only reason twig.engine was being included anyway.

From the original IS (updated it): "know for sure that the deprecated functions in twig.engine aren't being used"

The fact that the tests pass in #12 is proof that it's not being used anywhere.

I don't see any follow-up issue for removing that function, so we might as well do that here too.

markhalliwell’s picture

Title: Remove manual inclusion of twig.engine in Drupal\Core\Template\TwigEnvironment » Remove twig_without() and manual inclusion of twig.engine TwigEnvironment
scott_euser’s picture

Makes it easy to see when viewing on a mobile phone what's changed since my previous patch is all. Didn't realise it was going to cause such a fuss, or I wouldn't have asked, sorry.

spokje’s picture

StatusFileSize
new5.46 KB
new3.39 KB

Patch with #14 addressed.

spokje’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

Testbot likes it => Needs Review

Created a draft CR here: https://www.drupal.org/node/3096454
If somebody could have a quick look at it, that would be grand since I've never written one before.

spokje’s picture

Status: Needs review » Needs work
StatusFileSize
new5.6 KB
new3.54 KB

Meh, forgot to remove a now obsolete use...

spokje’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me and is some nice cleanup for Drupal 9.

  • catch committed eadc537 on 9.0.x
    Issue #3011393 by Spokje, scott_euser, TylerMarshall, markcarver,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed eadc537 and pushed to 9.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.