diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a521b25..fe75aa3 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,17 +1,16 @@ -name: "Continuous Integration" +name: Continuous Integration on: push: branches: - master - - 11.x + - '*.x' pull_request: schedule: - cron: '0 0 * * *' jobs: - phpunit: - + tests: runs-on: ubuntu-latest strategy: @@ -20,17 +19,17 @@ jobs: 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 - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, memcached + extensions: oci8 tools: composer:v2 coverage: none @@ -42,7 +41,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 5 - command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index bac3eab..c07577f 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -1,11 +1,16 @@ name: PHP Linting + on: pull_request: push: branches: - master + - '*.x' + jobs: - phplint: + pint: + name: Pint + runs-on: ubuntu-latest permissions: @@ -25,4 +30,4 @@ jobs: - 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 5e53d63..4dccad0 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,24 +1,12 @@ -name: "Static Analysis" +name: Static Analysis on: push: branches: - master - - 11.x - paths: - - .github/workflows/static-analysis.yml - - composer.* - - phpstan.neon.dist - - src/** - - tests/** + - '*.x' pull_request: - paths: - - .github/workflows/static-analysis.yml - - composer.* - - phpstan.neon.dist - - src/** - - tests/** schedule: - cron: '0 0 * * *' @@ -26,15 +14,9 @@ on: jobs: static-analysis-phpstan: - name: "Static Analysis with PHPStan" + name: Source Code runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - php: [8.2, 8.3, 8.4] - stability: [prefer-stable] - steps: - name: Checkout code uses: actions/checkout@v4 @@ -42,16 +24,16 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} + php-version: 8.2 tools: composer:v2 coverage: none - name: Install dependencies - uses: nick-invision/retry@v1 + uses: nick-fields/retry@v3 with: timeout_minutes: 5 max_attempts: 5 - command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - name: "Run a static analysis with phpstan/phpstan" - run: "vendor/bin/phpstan --error-format=table" + - name: Run Static Analysis + run: vendor/bin/phpstan diff --git a/CHANGELOG.md b/CHANGELOG.md index 99be259..f1b3da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Laravel DataTables Buttons Plugin CHANGELOG. +## v12.1.2 - 2025-03-18 + +- fix: stubs with generics #196 + ## v12.1.1 - 2025-02-26 - fix: stubs #195 diff --git a/src/Generators/stubs/builder.stub b/src/Generators/stubs/builder.stub index 2ed2af7..511be79 100644 --- a/src/Generators/stubs/builder.stub +++ b/src/Generators/stubs/builder.stub @@ -13,7 +13,7 @@ class DummyClass extends DataTable /** * Build the DataTable class. * - * @param QueryBuilder $query Results from query() method. + * @param QueryBuilder $query Results from query() method. */ public function dataTable(QueryBuilder $query): EloquentDataTable { @@ -24,6 +24,8 @@ class DummyClass extends DataTable /** * Get the query source of dataTable. + * + * @return QueryBuilder */ public function query(ModelName $model): QueryBuilder { diff --git a/src/Generators/stubs/datatables.stub b/src/Generators/stubs/datatables.stub index bccfede..1a574c1 100644 --- a/src/Generators/stubs/datatables.stub +++ b/src/Generators/stubs/datatables.stub @@ -17,7 +17,7 @@ class DummyClass extends DataTable /** * Build the DataTable class. * - * @param QueryBuilder $query Results from query() method. + * @param QueryBuilder $query Results from query() method. */ public function dataTable(QueryBuilder $query): EloquentDataTable { @@ -28,6 +28,8 @@ class DummyClass extends DataTable /** * Get the query source of dataTable. + * + * @return QueryBuilder */ public function query(ModelName $model): QueryBuilder {