twigphp / twigphp/Twig

Determine which types to support for `types` tag

Open
#4,256 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
8.4k
Forks
1.3k
Avg merge
1d 13h
Merged PRs (30d)
37

Description

Following discussions in #4165, we want to determine which types (if any), Twig wants to suggest or even mandate extensions support.

There seem to be four options:

  1. Remain completely agnostic
  2. Use PHP's types: string, bool, etc
  3. Use more generic types such as stringable, iterable
  4. Use PHPStan/Psalm types

Contributor guide

No contributing guide indexed for this repository

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 reading the discussions in #4165 and compare the four proposed approaches: no type guidance, PHP types, generic types, or PHPStan/Psalm types. The issue is complete when Twig’s supported or recommended types for the types tag are decided and the resulting extension guidance or behavior is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.