Skip to content

Arrays with defaults should not be nullable #1

@kynx

Description

@kynx

The following property definition:

        componentTypes:
          type: array
          items:
              type: string
          default:
            - resource
            - waste

is converted to:

        private readonly array|null $componentTypes,

It should be:

        private readonly array $componentTypes = ['resource', 'waste'],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions