Skip to content

[ClassLoader] ClassCollectionLoader cache file not compatible with declare directives #19845

Closed
@alekitto

Description

@alekitto

Adding a file containing a declare directive to the classes cache, the directive is printed as-is, making the directive valid for all classes declared after that.
Also when using declare(strict_types=1) in PHP 7, the generated classes.php throws a FatalErrorException when loaded as the "strict_types declaration must be the very first statement in the script".

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