Skip to content

Commit

Permalink
Deprecate artfulrobot/artfulrobot dependency; add artfulrobot/csv
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Lott / Artful Robot committed Jul 14, 2021
1 parent d811eac commit 78b87c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Binary file modified bin/csv2mysql
Binary file not shown.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"require": {
"symfony/console": "^4.4 || ^5.1 || ^6.0",
"artfulrobot/artfulrobot": "^1.4.4"
"artfulrobot/csv": "^1.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
19 changes: 10 additions & 9 deletions src/Command/ConvertCommand.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/* +--------------------------------------------------------------------+
| Copyright Rich Lott 2021. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see LICENSE |
+--------------------------------------------------------------------+
/*
+--------------------------------------------------------------------+
| Copyright Rich Lott 2021. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see LICENSE |
+--------------------------------------------------------------------+
*/
namespace App\Command;

use ArtfulRobot\CsvParser;
use ArtfulRobot\CSVParser;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -45,7 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
return 1;
}
try {
$parser = CsvParser::createFromFile($csvFilename, $input->getOption('csv-read-buffer') * 1024);
$parser = CSVParser::createFromFile($csvFilename, $input->getOption('csv-read-buffer') * 1024);
}
catch (\Exception $e) {
$output->writeln("<error>-- Error: input '$csvFilename': " . $e->getMessage() . "</error>");
Expand Down

0 comments on commit 78b87c9

Please sign in to comment.