Skip to content

JSON field mapping validation #11072

@norkunas

Description

@norkunas

Bug Report

Q A
BC Break no
Version 2.17

Summary

After #10946 when linting entities started getting:

The field 'App\Entity\Entity#value' has the property type 'mixed' that differs from the metadata field type 'array' returned by the 'json' DBAL type.
The field 'App\Entity\AnotherEntity#value' has the property type 'int' that differs from the metadata field type 'array' returned by the 'json' DBAL type.

JSON is not only array, but also can be a string or a number.

Current behavior

Wrong validation

How to reproduce

Declare json columns with other than array type.

Expected behavior

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions