Skip to content

Commit 472ab66

Browse files
authored
Merge pull request #56 from yajra/L11
feat: Laravel 11
2 parents 18a1a22 + a1571e2 commit 472ab66

17 files changed

+300
-220
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [8.1, 8.2]
17+
php: [8.2, 8.3]
1818
stability: [prefer-stable]
1919

2020
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
timeout_minutes: 5
4141
max_attempts: 5
42-
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
42+
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
4343

4444
- name: Execute tests
45-
run: vendor/bin/phpunit
45+
run: vendor/bin/pest

.github/workflows/pint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PHP Linting
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
phplint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: "laravel-pint"
13+
uses: aglipanci/[email protected]
14+
with:
15+
preset: laravel
16+
verboseMode: true
17+
- uses: stefanzweifel/git-auto-commit-action@v5
18+
with:
19+
commit_message: "fix: pint"
20+

.github/workflows/static-analysis.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,30 @@ on:
2222

2323
jobs:
2424
static-analysis-phpstan:
25-
2625
name: "Static Analysis with PHPStan"
2726
runs-on: ubuntu-latest
2827

2928
strategy:
30-
fail-fast: true
3129
matrix:
32-
php: [8.1]
33-
stability: [prefer-stable]
30+
php: [8.2, 8.3]
3431

3532
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v2
33+
- name: "Checkout code"
34+
uses: "actions/checkout@v4"
3835

39-
- name: Setup PHP
40-
uses: shivammathur/setup-php@v2
36+
- name: "Install PHP"
37+
uses: "shivammathur/setup-php@v2"
4138
with:
42-
php-version: ${{ matrix.php }}
43-
tools: composer:v2
44-
coverage: none
39+
coverage: "none"
40+
php-version: "${{ matrix.php-version }}"
41+
tools: "cs2pr"
4542

4643
- name: Install dependencies
47-
uses: nick-invision/retry@v1
44+
uses: nick-fields/retry@v2
4845
with:
4946
timeout_minutes: 5
5047
max_attempts: 5
51-
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
48+
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
5249

53-
- name: "Run a static analysis with phpstan/phpstan"
54-
run: "vendor/bin/phpstan --error-format=github"
50+
- name: Execute type checking
51+
run: vendor/bin/phpstan --configuration="phpstan.neon.dist"

CHANGELOG.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22

33
## UNRELEASED
44

5-
## v10.1.1 - 11-14-2023
5+
## v11.0.0 - 11-14-2023
66

7-
- fix: wrong export url generated when ajax is not set #54
8-
- fix #33 - remove window._buildUrl dependency
9-
10-
## v10.1.0 - 08-29-2023
11-
12-
- feat: support livewire 3 #51
13-
- fix: #50
14-
15-
## v10.0.0 - 02-20-2023
16-
17-
- feat: Laravel 10 support
18-
- feat: OpenSpout v4 support
19-
7+
- Laravel 11.x support

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Laravel DataTables Export Plugin
22

3-
[![Laravel 8|9|10](https://img.shields.io/badge/Laravel-8|9|10-orange.svg)](http://laravel.com)
3+
[![Laravel 11](https://img.shields.io/badge/Laravel-11-orange.svg)](http://laravel.com)
44
[![Latest Stable Version](https://img.shields.io/packagist/v/yajra/laravel-datatables-export.svg)](https://packagist.org/packages/yajra/laravel-datatables-export)
55
[![Continuous Integration](https://github.com/yajra/laravel-datatables-export/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/yajra/laravel-datatables-export/actions/workflows/continuous-integration.yml)
66
[![Static Analysis](https://github.com/yajra/laravel-datatables-export/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/yajra/laravel-datatables-export/actions/workflows/static-analysis.yml)
@@ -12,11 +12,11 @@ exporting using Queue, OpenSpout and Livewire.
1212

1313
## Requirements
1414

15-
- [PHP >=8.1](http://php.net/)
16-
- [Laravel 10](https://github.com/laravel/framework)
15+
- [PHP >=8.2](http://php.net/)
16+
- [Laravel 11](https://github.com/laravel/framework)
1717
- [Laravel Livewire](https://laravel-livewire.com/)
1818
- [OpenSpout](https://github.com/openspout/openspout/)
19-
- [Laravel DataTables 10.x](https://github.com/yajra/laravel-datatables)
19+
- [Laravel DataTables 11.x](https://github.com/yajra/laravel-datatables)
2020
- [jQuery DataTables v1.10.x](http://datatables.net/)
2121

2222
## Documentations
@@ -30,10 +30,11 @@ exporting using Queue, OpenSpout and Livewire.
3030
| 8.x | 0.x |
3131
| 9.x | 1.x |
3232
| 10.x | 10.x |
33+
| 11.x | 11.x |
3334

3435
## Quick Installation
3536

36-
`composer require yajra/laravel-datatables-export`
37+
`composer require yajra/laravel-datatables-export:^11.0`
3738

3839
The package also requires batch job:
3940

composer.json

Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,83 @@
11
{
2-
"name": "yajra/laravel-datatables-export",
3-
"description": "Laravel DataTables Queued Export Plugin.",
4-
"keywords": [
5-
"laravel",
6-
"datatables",
7-
"export",
8-
"excel",
9-
"livewire",
10-
"queue"
11-
],
12-
"license": "MIT",
13-
"authors": [
14-
{
15-
"name": "Arjay Angeles",
16-
"email": "[email protected]"
17-
}
18-
],
19-
"require": {
20-
"php": "^8.1",
21-
"ext-json": "*",
22-
"livewire/livewire": "^2.11.2|^3.0.1",
23-
"openspout/openspout": "^4.12.1",
24-
"phpoffice/phpspreadsheet": "^1.27",
25-
"yajra/laravel-datatables": "^10.0"
26-
},
27-
"require-dev": {
28-
"nunomaduro/larastan": "^2.4.1",
29-
"orchestra/testbench": "^8.0.1"
30-
},
31-
"autoload": {
32-
"psr-4": {
33-
"Yajra\\DataTables\\": "src/"
34-
}
35-
},
36-
"autoload-dev": {
37-
"psr-4": {
38-
"Yajra\\DataTables\\Exports\\Tests\\": "tests/"
39-
}
40-
},
41-
"config": {
42-
"preferred-install": "dist",
43-
"sort-packages": true,
44-
"optimize-autoloader": true
45-
},
46-
"extra": {
47-
"branch-alias": {
48-
"dev-master": "10.0-dev"
2+
"name": "yajra/laravel-datatables-export",
3+
"description": "Laravel DataTables Queued Export Plugin.",
4+
"keywords": [
5+
"laravel",
6+
"datatables",
7+
"export",
8+
"excel",
9+
"livewire",
10+
"queue"
11+
],
12+
"license": "MIT",
13+
"authors": [
14+
{
15+
"name": "Arjay Angeles",
16+
"email": "[email protected]"
17+
}
18+
],
19+
"require": {
20+
"php": "^8.2",
21+
"ext-json": "*",
22+
"livewire/livewire": "^2.11.2|^3.0.1",
23+
"openspout/openspout": "^4.12.1",
24+
"phpoffice/phpspreadsheet": "^1.27",
25+
"yajra/laravel-datatables-buttons": "^11.0",
26+
"pestphp/pest": "^2.34",
27+
"pestphp/pest-plugin-laravel": "^2.3"
4928
},
50-
"laravel": {
51-
"providers": [
52-
"Yajra\\DataTables\\ExportServiceProvider"
53-
]
54-
}
55-
},
56-
"minimum-stability": "dev",
57-
"prefer-stable": true,
58-
"funding": [
59-
{
60-
"type": "github",
61-
"url": "https://github.com/sponsors/yajra"
62-
}
63-
]
29+
"require-dev": {
30+
"larastan/larastan": "^2.9.1",
31+
"orchestra/testbench": "^9",
32+
"laravel/pint": "^1.14",
33+
"rector/rector": "^1.0"
34+
},
35+
"autoload": {
36+
"psr-4": {
37+
"Yajra\\DataTables\\": "src/"
38+
}
39+
},
40+
"autoload-dev": {
41+
"psr-4": {
42+
"Yajra\\DataTables\\Exports\\Tests\\": "tests/"
43+
}
44+
},
45+
"scripts": {
46+
"test": "./vendor/bin/pest",
47+
"pint": "./vendor/bin/pint",
48+
"rector": "./vendor/bin/rector",
49+
"stan": "./vendor/bin/phpstan analyse --memory-limit=2G --ansi --no-progress --no-interaction --configuration=phpstan.neon.dist",
50+
"pr": [
51+
"@rector",
52+
"@pint",
53+
"@stan",
54+
"@test"
55+
]
56+
},
57+
"config": {
58+
"preferred-install": "dist",
59+
"sort-packages": true,
60+
"optimize-autoloader": true,
61+
"allow-plugins": {
62+
"pestphp/pest-plugin": true
63+
}
64+
},
65+
"extra": {
66+
"branch-alias": {
67+
"dev-master": "11.x-dev"
68+
},
69+
"laravel": {
70+
"providers": [
71+
"Yajra\\DataTables\\ExportServiceProvider"
72+
]
73+
}
74+
},
75+
"minimum-stability": "dev",
76+
"prefer-stable": true,
77+
"funding": [
78+
{
79+
"type": "github",
80+
"url": "https://github.com/sponsors/yajra"
81+
}
82+
]
6483
}

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
includes:
2-
- ./vendor/nunomaduro/larastan/extension.neon
2+
- ./vendor/larastan/larastan/extension.neon
33

44
parameters:
55

phpunit.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
>
7+
<testsuites>
8+
<testsuite name="Test Suite">
9+
<directory suffix="Test.php">./tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
</phpunit>

rector.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
6+
use Rector\Config\RectorConfig;
7+
use Rector\Set\ValueObject\LevelSetList;
8+
9+
return static function (RectorConfig $rectorConfig): void {
10+
$rectorConfig->paths([
11+
__DIR__.'/src',
12+
__DIR__.'/tests',
13+
]);
14+
15+
// register a single rule
16+
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
17+
18+
// define sets of rules
19+
$rectorConfig->sets([
20+
LevelSetList::UP_TO_PHP_82,
21+
]);
22+
};

0 commit comments

Comments
 (0)