Topic: PHP 7.2.34-4 breaks Symfony/Doctrine
Hi everyone,
I'm having a problem with Symfony/Doctrine after upgrading my CentOS 7 install to 7.2.34-4, I'm rather lost on how to troubleshoot this so any help would be appreciated.
The point where the problem occurs is here: https://github.com/symfony/symfony/blob … er.php#L40
# On PHP 7.2.34-3, works as expected:
$ids = $classMetadata->getIdentifierFieldNames();
$idType = $classMetadata->getTypeOfField(current($ids));
# $ids === [ 0 => "id" ]
# $idType === "id"
# On PHP 7.2.34-4, the array's internal pointer appears to be set wrong, so next() fails
$ids = $classMetadata->getIdentifierFieldNames();
$idType = $classMetadata->getTypeOfField(current($ids));
# $ids === [ 0 => "id" ]
# $idType === false
The only difference is whether I'm running 7.2.34-3 or 7.2.34-4, using yum-downgrade and yum-update to switch between them makes the problem appear/disappear.
Unfortunately, the bowels of Symfony/Doctrine run pretty deep and I haven't been able to find the piece of code actually generating the array assigned to $ids. But I'm rather confused about how going from 7.2.34-3 to 7.2.34-4 could cause this - were there any other changes to PHP included in this latest update?
Versions:
CentOS 7 (latest updates)
PHP 7.2.34-4
Symfony 3.4.45
Doctrine/ORM 2.7.4