symfony / symfony/maker-bundle

Suggestion: Add generics types to PhpDoc of entities' ArrayCollection's

Open
#686 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
427
Avg merge
2d 22h
Merged PRs (30d)
20

Description

I'm suggesting to add <int, Foo> to the exsting PhpDoc annotation of @var ArrayCollection, so in total:

/**
 * @var ArrayCollection<int, Foo>
 */
private $foos

See https://stackoverflow.com/q/61418252/1668200

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 where the Maker Bundle generates entity properties and their existing ArrayCollection PhpDoc annotations. Check the related generated output or tests, then confirm that entity collections use the requested key and value generic types consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.