update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+8 -1
View File
@@ -22,6 +22,9 @@ class CsvFileLoader extends FileLoader
{
private string $delimiter = ';';
private string $enclosure = '"';
/**
* @deprecated since Symfony 7.2, to be removed in 8.0
*/
private string $escape = '';
protected function loadResource(string $resource): array
@@ -31,7 +34,7 @@ class CsvFileLoader extends FileLoader
try {
$file = new \SplFileObject($resource, 'rb');
} catch (\RuntimeException $e) {
throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e);
throw new NotFoundResourceException(\sprintf('Error opening file "%s".', $resource), 0, $e);
}
$file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY);
@@ -57,6 +60,10 @@ class CsvFileLoader extends FileLoader
{
$this->delimiter = $delimiter;
$this->enclosure = $enclosure;
if ('' !== $escape) {
trigger_deprecation('symfony/translation', '7.2', 'The "escape" parameter of the "%s" method is deprecated. It will be removed in 8.0.', __METHOD__);
}
$this->escape = $escape;
}
}