Skip to content

Formatter Issue: Yield From #248

@jimbo2150

Description

@jimbo2150

Formatting a php document causes an issue with yield from statements. yield works fine but when yield from is used, the space after "from" is removed causing syntax errors:

class MyClass {
    function generator() {
        yield from AnotherClass::action();
    }
}

Becomes

class MyClass {
    function generator() {
        yield fromAnotherClass::action();
    }
}

PHP now looks for fromAnotherClass as a class name which doesn't exist.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions