Skip to content

Commit

Permalink
fix deprecate notice
Browse files Browse the repository at this point in the history
  • Loading branch information
wychoong committed Jan 2, 2025
1 parent 2bbfeeb commit dce6762
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 @@ -13,7 +13,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/Concerns/CanImportRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 @@ -343,7 +343,7 @@ protected function setUp(): void
$columns = $this->getImporter()::getColumns();

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

if (filled($csvDelimiter = $this->getCsvDelimiter())) {
$csv->setDelimiter($csvDelimiter);
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Filament\Actions\Imports\Models\FailedImportRow;
use Filament\Actions\Imports\Models\Import;
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 All @@ -23,7 +23,7 @@ public function __invoke(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 dce6762

Please sign in to comment.