Problem/Motivation

While working on #2568171: Upgrade to Twig 1.22 and implement our own cache class, @znerol was able to file a pull request upstream to fix the race condition upstream in Twig, so we no longer need to override loadTemplate to handle the race condition ourselves.

This also means we have less work to do in #2568181: [META] Update to Twig 2.x in Drupal 9.

Proposed resolution

Remove our override and update our cache class to match the new interface (has() has been removed).

Remaining tasks

TBD

User interface changes

n/a

API changes

Nothing relevant.

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cottser created an issue. See original summary.

star-szr’s picture

Title: Remove our race handling in TwigEnvironment::loadTemplate(), it's fixed upstream now » Remove race condition handling in TwigEnvironment::loadTemplate(), it's fixed upstream now
Status: Active » Needs review
FileSize
2.61 KB
17.18 KB

We need to wait until the next Twig release to do something like this and use ~1.22.2 in our core/composer.json.

star-szr’s picture

Status: Needs review » Postponed

The last submitted patch, 2: remove_race_condition-2571817-2.patch, failed testing.

The last submitted patch, 2: remove_race_condition-2571817-2.patch, failed testing.

star-szr’s picture

Issue summary: View changes
star-szr’s picture

Assigned: star-szr » Unassigned
star-szr’s picture

Status: Postponed » Needs work

Working on this now.

hussainweb’s picture

Status: Needs work » Needs review
FileSize
5.68 KB
17.79 KB

I used the -test patch from #2 and updated the version constraint to ^1.22.2 (so that it picks up everything until 2.0). I think that was the intention, right?

star-szr’s picture

Yeah that's fine. A comment would have been nice (or ping or something), I was about to post a patch. Anyway, thanks.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice!

hussainweb’s picture

@Cottser, I read your comment again. For some reason I thought you said needs work now. Sorry for the confusion.

star-szr’s picture

@hussainweb no worries it's been a long day! We can hug it out if you are at Barcelona.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed dc95ff1 and pushed to 8.0.x. Thanks!

  • alexpott committed dc95ff1 on 8.0.x
    Issue #2571817 by Cottser, hussainweb: Remove race condition handling in...

Status: Fixed » Closed (fixed)

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