From df8ac598719cbf4d61b6f19ba81d468796611fdb Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Tue, 22 Feb 2022 10:05:00 +0000 Subject: [PATCH 1/5] Updated to Laravel 9. --- composer.json | 2 +- src/EloquentJoinBuilder.php | 2 ++ tests/TestCase.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1987022..186bf4f 100644 --- a/composer.json +++ b/composer.json @@ -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": "*", diff --git a/src/EloquentJoinBuilder.php b/src/EloquentJoinBuilder.php index 1251069..e8b1691 100644 --- a/src/EloquentJoinBuilder.php +++ b/src/EloquentJoinBuilder.php @@ -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]; } diff --git a/tests/TestCase.php b/tests/TestCase.php index 0714b5e..12b4593 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -120,6 +120,6 @@ protected function assertQueryMatches($expected, $actual) $expected = str_replace(['"'], '`', $expected); } - $this->assertRegExp($expected, $actual); + $this->assertMatchesRegularExpression($expected, $actual); } } From 654893ac148daf53570569b7aa8841ebb4644938 Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Tue, 22 Feb 2022 10:08:25 +0000 Subject: [PATCH 2/5] Updated tests. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd19ae9..76b10d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,8 @@ 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 From ae3e4338d72270b34b55ea073d75a92c9e3306fc Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Tue, 22 Feb 2022 10:09:52 +0000 Subject: [PATCH 3/5] Tweaking testing. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76b10d5..95ddfd4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Setup PHP - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php_version }} From 0938ded0f2ae144fc20aa8ad966becc80dacde7d Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Tue, 15 Nov 2022 15:17:39 -0700 Subject: [PATCH 4/5] Update test.yml --- .github/workflows/test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95ddfd4..626ead2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,18 @@ jobs: - name: Run composer install run: composer install --no-interaction --no-suggest - + + - 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: Install Laravel run: composer update --no-interaction illuminate/database:^${{ matrix.laravel_version }} From 97371a30bc3670c86e507f4b20f9939778b82c66 Mon Sep 17 00:00:00 2001 From: Mike Bronner Date: Tue, 15 Nov 2022 15:19:34 -0700 Subject: [PATCH 5/5] Update test.yml --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 626ead2..48f4ebe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,5 @@ jobs: - name: Install Laravel run: composer update --no-interaction illuminate/database:^${{ steps.laravel_version_cleaned.outputs.value }} - - name: Install Laravel - run: composer update --no-interaction illuminate/database:^${{ matrix.laravel_version }} - - name: Run PHPUnit run: ./vendor/bin/phpunit