Floats in $orgValue are strings in UnitOfWork::computeChangeSet #5481

Open
opened 2026-01-22 15:08:51 +01:00 by admin · 0 comments
Owner

Originally created by @curiosity26 on GitHub (Mar 27, 2017).

Originally assigned to: @lcobucci on GitHub.

The $actualValue held in the entity is a valid float/double but the value held in the $orgValue is a string.

image

Causes this assertion to fail in UnitOfWork on line 668:

                // skip if value haven't changed
                if ($orgValue === $actualValue) {
                    continue;
                }

Here's the field referenced in the entity:

/**
     * @var float
     * @ORM\Column(type="decimal", scale=2, precision=16, options={"default"=0})
     * @JMS\Type("double")
     * @JMS\Expose()
     */
    protected $totalDisposableIncome = 0.00;

The Database is PostgreSQL 9.6.

Originally created by @curiosity26 on GitHub (Mar 27, 2017). Originally assigned to: @lcobucci on GitHub. The `$actualValue` held in the entity is a valid float/double but the value held in the `$orgValue` is a string. ![image](https://cloud.githubusercontent.com/assets/4050934/24373203/99222dd6-12fe-11e7-9a8e-8eeaf8ac8d0f.png) Causes this assertion to fail in UnitOfWork on line 668: ```PHP // skip if value haven't changed if ($orgValue === $actualValue) { continue; } ``` Here's the field referenced in the entity: ```PHP /** * @var float * @ORM\Column(type="decimal", scale=2, precision=16, options={"default"=0}) * @JMS\Type("double") * @JMS\Expose() */ protected $totalDisposableIncome = 0.00; ``` The Database is PostgreSQL 9.6.
admin added the Invalid label 2026-01-22 15:08:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5481