Orm: Backport the fix for "Cannot add having condition on a non result variable." to 2.5

Created on 3 Jul 2018  路  4Comments  路  Source: doctrine/orm

BC Break Report

After upgrading to 2.5.14 I am getting an error: "Cannot add having condition on a non result variable."

| Q | A
|------------ | ------
| BC Break | yes
| Version | 2.5.14

Summary

After upgrading to 2.5.14 I am getting an error when running a query that is checking for a NULL value in a WHERE clause without a HAVING clause: "Cannot add having condition on a non result variable."

Previous behavior

Previously such queries worked without any issues

Current behavior

Running a query that is checking for a NULL value in a WHERE clause without a HAVING clause gives me an error "Cannot add having condition on a non result variable."

How to reproduce

See https://github.com/doctrine/doctrine2/pull/6328, it fixes the same issue in 2.6.

Question Won't Fix

Most helpful comment

@wuestkamp you can obviously fork and maintain it yourself, but the PHP 5 deadline (for security fixes) is in ~2 months, so you should put your efforts into an upgrade plan.

All 4 comments

Sorry, but 2.5 is not maintained anymore.

I understand your frustration, but you should really upgrade to PHP 7.1 or newer ASAP. Anything below PHP 7.1 is no longer actively supported by PHP team and security support ends this year. See https://secure.php.net/supported-versions.php.

To be more specific: 2.5 is maintained only for security fixes.

I'm in the same situation as @githoober and not able to upgrade to PHP7 yet. Is there a workaround? I might be looking into forking and applying patch myself.

@wuestkamp you can obviously fork and maintain it yourself, but the PHP 5 deadline (for security fixes) is in ~2 months, so you should put your efforts into an upgrade plan.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weaverryan picture weaverryan  路  3Comments

kcassam picture kcassam  路  3Comments

strayobject picture strayobject  路  4Comments

doctrinebot picture doctrinebot  路  3Comments

dmaicher picture dmaicher  路  3Comments