Fix deprecation notice League/csv for createFromStream and createFromPath replaced by new from() method

This commit is contained in:
2025-10-27 13:21:04 +01:00
parent 01889ac671
commit f42bb498e4
15 changed files with 18 additions and 18 deletions

View File

@@ -334,7 +334,7 @@ class ChillImportUsersCommand extends Command
protected function loadUsers()
{
$reader = Reader::createFromPath($this->tempInput->getArgument('csvfile'));
$reader = Reader::from($this->tempInput->getArgument('csvfile'));
$reader->setHeaderOffset(0);
foreach ($reader->getRecords() as $line => $r) {
@@ -362,7 +362,7 @@ class ChillImportUsersCommand extends Command
protected function prepareGroupingCenters()
{
$reader = Reader::createFromPath($this->tempInput->getOption('grouping-centers'));
$reader = Reader::from($this->tempInput->getOption('grouping-centers'));
$reader->setHeaderOffset(0);
foreach ($reader->getRecords() as $r) {
@@ -378,7 +378,7 @@ class ChillImportUsersCommand extends Command
protected function prepareWriter()
{
$this->output = $output = Writer::createFromPath($this->tempInput
$this->output = $output = Writer::from($this->tempInput
->getOption('csv-dump'), 'a+');
$output->insertOne([