How do I change the default '- Any -' option in views exposed filter? I have exposed filters in a view as select lists. How can I change the text for the default filter option of "- Any -"? In previous versions it was suggested to use a preprocess function like this:

if($form['#id'] == 'views-exposed-form') {
      foreach ($form['FIELDNAME']['#options'] as $key =&gt; &amp;$option) {
        if ($key === 'All') {
          $option = 'All';
        }
      }
    }


But in Drupal 8, instead of a modifiable key/value, it is stuck inside a protected class.

protected string -&gt; string(7) "- Any -"


How can I modify this?

Note: I also tried Better Exposed Filters, but it is unable to rewrite the "- Any -" option.
Better Exposed Filters works for me well in my Drupal 8. The only thing what you have to do is follow this path.

Better Exposed Filters > Settings > More Options > Rewrite results.

Then you have to replace the any text using this format in Drupal 8. I think what you missed is this one. Replace using this token

- Any -|your replacement