Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

arrays not resolved in documentation #1130

Closed
BigMichi1 opened this Issue Feb 25, 2014 · 3 comments

Comments

Projects
None yet
2 participants

when i have a

/**
* @var Node[] nodes
*/
private $notes;

the generated documentation doesn't resolve this to the documentation page of Node

but this works like expected

/**
* @var Node nodes
*/
private $notes;

@mvriel mvriel added the Bug label Mar 2, 2014

@mvriel mvriel added this to the 2.4 milestone Mar 2, 2014

Owner

mvriel commented Mar 2, 2014

This is incorrect behaviour, even with the array indicators it should link to the correct page. This should be researched and fixed

Owner

mvriel commented Mar 2, 2014

Research has been completed and unfortunately this is not a simple bug to fix.

Apparently an oversight occurred during development for the type system where composite types, such as arrays and collection objects, were not included. This means that whenever a type reference is possible that those composites are not recognized.

The good news is that we can take this opportunity to make the code forward compatible for the description of collection objects using a generic-like syntax.

In order to fix this the following changes should be done:

  • Behat scenarios should be added to test this issue.
  • A new Descriptor should be added for these Collections where we can define one or more types for keys and one or more types for each entry of said Collection, and where we can define a base type for that collection itself (which is 'array' in case of arrays).
  • The Linker should be altered to iterate through the base type, keys and subtypes and replace their string representations with the real elements to which they refer
  • The Twig Extension's route method's contents should be extracted to a View helper
  • Support for the collection notation should be added to the route business logic so that the correct HTML output can be generated.

@mvriel mvriel modified the milestones: 2.5, 2.4 Mar 30, 2014

@mvriel mvriel self-assigned this Mar 31, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 5, 2014

#1130: Add feature to test type resolution
In issue #1130 it was indicated that arrays were not correctly resolved.
During research it was concluded that this is a design flaw and by
adding these tests we can verify whether the fixes in the upcoming
commits resolve this issue.

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 5, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 5, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 5, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 7, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 7, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 7, 2014

@mvriel mvriel referenced this issue Apr 7, 2014

Merged

#1130: Add support for Type Collections #1214

6 of 8 tasks complete

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue Apr 8, 2014

@mvriel mvriel modified the milestones: 2.6, 2.5 May 17, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 22, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 22, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 22, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

mvriel added a commit to mvriel/phpDocumentor2 that referenced this issue May 29, 2014

Owner

mvriel commented May 30, 2014

PR #1214 resolves this issue; it will be included with next release

@mvriel mvriel closed this May 30, 2014

ashnazg added a commit that referenced this issue May 30, 2014

Merge pull request #1214 from mvriel/feature/1130
#1130: Add support for Type Collections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment