Seems like it has been fixed for 1.x, but not for 2.x
It has been fixed for both. Do you have any issue in 2.x?
Yes, I'm getting deprecation warning on latest PHP 7.4 beta and Twig 2.11.3:
An exception has been thrown during the rendering of a template ("array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead")
I believe it is coming from here and here
Well, it was fixed actually, but not released, so in v2.11.3 it is still there.
There is no new 2.x release since then https://github.com/twigphp/Twig/commit/03dbdb9683a74379491d237504c1021ff3864b5b
So, it will be part of the next release.
We're eagerly waiting for the next Twig 2.x release. It's the only remaining incompatibility for our test suite to pass on PHP 7.4 in API Platform. :laughing:
Here too!
This is already fixed, please upgrade.
sorry and thank you very much!
problem is rcrowe/twigbridge for laravel has not updated minimum version.
tengo este problema, me podrian ayudar. En desuso: array_key_exists (): el uso de array_key_exists () en objetos est谩 en desuso. Use isset () o property_exists () en su lugar en C: \ xampp \ xamppp \ htdocs \ miotratienda \ src \ Adapter \ EntityMapper.php en la l铆nea 90
este es el codigo de la linea 90.
if (array_key_exists($key, $entity)) {
$entity->{$key} = $value;
} else {
unset($object_datas[$key]);
}
}
if ($should_cache_objects) {
Cache::store($cache_id, $object_datas);
}
}
} else {
$object_datas = Cache::retrieve($cache_id);
if ($object_datas) {
$entity->id = (int)$id;
foreach ($object_datas as $key => $value) {
$entity->{$key} = $value;