Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

False-positive of smallint type #672

Open
@SerafimArts

Description

The following code:

 /**
 * @var int<-32768, 32767>
 */
 #[ORM\Column(name: 'sorting_order', type: 'smallint', options: ['default' => 0])]
 public int $order = 0;

Reports:

Property Entity::$order type mapping mismatch: database can contain int but property expects int<-32768, 32767>.
 πŸͺͺ doctrine.columnType

But expected:

OK

MySQL: https://dev.mysql.com/doc/refman/8.4/en/integer-types.html

smallint is int<-32768, 32767>

PostgreSQL: https://www.postgresql.org/docs/current/datatype-numeric.html

smallint is int<-32768, 32767>

Doctrine: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.2/reference/types.html#smallint

smallint is int<-32768, 32767>

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

        AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /