Problem/Motivation

core/lib/Drupal/Core/Render/theme.api.php contains this doc comment

* For further Twig documentation see
* https://twig.symfony.com/doc/1.x/templates.html

Twig is now on 3.x, which makes this link outdated.

Steps to reproduce

Open core/lib/Drupal/Core/Render/theme.api.php.

It contains the link to twig 1.x docs.

Proposed resolution

The url https://twig.symfony.com/doc/ shows the most up to date twig documentation. This link should be used instead to ensure this isn't an issue in the future.

Remaining tasks

Update the doc comment to:

* For further Twig documentation see
* https://twig.symfony.com/doc/

Search the codebase for other links to general twig 1.x or 2.x documentation. There should be no other ones.

Release notes snippet

Issue fork drupal-3554618

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mdranove created an issue. See original summary.

mdranove’s picture

Issue summary: View changes

mdranove’s picture

Issue summary: View changes
Status: Active » Needs review
dcam’s picture

Status: Needs review » Needs work

Thank you for your suggestion to improve Drupal! I've reviewed the change, but I have a concern about it. The new URL's destination is not equivalent to that of the old URL. The old URL specifically went to the documentation sub-page about templates. Whereas the new URL goes to the top-level documentation page.

Also, when I grepped core for "twig.symfony.com" I found a bunch of other Twig 3.x documentation links. A few years ago most other links were updated to their 3.x equivalents. So there's a precedent to consider. My suggestion is to do the same here.

quietone’s picture

Issue tags: +Needs title update

The title suggests the links are going to direct to Twig 1.x instead of 3.x. So, tagging for a title update.

mdranove’s picture

Title: Update doc link to twig 1.x » Update twig 1.x template doc link to point to 3.x
Status: Needs work » Needs review

Updated the title of the issue and directed link to 3.x.

dcam’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs title update

Looks good to me.

ankitv18’s picture

Title: Update twig 1.x template doc link to point to 3.x » Update doc link to twig 3.x
Status: Reviewed & tested by the community » Needs work

Updated the title, hence removing the tag

dcam’s picture

Status: Needs work » Reviewed & tested by the community

Not sure what that was about, but I'm restoring the RTBC status.

  • quietone committed 2eea4ca1 on 11.x
    Issue #3554618 by mdranove, dcam, ankitv18: Update doc link to twig 3.x
    

  • quietone committed 58994a39 on 11.3.x
    Issue #3554618 by mdranove, dcam, ankitv18: Update doc link to twig 3.x
    
quietone’s picture

Version: 11.x-dev » 11.3.x-dev
Assigned: mdranove » Unassigned
Status: Reviewed & tested by the community » Fixed

Did anyone search for other instances?

I applied the diff and checked that myself and did not find any other instances to change.

Committed to 11.x and cherry-picked to 11.3.x

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

dcam’s picture

Did anyone search for other instances?

Yeah, as part of #5.

Status: Fixed » Closed (fixed)

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