Support PHP 8.2 league/csv
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3406342. -->
Reported by: [pookmish](https://www.drupal.org/user/3059577)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When using PHP 8.2 and the latest version of league/csv, an error is thrown due to the array structure of the header.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Enable php 8.2<br>
create a simple csv with a header row and a single record<br>
Attempt to import<br>
Observe the error in the database logs like:<br>
<code>League\Csv\SyntaxError: The header mapper indexes should only contain positive integer or 0. in League\Csv\Reader->computeHeader() (line 448 of vendor/league/csv/src/Reader.php).</code></p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Check for the header first</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue