You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctrine\Common\DataFixtures\ReferenceRepository::setReferenceIdentity(): A
rgument #1 ($name) must be of type string, int given, called in /srv/vendor
/doctrine/data-fixtures/src/Event/Listener/ORMReferenceListener.php on line
52
With 1.7.0
$this->setReference('a12345', $anyEntity); // works$this->setReference('12345', $anyEntity); // works too
The text was updated successfully, but these errors were encountered:
mssimi
changed the title
Using numerics any reference name causes error with PHP 8.4.1
Using numerics any reference name causes error with v1.8.1
Dec 13, 2024
This fails because now the method ReferenceRepository::setReferenceIdentity(string $name, mixed $identity, string $class): void typed the parameter $name with string type, and numeric reference names is casted to integers when are recovered from ReferenceRepository::getReferenceNames($object) method in previous lines, so when pass the value of numeric name in integer with a parameter typed with string then fails.
So I propose a fix to cast names to string in ReferenceRepository::getReferenceNames($object) when are returned
Bug Report
Summary
After upgrade from 1.7.0 to 1.8.1 reference name that is numeric does not work, even when it is typed string.
Current behavior
Using numeric reference name causes error with 1.8.1, but not with 1.7.0
Expected behavior
Using numeric reference name working for both 1.7.0 and 1.8.1
How to reproduce
With 1.8.1
With 1.7.0
The text was updated successfully, but these errors were encountered: