Skip to content

Commit

Permalink
Merge pull request #120 from GeneaLabs/master
Browse files Browse the repository at this point in the history
Update to Laravel 9.
  • Loading branch information
fico7489 authored Dec 5, 2022
2 parents 361baf5 + 97371a3 commit 7247776
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [7.2]
laravel_version: [5.5.*,6.*, 7.*, 8.*]
php_version: [7.4, 8.0, 8.1]
laravel_version: [8.*, 9.*]

steps:
- name: Checkout commit
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}

Expand All @@ -28,9 +28,17 @@ jobs:

- name: Run composer install
run: composer install --no-interaction --no-suggest

- name: Install Laravel
run: composer update --no-interaction illuminate/database:^${{ matrix.laravel_version }}

- name: Run find-and-replace to replace * with 0
uses: mad9000/actions-find-and-replace-string@1
id: laravel_version_cleaned
with:
source: ${{ matrix.laravel_version }}
find: '*'
replace: '0'

- name: Install Laravel
run: composer update --no-interaction illuminate/database:^${{ steps.laravel_version_cleaned.outputs.value }}

- name: Run PHPUnit
run: ./vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
],
"require": {
"illuminate/database": "^5.5|^6.0|^7.0|^8.0"
"illuminate/database": "^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "*",
Expand Down
2 changes: 2 additions & 0 deletions src/EloquentJoinBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ private function applyClauseOnRelation(JoinClause $join, string $method, array $
$params[0][$relatedTableAlias.'.'.$k] = $param;
unset($params[0][$k]);
}
} elseif (is_callable($params[0])) {
throw new InvalidRelationWhere();
} else {
$params[0] = $relatedTableAlias.'.'.$params[0];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ protected function assertQueryMatches($expected, $actual)
$expected = str_replace(['"'], '`', $expected);
}

$this->assertRegExp($expected, $actual);
$this->assertMatchesRegularExpression($expected, $actual);
}
}

0 comments on commit 7247776

Please sign in to comment.