diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ef45839..9da15b6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,23 +1,25 @@ -name: "Continuous Integration" +name: Continuous Integration on: push: + branches: + - master + - '*.x' pull_request: schedule: - cron: '0 0 * * *' jobs: - phpunit: - + tests: runs-on: ubuntu-latest strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] stability: [prefer-stable] - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + name: PHP ${{ matrix.php }} - STABILITY ${{ matrix.stability }} steps: - name: Checkout code @@ -27,7 +29,6 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, memcached tools: composer:v2 coverage: none diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index f078347..c07577f 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -1,20 +1,33 @@ name: PHP Linting + on: pull_request: push: branches: - master + - '*.x' + jobs: - phplint: + pint: + name: Pint + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - name: "laravel-pint" - uses: aglipanci/laravel-pint-action@2.0.0 + uses: aglipanci/laravel-pint-action@latest with: preset: laravel verboseMode: true + - uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "fix: pint" - + commit_message: "fix: pint :robot:" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 97dd9ef..4dccad0 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,51 +1,39 @@ -name: "Static Analysis" +name: Static Analysis on: push: - paths: - - .github/workflows/static-analysis.yml - - composer.* - - phpstan.neon.dist - - src/** - - tests/** + branches: + - master + - '*.x' pull_request: - paths: - - .github/workflows/static-analysis.yml - - composer.* - - phpstan.neon.dist - - src/** - - tests/** schedule: - cron: '0 0 * * *' jobs: static-analysis-phpstan: - name: "Static Analysis with PHPStan" - runs-on: ubuntu-latest - strategy: - matrix: - php: [8.2, 8.3] + name: Source Code + runs-on: ubuntu-latest steps: - - name: "Checkout code" - uses: "actions/checkout@v4" + - name: Checkout code + uses: actions/checkout@v4 - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: - coverage: "none" - php-version: "${{ matrix.php-version }}" - tools: "cs2pr" + php-version: 8.2 + tools: composer:v2 + coverage: none - name: Install dependencies - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 with: timeout_minutes: 5 max_attempts: 5 command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - name: Execute type checking - run: vendor/bin/phpstan --configuration="phpstan.neon.dist" + - name: Run Static Analysis + run: vendor/bin/phpstan diff --git a/CHANGELOG.md b/CHANGELOG.md index 025aaf0..8802d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## UNRELEASED +## v12.0.1 - 2025-04-09 + +- fix: class name when using an abstract base #75 + ## v12.0.0 - 2025-02-26 - Laravel 12.x support diff --git a/README.md b/README.md index 1545f78..dfc1762 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,9 @@ exporting using Queue, OpenSpout and Livewire. ## Quick Installation -`composer require yajra/laravel-datatables-export:^12.0` +``` +composer require yajra/laravel-datatables-export:"^12.0" +``` The package also requires batch job: @@ -44,13 +46,11 @@ php artisan queue:batches-table php artisan migrate ``` -#### Service Provider (Optional since Laravel 5.5+) - -`Yajra\DataTables\ExportServiceProvider::class` +### Configuration and Assets (Optional) -#### Configuration and Assets (Optional) - -`$ php artisan vendor:publish --tag=datatables-export --force` +``` +php artisan vendor:publish --tag=datatables-export --force +``` ## Usage diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5ce698c..402eab7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,7 +14,6 @@ parameters: - identifier: argument.type - identifier: method.nonObject - identifier: missingType.iterableValue - - identifier: varTag.nativeType excludePaths: - tests diff --git a/src/WithExportQueue.php b/src/WithExportQueue.php index be46fad..c0ec660 100644 --- a/src/WithExportQueue.php +++ b/src/WithExportQueue.php @@ -36,7 +36,7 @@ public function render(?string $view = null, array $data = [], array $mergeData public function exportQueue(): string { $job = new DataTableExportJob( - [self::class, $this->attributes], + [get_class($this), $this->attributes], request()->all(), Auth::id() ?? 0, $this->sheetName(),