Skip to content

make:entity to generate non-nullable fields #1679

Open
@valx76

Description

@valx76

Hey there!

Thinking about the issue #1175.

How about an option in the make:entity command to define the nullable behavior in PHP ?
Some examples:

  • Everything (mostly) nullable like the current behavior
  • Set the types in PHP as they are specified by the user (and warns that accessing an unassigned non-nullable value will result in errors)
  • Same as above but also defines a default value when not nullable (0, empty string, etc.) to avoid unassigned errors

What do you guys think?

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