mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-10 06:08:25 +00:00
Fix deprecation notice League/csv for createFromStream and createFromPath replaced by new from() method
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user