The way Symfony handles this has changed, now the counter-intuitive "extensions" property actually ALSO sends MIME-check through PHP native functions (see the current code for 7.3). So your code tells it to check much more than the extension. And, as the auto-detection can be unreliable, depending on the editor used for the file, you cannot trust it all the time.
But, as the documentation states, you can explicit your MIME type for a given extension, overriding the default configured ones from PHP's ext-mime built-in extension.
Try this (with a form), or adapt your code if you're using Attributes or Annotations (SF 7.3 valid):
'constraints' => [
new File(
maxSize: '8192k',
extensions: [
'csv' => [
'text/csv',
'application/csv',
'text/x-comma-separated-values',
'text/x-csv',
'text/plain',
]
],
extensionsMessage: 'mtg_result.import.file.error',
),
],
And don't forget you can help your users filter browser selection using the proper HTML code as well on the frontend:
{{ form_row(form.csv_file, {'attr': {'accept': '.csv,text/csv,application/csv,text/x-comma-separated-values,text/x-csv,text/plain'}}) }}