Skip to content

Commit 7ae00c1

Browse files
authored
Merge pull request #215 from yajra/laravel11
feat: Laravel 11 support
2 parents 1c0fc1f + 88f8ef4 commit 7ae00c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+877
-1419
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 update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
42+
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
4343

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

.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/laravel-pint-action@2.0.0
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: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,33 @@ on:
2222

2323
jobs:
2424
static-analysis-phpstan:
25+
2526
name: "Static Analysis with PHPStan"
2627
runs-on: ubuntu-latest
2728

2829
strategy:
30+
fail-fast: true
2931
matrix:
30-
php-version:
31-
- "8.1"
32+
php: [8.2, 8.3]
33+
stability: [prefer-stable]
3234

3335
steps:
34-
- name: "Checkout code"
35-
uses: "actions/checkout@v2"
36+
- name: Checkout code
37+
uses: actions/checkout@v2
3638

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

44-
- name: "Install dependencies with Composer"
45-
uses: "ramsey/composer-install@v1"
46+
- name: Install dependencies
47+
uses: nick-invision/retry@v1
48+
with:
49+
timeout_minutes: 5
50+
max_attempts: 5
51+
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
4652

4753
- name: "Run a static analysis with phpstan/phpstan"
48-
run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"
54+
run: "vendor/bin/phpstan --error-format=table"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/coverage
33
composer.phar
44
composer.lock
5+
/.phpunit.cache/test-results

CHANGELOG.md

Lines changed: 5 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -8,94 +8,10 @@
88

99
## CHANGELOG
1010

11-
### v10.12.0 - 2023-12-15
11+
### UNRELEASED
1212

13-
- feat: allow macro on Field #213
13+
- Add support for Laravel 11.x
14+
- Fix editor scope compatibility with Fluent class scope
15+
- Rename Editor `scope` method to `formScope`
1416

15-
### v10.11.0 - 2023-11-06
16-
17-
- feat: add batch remove optimization script (optional) #212
18-
19-
### v10.10.0 - 2023-11-04
20-
21-
- feat: Add optional scout js script #210
22-
- feat: add script support when using editor #211
23-
24-
### v10.9.1 - 2023-10-04
25-
26-
- fix: add missing Arrayable param #208
27-
- fix phpstan error: Parameter #1 $value of method Yajra\DataTables\Html\Builder::searchPanes() expects array|bool|(callable(): mixed), Yajra\DataTables\Html\SearchPane given.
28-
29-
### v10.9.0 - 2023-10-02
30-
31-
- feat: add dtsp collapse option setter #206
32-
- feat: add initCollapsed option setter #207
33-
34-
### v10.8.2 - 2023-10-02
35-
36-
- fix: show searchPanes by default #205
37-
38-
### v10.8.1 - 2023-08-16
39-
40-
- Revert "fix: Mixed Content problem with updating minifiedAjax method and get current url based on http or https scheme" #202
41-
- Reverts #186
42-
- fix: #201
43-
44-
### v10.8.0 - 2023-07-31
45-
46-
- fix: Mixed Content problem with updating minifiedAjax method and get current url based on http or https scheme #186
47-
- fix: #194
48-
- feat: add exportRender method #195
49-
50-
### v10.7.0 - 2023-06-08
51-
52-
- feat: new method for enum options #196
53-
54-
### v10.6.0 - 2023-03-31
55-
56-
- feat: thead class builder #191
57-
- fix: #169
58-
- fix: [yajra/laravel-datatables#2706](https://github.com/yajra/laravel-datatables/issues/2706)
59-
60-
### v10.5.2 - 2023-03-31
61-
62-
- fix: backward compatibility with FormOptions class #190
63-
64-
### v10.5.1 - 2023-03-28
65-
66-
- fix: scripts attributes not working #189
67-
68-
### v10.5.0 - 2023-03-02
69-
70-
- feat: hide/show fields based on editor action #188
71-
- hiddenOnCreate
72-
- hiddenOnEdit
73-
- hiddenOn
74-
75-
### v10.4.0 - 2023-03-02
76-
77-
- feat: add datetime field options #187
78-
- wireFormat
79-
- keyInput
80-
- displayFormat
81-
82-
### v10.3.1 - 2023-02-20
83-
84-
- fix: too long file name check for column render #185
85-
86-
### v10.3.0 - 2023-02-20
87-
88-
- feat: add builder ability to use viteJs by default #184
89-
90-
### v10.2.0 - 2023-02-20
91-
92-
- feat: allow callable exportFormat parameter #167
93-
94-
### v10.1.0 - 2023-02-07
95-
96-
- Drop Collective\Html dependency #183
97-
- Copy Collective HtmlBuilder class and implemented php-stan
98-
99-
### v10.0.0 - 2023-02-07
100-
101-
- Add Laravel 10 specific support
17+
### v11.0.0 (2024-0X-0X)

UPGRADE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# Upgrade Notes
2+
3+
## v10 to v11
4+
5+
- Editor `scope` method has been renamed to `formScope`.

composer.json

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,64 @@
11
{
2-
"name": "yajra/laravel-datatables-html",
3-
"description": "Laravel DataTables HTML builder plugin for Laravel 5.4+.",
4-
"keywords": [
5-
"laravel",
6-
"dataTables",
7-
"jquery",
8-
"html",
9-
"js"
10-
],
11-
"license": "MIT",
12-
"authors": [
13-
{
14-
"name": "Arjay Angeles",
15-
"email": "aqangeles@gmail.com"
16-
}
17-
],
18-
"require": {
19-
"php": "^8.1",
20-
"ext-json": "*",
21-
"yajra/laravel-datatables-oracle": "^10.0"
22-
},
23-
"require-dev": {
24-
"nunomaduro/larastan": "^2.4",
25-
"orchestra/testbench": "^7.21"
26-
},
27-
"autoload": {
28-
"psr-4": {
29-
"Yajra\\DataTables\\": "src/"
30-
}
31-
},
32-
"autoload-dev": {
33-
"psr-4": {
34-
"Yajra\\DataTables\\Html\\Tests\\": "tests/"
35-
}
36-
},
37-
"extra": {
38-
"branch-alias": {
39-
"dev-master": "10.0-dev"
2+
"name": "yajra/laravel-datatables-html",
3+
"description": "Laravel DataTables HTML builder plugin",
4+
"keywords": [
5+
"yajra",
6+
"laravel",
7+
"dataTables",
8+
"jquery",
9+
"html",
10+
"js"
11+
],
12+
"license": "MIT",
13+
"authors": [
14+
{
15+
"name": "Arjay Angeles",
16+
"email": "aqangeles@gmail.com"
17+
}
18+
],
19+
"require": {
20+
"php": "^8.2",
21+
"ext-json": "*",
22+
"yajra/laravel-datatables-oracle": "^11.0"
4023
},
41-
"laravel": {
42-
"providers": [
43-
"Yajra\\DataTables\\HtmlServiceProvider"
44-
]
45-
}
46-
},
47-
"minimum-stability": "dev",
48-
"prefer-stable": true
24+
"require-dev": {
25+
"larastan/larastan": "^2.9.1",
26+
"orchestra/testbench": "^9",
27+
"laravel/pint": "^1.14",
28+
"rector/rector": "^1.0"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"Yajra\\DataTables\\": "src/"
33+
}
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"Yajra\\DataTables\\Html\\Tests\\": "tests/"
38+
}
39+
},
40+
"extra": {
41+
"branch-alias": {
42+
"dev-master": "11.0-dev"
43+
},
44+
"laravel": {
45+
"providers": [
46+
"Yajra\\DataTables\\HtmlServiceProvider"
47+
]
48+
}
49+
},
50+
"scripts": {
51+
"test": "./vendor/bin/phpunit",
52+
"pint": "./vendor/bin/pint",
53+
"rector": "./vendor/bin/rector",
54+
"stan": "./vendor/bin/phpstan analyse --memory-limit=2G --ansi --no-progress --no-interaction --configuration=phpstan.neon.dist",
55+
"pr": [
56+
"@pint",
57+
"@rector",
58+
"@stan",
59+
"@test"
60+
]
61+
},
62+
"minimum-stability": "dev",
63+
"prefer-stable": true
4964
}

phpstan.neon.dist

Lines changed: 2 additions & 2 deletions
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

@@ -15,4 +15,4 @@ parameters:
1515

1616
checkMissingIterableValueType: false
1717

18-
checkGenericClassInNonGenericObjectType: false
18+
checkGenericClassInNonGenericObjectType: false

phpunit.xml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
>
12-
<testsuites>
13-
<testsuite name="Package Test Suite">
14-
<directory suffix=".php">./tests/</directory>
15-
</testsuite>
16-
</testsuites>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<testsuites>
4+
<testsuite name="Package Test Suite">
5+
<directory suffix="Test.php">./tests/</directory>
6+
</testsuite>
7+
</testsuites>
178
</phpunit>

pint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "laravel"
3+
}

0 commit comments

Comments
 (0)