<p dir="auto"><strong>Symfony version(s) affected</strong>: 3.x, 4.x</p>
<p dir="auto"><strong>Description</strong><br>
Due to update in php-intl library this loop is infinite.<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/symfony/symfony/blob/95932df2ac5edd98db521bb6507d22edcdc602c6/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php#L81">symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 81
      in
      <a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/95932df2ac5edd98db521bb6507d22edcdc602c6">95932df</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L81" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="81"></td>
          <td id="LC81" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">while</span> (<span class="pl-c1">null</span> !== <span class="pl-s1"><span class="pl-c1">$</span>currentLocale</span>) { </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"><strong>How to reproduce</strong><br>
Update php-intl to the latest version and try to get country names for en locale for example.</p>
<p dir="auto"><strong>Possible Solution</strong><br>
For BC it would be great to loop until locale is empty so check could be !empty($currentlocale)</p>
<p dir="auto"><strong>Additional context</strong><br>
Ive been struggling with this all morning, later I had to code on my laptop and this error was not present, Ive updated php-intl and error became present as on my work PC.</p>
<p dir="auto">PHP 7.2.17-1+ubuntu18.04.1+deb.sury.org+3<br>
SYMFONY: Symfony 4.2.4</p>
<p dir="auto">locale_parse('root') now return an empty array as opposed to previos php versions which makes the Symfony\Component\Intl\Data\Bundle\Reader loop through fallback locales as</p>
<p dir="auto">"en" =&gt; "root" =&gt; "" =&gt; "root" =&gt; "" and so on without it becoming null to break the loop</p>
<p dir="auto">when reading from the regions because in the Symfony\Component\Intl\Locale::getFallback()<br>
we never get inside the if (1 === \count($localeSubTags))</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1647204/56029378-e8f2ac80-5d22-11e9-9b2f-6a88e0d6e934.png"><img src="https://user-images.githubusercontent.com/1647204/56029378-e8f2ac80-5d22-11e9-9b2f-6a88e0d6e934.png" alt="testedLocales" style="max-width: 100%;"></a></p>