Skip to content

File comment is lost when using PhpFile::fromCode #100

Description

@red-led

Version: 3.6.5

Bug Description

When unsing PhpFile::fromCode file comment is lost

Steps To Reproduce

<?php

$code = <<<TEST
<?php

/**
 * This is file comment. Is will be lost
 */

namespace Test;

/**
 * This is class comment. Is will be preserved
 */
class A {
}
TEST;

$file = Nette\PhpGenerator\PhpFile::fromCode($code);

echo $file;

Expected Behavior

First comment is expected to be in output.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions