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

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

The only changes in 7.2.34-4 are

- Fix #80710 imap_mail_compose() header injection
- use oracle client library version 21.1

Are you using a Oracle database ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

I'm also aware of a regression with pgsql driver, but this one only affects 7.4 and 8.0

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

Hi Remi, we're using pgsql driver against postgresql 9.6. None of the codebase uses IMAP or Oracle at all.

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

Sorry, I don't see any reason why it may raise such an issue...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

Thanks, that's what I thought too. We'll look at updating to PHP 7.3 rather than trying to figure out what happened here.

Re: PHP 7.2.34-4 breaks Symfony/Doctrine

I can confirm everything works under PHP 7.3.28-1.