From 058c241cd3558990b350d3be3a5fa14b41908709 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 1 Mar 2025 14:14:17 +0800 Subject: [PATCH 1/8] ci: workflows --- .github/workflows/continuous-integration.yml | 15 +++---- .github/workflows/pint.yml | 21 ++++++++-- .github/workflows/static-analysis.yml | 44 +++++++------------- 3 files changed, 41 insertions(+), 39 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ef45839..49f05ab 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 @@ -42,4 +43,4 @@ jobs: command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests - run: vendor/bin/pest + run: vendor/bin/phpunit 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 From 8ccfbebe31543a76d57ede8a18a3f76752789b71 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 1 Mar 2025 14:16:02 +0800 Subject: [PATCH 2/8] ci: pest --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 49f05ab..9da15b6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -43,4 +43,4 @@ jobs: command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests - run: vendor/bin/phpunit + run: vendor/bin/pest From 6d5c6081adb4cab6c23d810e01465a36389343e9 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 15 Mar 2025 09:47:17 +0800 Subject: [PATCH 3/8] fix: static test --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) 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 From 8da559b7ee3c83b023c1a06340690e56940db41e Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 15 Mar 2025 10:15:03 +0800 Subject: [PATCH 4/8] docs: remove provider --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 1545f78..12021a0 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,7 @@ 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` From 14ec8d49cf15da3c74f3f871e55cc631006e35f7 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 15 Mar 2025 10:15:42 +0800 Subject: [PATCH 5/8] docs: config --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12021a0..c2f33f2 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ php artisan migrate ### Configuration and Assets (Optional) -`$ php artisan vendor:publish --tag=datatables-export --force` +``` +php artisan vendor:publish --tag=datatables-export --force +``` ## Usage From 21fef47fa5179240ef1b424ae85a8f21c422591a Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Sat, 15 Mar 2025 10:16:28 +0800 Subject: [PATCH 6/8] docs: install script --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2f33f2..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: From 08af96b4957856fd8562488ac080d15446ed068f Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Wed, 9 Apr 2025 16:02:25 +0800 Subject: [PATCH 7/8] fix: class name when using an abstract base --- src/WithExportQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(), From d947b5b1af9e21f735f7784ad535f2cfb4a5cd82 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Wed, 9 Apr 2025 16:12:39 +0800 Subject: [PATCH 8/8] chore: release v12.0.1 :rocket: --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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