-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from yajra/laravel11
feat: Laravel 11 support
- Loading branch information
Showing
17 changed files
with
197 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: PHP Linting | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
phplint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "laravel-pint" | ||
uses: aglipanci/[email protected] | ||
with: | ||
preset: laravel | ||
verboseMode: true | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "fix: pint" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,7 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.1" | ||
php: [8.2, 8.3] | ||
|
||
steps: | ||
- name: "Checkout code" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# UPGRADE GUIDE | ||
|
||
## Upgrade from 10.x to 11.x | ||
|
||
1. Update the composer.json file and change the version of the package to `^11.0`: | ||
|
||
```json | ||
"require": { | ||
"yajra/laravel-datatables-buttons": "^11.0" | ||
} | ||
``` | ||
|
||
2. Run `composer update` to update the package. | ||
|
||
3. If you are using a custom class of laravel-excel to export the data, you need to update the collection method and include the return type `Collection|LazyCollection` in the method signature. | ||
|
||
```php | ||
public function collection(): Collection|LazyCollection | ||
{ | ||
return $this->collection; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,78 @@ | ||
{ | ||
"name": "yajra/laravel-datatables-buttons", | ||
"description": "Laravel DataTables Buttons Plugin.", | ||
"keywords": [ | ||
"laravel", | ||
"datatables", | ||
"buttons", | ||
"jquery" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Arjay Angeles", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.1", | ||
"yajra/laravel-datatables-oracle": "^10", | ||
"yajra/laravel-datatables-html": "^10", | ||
"illuminate/console": "^10" | ||
}, | ||
"require-dev": { | ||
"maatwebsite/excel": "^3.1.46", | ||
"larastan/larastan": "^2.4", | ||
"orchestra/testbench": "^8", | ||
"rap2hpoutre/fast-excel": "^5.1", | ||
"barryvdh/laravel-snappy": "^1.0.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Yajra\\DataTables\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Yajra\\DataTables\\Buttons\\Tests\\": "tests/" | ||
} | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "10.0-dev" | ||
"name": "yajra/laravel-datatables-buttons", | ||
"description": "Laravel DataTables Buttons Plugin.", | ||
"keywords": [ | ||
"laravel", | ||
"datatables", | ||
"buttons", | ||
"jquery" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Arjay Angeles", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.2", | ||
"yajra/laravel-datatables-oracle": "^11", | ||
"yajra/laravel-datatables-html": "^11", | ||
"illuminate/console": "^11" | ||
}, | ||
"laravel": { | ||
"providers": [ | ||
"Yajra\\DataTables\\ButtonsServiceProvider" | ||
] | ||
} | ||
}, | ||
"suggest": { | ||
"yajra/laravel-datatables-export": "Exporting of dataTables (excel, csv and PDF) via livewire and queue worker.", | ||
"maatwebsite/excel": "Exporting of dataTables (excel, csv and PDF) using maatwebsite package.", | ||
"rap2hpoutre/fast-excel": "Faster exporting of dataTables using fast-excel package.", | ||
"dompdf/dompdf": "Allows exporting of dataTable to PDF using the DomPDF.", | ||
"barryvdh/laravel-snappy": "Allows exporting of dataTable to PDF using the print view." | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/yajra" | ||
} | ||
] | ||
"require-dev": { | ||
"larastan/larastan": "^2.9.2", | ||
"orchestra/testbench": "^9", | ||
"laravel/pint": "^1.14", | ||
"rector/rector": "^1.0.2", | ||
"maatwebsite/excel": "^3.1.55", | ||
"rap2hpoutre/fast-excel": "^5.4" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Yajra\\DataTables\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Yajra\\DataTables\\Buttons\\Tests\\": "tests/" | ||
} | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "11.0-dev" | ||
}, | ||
"laravel": { | ||
"providers": [ | ||
"Yajra\\DataTables\\ButtonsServiceProvider" | ||
] | ||
} | ||
}, | ||
"suggest": { | ||
"yajra/laravel-datatables-export": "Exporting of dataTables (excel, csv and PDF) via livewire and queue worker.", | ||
"maatwebsite/excel": "Exporting of dataTables (excel, csv and PDF) using maatwebsite package.", | ||
"rap2hpoutre/fast-excel": "Faster exporting of dataTables using fast-excel package.", | ||
"dompdf/dompdf": "Allows exporting of dataTable to PDF using the DomPDF.", | ||
"barryvdh/laravel-snappy": "Allows exporting of dataTable to PDF using the print view." | ||
}, | ||
"scripts": { | ||
"test": "./vendor/bin/phpunit", | ||
"pint": "./vendor/bin/pint", | ||
"rector": "./vendor/bin/rector", | ||
"stan": "./vendor/bin/phpstan analyse --memory-limit=2G --ansi --no-progress --no-interaction --configuration=phpstan.neon.dist", | ||
"pr": [ | ||
"@pint", | ||
"@rector", | ||
"@stan", | ||
"@test" | ||
] | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/yajra" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths([ | ||
__DIR__.'/src', | ||
__DIR__.'/tests', | ||
]); | ||
|
||
// register a single rule | ||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); | ||
|
||
// define sets of rules | ||
$rectorConfig->sets([ | ||
LevelSetList::UP_TO_PHP_82, | ||
]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.