phpDocumentor / phpDocumentor/phpDocumentor

Feature enhancement: Provide Twig filter extension to support object/node dumping

Open
#1,514 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.3k
Forks
648
Avg merge
28m
Merged PRs (30d)
13

Description

I've tried to make some changes to the clean template, but struggle to find any documentation on what fields are available. Therefore could a filter be added (say get_items) which would work in the following scenario:

  {% for key,value in object | get_items %}
          <p> {{key}}  : {{object}} </p>
  {% endfor %}

The advantage of this approach is it would provide a mechanism for template developers/tweekers to understand the 'art of the possible' avoiding the need to document every object.

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 clean template and the existing Twig filter extension points. Confirm how template objects and nodes are exposed, then define the filter's expected iteration output and add coverage for the example in the issue; done means template developers can inspect available fields without manually documenting every object.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.