Skip to content

Commit

Permalink
Merge pull request #2039 from area17/bc-checker-2x
Browse files Browse the repository at this point in the history
[2.x] BC checker.
  • Loading branch information
haringsrob authored Jan 4, 2023
2 parents aea751f + 7d8228f commit 83781f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ on:
pull_request:

jobs:
roave-backwards-compatibility-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- name: Install dependencies
run: composer install
- name: Install checker
run: composer require roave/backward-compatibility-check --dev
- name: Require dep
run: composer require kalnoy/nestedset
- name: Check for BC breaks
run: vendor/bin/roave-backward-compatibility-check --format=github-actions --from=2.12.3 --install-development-dependencies

test:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
5 changes: 2 additions & 3 deletions src/Repositories/ModuleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ public function getById($id, $with = [], $withCount = [])
* @param string $column
* @param array $orders
* @param null $exceptId
* @param string $pluckby
* @return \Illuminate\Support\Collection
*/
public function listAll($column = 'title', $orders = [], $exceptId = null, $pluckby = 'id')
public function listAll($column = 'title', $orders = [], $exceptId = null)
{
$query = $this->model->newQuery();

Expand All @@ -184,7 +183,7 @@ public function listAll($column = 'title', $orders = [], $exceptId = null, $pluc
$query = $query->withTranslation();
}

return $query->get()->pluck($column, $pluckby);
return $query->get()->pluck($column, 'id');
}

/**
Expand Down

0 comments on commit 83781f3

Please sign in to comment.