Deprecated array_key_exists() and Using array_key_exists() happened and other alerts because of incompatible php version like 7.2 upgrade to 7.4

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists()

Mulitple solutions:

1/. Downgrade your PHP to 7.2

2/. Change the following statement

EntityMapper.php  line 98 

if (array_key_exists($key, $entity_defs['fields']) || array_key_exists($key, $entity)) {

To

 if (isset($entity_defs['fields'][$key]) || isset($entity->{$key})) {

EntityMapper.php  line 85 

if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) {

To

 if ($key != $entity_defs['primary'] && isset($entity->{$key})) {

classes/module/Module.php line 320

 if (array_key_exists($key, $this)) {

To

if (isset($this->{$key})) {


/vendor/twig/twig/src/Template.php line 576

   if (isset($object->$item) || \array_key_exists((string) $item, $object)) {

change to 

if (isset($object->$item) ) {

 

Another Deprecation Error

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

   $this->originalEntityData[$oid][$field] = $data[$field];

                        continue ;

    Change to 

   $this->originalEntityData[$oid][$field] = $data[$field];

                        continue 2;

/twig/twig/src/Node/Node.php line 46, 202, or replace the content with latest Nope.php verion by copy and paste.

            @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this)), E_USER_DEPRECATED);             

change to 

@trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class), E_USER_DEPRECATED);

custom-select not working prestashop

/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/form_div_layout.html.twig

It should be the incompatible php version like 7.2 upgrade to 7.4 and your Prestashop version is not compatible with it. Here are the temporary solution to fix.

removed the dash (-) in this file form_div_layout.html.twig  {%- block widget_attributes -%} and {%- endblock widget_attributes -%} change to without dash (-) {% block widget_attributes %} and {% endblock widget_attributes %}. After than delete the cache file in var/cache/* or clear the cache in performance tab in the backoffice.