Skip to content

Readonly classes are not supported - results in two false errors #213

@sebastsg

Description

@sebastsg

When creating a readonly class, I end up with these errors:

 34 | ERROR | Inline doc block comments are not allowed; use "// Comment." instead (moodle.Commenting.InlineComment.DocBlock)
 42 | ERROR | Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
    |       | (moodle.Files.MoodleInternal.MoodleInternalGlobalState)

After removing readonly, there are no errors.

The workaround I'm currently using is to add readonly to all class properties instead.

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