craftcms / craftcms/docs

Collections in Twig

Open
#483 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
42
Forks
160
Avg merge
3h 9m
Merged PRs (30d)
4

Description

We should explicitly state that Collections in Twig behave exactly the same as collections in PHP, except for methods that only accept anonymous functions/closures as arguments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing documentation for collections in Twig and read the linked Twig issue for the behavioral details. Update the relevant documentation to state that Twig collections match PHP collections, including the exception for methods that accept only anonymous functions or closures; done means the comparison and exception are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.