Skip to content

Commit

Permalink
remove deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
wychoong committed Jan 2, 2025
1 parent e4a7ecf commit a382216
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"filament/support": "*",
"larastan/larastan": "^2.2",
"laravel/pint": "^1.0",
"league/csv": "^9.14",
"league/csv": "^9.16",
"league/flysystem-aws-s3-v3": "^3.0",
"nunomaduro/termwind": "^1.0|^2.0",
"openspout/openspout": "^4.23",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"illuminate/contracts": "^10.45|^11.0",
"illuminate/database": "^10.45|^11.0",
"illuminate/support": "^10.45|^11.0",
"league/csv": "^9.14",
"league/csv": "^9.16",
"openspout/openspout": "^4.23",
"spatie/laravel-package-tools": "^1.9"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/actions/src/Exports/Jobs/PrepareCsvExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use League\Csv\ByteSequence;
use League\Csv\Bom;
use League\Csv\Writer;
use SplTempFileObject;

Expand Down Expand Up @@ -53,7 +53,7 @@ public function __construct(
public function handle(): void
{
$csv = Writer::createFromFileObject(new SplTempFileObject);
$csv->setOutputBOM(ByteSequence::BOM_UTF8);
$csv->setOutputBOM(Bom::Utf8);
$csv->setDelimiter($this->exporter::getCsvDelimiter());
$csv->insertOne(array_values($this->columnMap));

Expand Down
4 changes: 2 additions & 2 deletions packages/actions/src/ImportAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use Illuminate\Support\Str;
use Illuminate\Validation\Rules\File;
use Illuminate\Validation\ValidationException;
use League\Csv\ByteSequence;
use League\Csv\Bom;
use League\Csv\CharsetConverter;
use League\Csv\Info;
use League\Csv\Reader as CsvReader;
Expand Down Expand Up @@ -374,7 +374,7 @@ protected function setUp(): void
$csv->insertAll($exampleRows);

return response()->streamDownload(function () use ($csv) {
$csv->setOutputBOM(ByteSequence::BOM_UTF8);
$csv->setOutputBOM(Bom::Utf8);

echo $csv->toString();
}, __('filament-actions::import.example_csv.file_name', ['importer' => (string) str($this->getImporter())->classBasename()->kebab()]), [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Filament\Actions\Imports\Models\Import;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use League\Csv\ByteSequence;
use League\Csv\Bom;
use League\Csv\Writer;
use SplTempFileObject;
use Symfony\Component\HttpFoundation\StreamedResponse;
Expand Down Expand Up @@ -36,7 +36,7 @@ public function __invoke(Request $request, Import $import): StreamedResponse
}

$csv = Writer::createFromFileObject(new SplTempFileObject);
$csv->setOutputBOM(ByteSequence::BOM_UTF8);
$csv->setOutputBOM(Bom::Utf8);

$firstFailedRow = $import->failedRows()->first();

Expand Down

0 comments on commit a382216

Please sign in to comment.