I want to execute an entity query on a config entity type. However when I want to add an IN
condition on a property which is an array I am getting an error.
For example, I want to retrieve all user roles that have the administer nodes
permission:
$query = \Drupal::entityTypeManager()->getStorage('user_role')->getQuery();
$query->condition('permissions', ['administer nodes'], 'IN');
$query->execute();
This gives the following error:
PHP Warning: mb_strtolower() expects parameter 1 to be string, array given in core/lib/Drupal/Core/Config/Entity/Query/Condition.php on line 166