diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 08c6fc8..210aa80 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -7,8 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: mbstring, zip, gd, dom, xml, fileinfo, bcmath + coverage: none - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs + run: composer install --prefer-dist --no-progress - name: PHPStan - uses: chindit/actions-phpstan@master + run: vendor/bin/phpstan analyse --no-progress --memory-limit=1G diff --git a/README.md b/README.md index 5a25d82..f63f1cf 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ composer require thomascombe/backpack-async-export | 2.x | ^8.1 | ^9.0 - ^10.0 | ~5.5 - ~6.0 | | 3.x | ^8.1 | ^10.0 | ~6.0 | | 4.x | ^8.2 | ^11.0 | ~6.0 | +| 5.x | ^8.2 | ^12.0 - ^13.0 | ^7.0 | You can publish and run the migrations with: diff --git a/composer.json b/composer.json index ccc5a05..c66edad 100644 --- a/composer.json +++ b/composer.json @@ -19,20 +19,20 @@ ], "require": { "php": "^8.2", - "backpack/crud": "~6.0", - "illuminate/contracts": "^12.0", - "maatwebsite/excel": "^3.1", + "backpack/crud": "^7.0", + "illuminate/contracts": "^12.0|^13.0", + "maatwebsite/excel": "^3.1|^4.0", "spatie/laravel-package-tools": "^1.12" }, "require-dev": { "laravel/scout": "^10.10", "nunomaduro/collision": "^8.1", "nunomaduro/larastan": "^3.0", - "orchestra/testbench": "^9.0", + "orchestra/testbench": "^10.0|^11.0", "phpstan/phpstan": "^2.0", - "phpunit/phpunit": "^10.1", + "phpunit/phpunit": "^10.1|^11.0", "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "^5.0" + "vimeo/psalm": "^6.0" }, "autoload": { "psr-4": { diff --git a/src/Jobs/Export/SimpleCsv.php b/src/Jobs/Export/SimpleCsv.php index 4bfa774..e0195cc 100644 --- a/src/Jobs/Export/SimpleCsv.php +++ b/src/Jobs/Export/SimpleCsv.php @@ -47,7 +47,7 @@ public function handle(): void $this->openFile(); $this->addUtf8Header(); - fputcsv($this->handle, $this->export->headings()); + fputcsv($this->handle, $this->export->headings(), escape: "\\"); $this->export->query()->chunk( $this->export->getChunkSize(), @@ -56,7 +56,8 @@ function (Collection $collection): void { function (Eloquent $model): void { fputcsv( $this->handle, - $this->export->map($model) + $this->export->map($model), + escape: "\\", ); } ); diff --git a/src/Jobs/ExportJob.php b/src/Jobs/ExportJob.php index be95840..6bcdf7b 100644 --- a/src/Jobs/ExportJob.php +++ b/src/Jobs/ExportJob.php @@ -66,7 +66,7 @@ public function handle(): self $result = Excel::store( $instance, $this->export->{ImportExport::COLUMN_FILENAME}, - config('backpack-async-import-export.disk') + $this->export->{ImportExport::COLUMN_DISK} ?: config('backpack-async-import-export.disk'), ); /** @phpstan-ignore-next-line */