Skip to content

DI compilation fails on class keyword #1722

@shanethehat

Description

@shanethehat

PHP 5.5 introduced the ability to use the class keyword to return the fully qualified class name of a class: http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class

When compiling the DI container, the setup module's PHPScanner tokenises PHP files that it finds, and upon discovering a T_CLASS token it attempts to capture the following class name and create a ReflectionClass object from it. In the case of Foo::class this fails, causing a reflection exception.

The PHPScanner needs to be modified so that it allows for this use of the class keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions