Skip to content

Default PropertyDefinition Type field to UNDEFINED #1

@jwillp

Description

@jwillp

Because of this line, we get an exception thrown, when someone does not specify a type on a property:

->scalarNode(SchemaKey::TYPE)->defaultValue(null)->end()

Since it defaults to null, if someone forgets to put a type in their definition,
instead of being handled later as mixed (as it should be) it throws an exception at :

$propertyDefinition->setType(VariableType::fromString($data[SchemaKey::TYPE]));

I suspect, the fix would be to change the defaultValue null to VariableType::UNDEFINED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions