8000 Release 3.2.0 fails when parsing annotations · Issue #108 · phpDocumentor/ReflectionDocBlock · GitHub
[go: up one dir, main page]

Skip to content

Release 3.2.0 fails when parsing annotations #108

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xabbuh opened this issue Jul 19, 2017 · 3 comments
Closed

Release 3.2.0 fails when parsing annotations #108

xabbuh opened this issue Jul 19, 2017 · 3 comments

Comments

@xabbuh
Copy link
Contributor
xabbuh commented Jul 19, 2017

With the release of 3.2.0 (more specific the changes from #89) parsing a docblock fails if it not contains only phpdoc but also annotations (for example, to configure Doctrine mapping metadata).

For example, in Symfony we have the following test data:

class Dummy extends ParentDummy
{

    /**
     * @var \DateTime[]
     * @Groups({"a", "b"})
     */
    public $collection;

    // ...
}

I am not sure what could be a possible fix here. Silently ignore these lines? But this may be bad user experience as it does not help to find your own mistakes. Maybe ignore only tags that are followed by parentheses?

@mpajunen
Copy link

I can confirm this, we ran into the same issue. Ignoring tags followed by parenthesis as @xabbuh suggested is probably a good enough solution.

@esynaps
Copy link
esynaps commented Jul 28, 2017

See PR #107

@frenchcomp
Copy link

I confirm the same issue, since the commit 248e5 ( 248e5f6 )
The regex works with the old pattern (/^@([\w-_\]+)(?:\s*([^\s].)|$)?/us) but not with the new pattern /^@([\w-_\]+)(?:\s+([^\s].)|$)/us

fabpot added a commit to symfony/symfony that referenced this issue Aug 5, 2017
…=3.2.1 (xabbuh)

This PR was merged into the 3.3 branch.

Discussion
----------

[PropertyInfo] allow phpdocumentor/reflection-docblock >=3.2.1

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | phpDocumentor/ReflectionDocBlock#108
| License       | MIT
| Doc PR        |

Commits
-------

2f3ac8f allow phpdocumentor/reflection-docblock >=3.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0