Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

arrays not resolved in documentation #1130

Closed
BigMichi1 opened this Issue · 3 comments

2 participants

@BigMichi1

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
@mvriel mvriel added this to the 2.4 milestone
@mvriel
Owner

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

@mvriel
Owner

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 milestone: 2.5, 2.4
@mvriel mvriel self-assigned this
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #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.
61471c8
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Create type collection fc4d786
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Create documentation for the AST creation ad31334
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Continuing refactoring of types to value objects 5aa4e40
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Assemble Types 9b5e85c
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Properly render CollectionDescriptors 5a9ae1c
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Fix erroneous Types 1490543
@mvriel mvriel referenced this issue
Merged

#1130: Add support for Type Collections #1214

6 of 8 tasks complete
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Fixing broken tests 26eacfd
@mvriel mvriel modified the milestone: 2.6, 2.5
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add tests for tag assemblers e739fe0
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add tests for type descriptors 9a9caa5
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add tests for type collection 6617094
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Fix coding standards violations d0e774d
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Reduce complexity of TypeCollectionAssembler bbd491f
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Fix conflict between class names 56ae824
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add missing property fbed8ea
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Convert types to Value Objects 94d2e4c
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Commit test and refactoring for ArgumentAssembler 42e2362
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: (re)written FunctionAssembler tests 03c1fde
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add test for MethodAssembler 9362b0a
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add tests for Magic MethodDescriptor 6903314
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Add tests for VarAssembler 3661eb6
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Fix erroneous @covers 822895e
@mvriel mvriel referenced this issue from a commit in mvriel/phpDocumentor2
@mvriel mvriel #1130: Interfaces conflict in PHP 5.3.3 80ebe62
@mvriel
Owner

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

@mvriel mvriel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.