From eb814992b2e7bccb7e0be16c937a4aa6102b5de2 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 10:41:17 +0800 Subject: [PATCH 1/7] ci: add 8.4 --- .github/workflows/continuous-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 8ff98cc4..5cb492da 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -14,14 +14,14 @@ jobs: 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 }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 From 128c18ff4df926eb146c41f37bfb1609366eb282 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 10:48:15 +0800 Subject: [PATCH 2/7] ci: pint workflow --- .github/workflows/pint.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 2151cafa..fbde1d8c 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -7,13 +7,21 @@ on: jobs: phplint: runs-on: ubuntu-latest + + permissions: + contents: 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" From 7743e320841800f8bb947aa23a2028bd9683726a Mon Sep 17 00:00:00 2001 From: yajra <2687997+yajra@users.noreply.github.com> Date: Tue, 21 Jan 2025 02:49:56 +0000 Subject: [PATCH 3/7] fix: pint --- src/config/datatables.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/datatables.php b/src/config/datatables.php index 08912643..beef019f 100644 --- a/src/config/datatables.php +++ b/src/config/datatables.php @@ -57,10 +57,10 @@ * Note, only change this if you know what you are doing! */ 'builders' => [ - //Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent', - //Illuminate\Database\Eloquent\Builder::class => 'eloquent', - //Illuminate\Database\Query\Builder::class => 'query', - //Illuminate\Support\Collection::class => 'collection', + // Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent', + // Illuminate\Database\Eloquent\Builder::class => 'eloquent', + // Illuminate\Database\Query\Builder::class => 'query', + // Illuminate\Support\Collection::class => 'collection', ], /* From 4a693e7ce69df7c298b5d0a48a0eec2d5a64458d Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 10:50:14 +0800 Subject: [PATCH 4/7] ci: remove styleci --- .styleci.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 0285f179..00000000 --- a/.styleci.yml +++ /dev/null @@ -1 +0,0 @@ -preset: laravel From 4ff24a9720ebf3e61ca025fab2d435d8558e872d Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 10:52:43 +0800 Subject: [PATCH 5/7] chore: export ignore --- .gitattributes | 3 ++- sonar-project.properties | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 sonar-project.properties diff --git a/.gitattributes b/.gitattributes index 47ea9b35..be4c5df3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,7 @@ .gitattributes export-ignore .gitignore export-ignore .scrutinizer.yml export-ignore -.styleci.yml export-ignore phpstan.neon.dist export-ignore phpunit.xml.dist export-ignore +pint.json export-ignore +rector.php export-ignore diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 8edc4cdc..00000000 --- a/sonar-project.properties +++ /dev/null @@ -1,3 +0,0 @@ -# Define separate root directories for sources and tests -sonar.sources = src/ -sonar.tests = tests/ From 6bc97f28b587e1a7c465974030447449290e71d4 Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 11:02:15 +0800 Subject: [PATCH 6/7] ci: 8.4 static analysis --- .github/workflows/static-analysis.yml | 4 ++-- phpstan.neon.dist | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 8e9365da..bdf913b3 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -29,12 +29,12 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] stability: [prefer-stable] steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9971e78a..6e0471da 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -10,8 +10,7 @@ parameters: ignoreErrors: - '#Unsafe usage of new static\(\).#' + - identifier: missingType.iterableValue excludePaths: - src/helper.php - - checkMissingIterableValueType: false From a17f045500d0fec4253d29a652f84990f629317f Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 21 Jan 2025 11:09:04 +0800 Subject: [PATCH 7/7] fix: static analysis Error: Method Yajra\DataTables\QueryDataTable::results() should return Illuminate\Support\Collection but returns Illuminate\Support\Collection. --- src/Contracts/DataTable.php | 2 +- src/QueryDataTable.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Contracts/DataTable.php b/src/Contracts/DataTable.php index 0e5ac7b5..d1320b4c 100644 --- a/src/Contracts/DataTable.php +++ b/src/Contracts/DataTable.php @@ -10,7 +10,7 @@ interface DataTable /** * Get results. * - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection|\Illuminate\Support\Collection */ public function results(): Collection; diff --git a/src/QueryDataTable.php b/src/QueryDataTable.php index 946f1ccf..f6610dad 100644 --- a/src/QueryDataTable.php +++ b/src/QueryDataTable.php @@ -130,7 +130,7 @@ public function make(bool $mDataSupport = true): JsonResponse /** * Get paginated results. * - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public function results(): Collection {