Skip to content

FQSEN constructor does not accept all valid PHP Class Names #7

Description

@nicmart

FQSEN constructor accepts only alphanumeric characters, but a lot more are allowed in PHP.
This makes parsing in ReflectionDocBlock fail with valid php class names.

From PHP Documentation:

A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$.

For example Option«T» is a valid Interface Name, but is not a valid FQSEN name.

In a library I am working on I need to handle this special chars, and to do so I committed a small patch to the regexp in a fork: nicmart@9f3d9ea

If you agree that this is an issue that has to be fixed, I can open a pull request with the fix.

Thanks!

Activity

  1. nicmart commented on Oct 4, 2016

    @nicmart
    Author

    Any update on this? Is the repo still maintained?

  2. jaapio commented on Apr 24, 2017

    @jaapio
    Member

    Hi @nicmart,

    Think you are right about this. I would be happy to accept your PR on this.

  3. added a commit that references this issue on Apr 30, 2017
    35c6594
  4. self-assigned this
    on Apr 30, 2017
  5. jaapio commented on Apr 30, 2017

    @jaapio
    Member

    Hi @nicmart,

    I found some time to fix this. It would be very nice if you could do a review.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions