Skip to content

Commit 5e319c9

Browse files
committed
Merge branch '9.x' into 10.x
# Conflicts: # CHANGELOG.md # composer.json # src/Scout.php
2 parents 5c1b5eb + a9c4368 commit 5e319c9

File tree

6 files changed

+65
-2
lines changed

6 files changed

+65
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.gitignore export-ignore
1515
.styleci.yml export-ignore
1616
CHANGELOG.md export-ignore
17+
phpstan.neon.dist export-ignore
1718
phpunit.xml.dist export-ignore
1819
RELEASE.md export-ignore
1920
UPGRADE.md export-ignore
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '*.x'
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
tests:
15+
runs-on: ubuntu-22.04
16+
17+
strategy:
18+
fail-fast: true
19+
20+
name: Static Analysis
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v3
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: 8.2
30+
tools: composer:v2
31+
coverage: none
32+
33+
- name: Install dependencies
34+
uses: nick-fields/retry@v2
35+
with:
36+
timeout_minutes: 5
37+
max_attempts: 5
38+
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
39+
40+
- name: Execute type checking
41+
run: vendor/bin/phpstan

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/laravel/scout/compare/v9.8.0...10.x)
3+
## [Unreleased](https://github.com/laravel/scout/compare/v9.8.1...10.x)
4+
5+
## [v9.8.1](https://github.com/laravel/scout/compare/v9.8.0...v9.8.1) - 2023-02-14
6+
7+
### Changed
8+
9+
- Adds types to `makeAllSearchableUsing` by @nunomaduro in https://github.com/laravel/scout/pull/660
410

511
## [v9.8.0](https://github.com/laravel/scout/compare/v9.7.2...v9.8.0) - 2023-01-17
612

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
"illuminate/support": "^9.0|^10.0"
2525
},
2626
"require-dev": {
27+
"algolia/algoliasearch-client-php": "^3.2",
2728
"meilisearch/meilisearch-php": "^1.0",
2829
"mockery/mockery": "^1.0",
29-
"php-http/guzzle7-adapter": "^1.0",
3030
"orchestra/testbench": "^7.0|^8.0",
31+
"php-http/guzzle7-adapter": "^1.0",
32+
"phpstan/phpstan": "^1.10",
3133
"phpunit/phpunit": "^9.3"
3234
},
3335
"autoload": {

phpstan.neon.dist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
paths:
3+
- config
4+
- src
5+
6+
level: 0
7+
8+
ignoreErrors:
9+
- "#\\(void\\) is used.#"
10+
- "#MeiliSearch\\\\Client referenced with incorrect case#"
11+
- "#MeiliSearch\\\\MeiliSearch referenced with incorrect case#"

src/SearchableScope.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function extend(EloquentBuilder $builder)
4848
});
4949

5050
HasManyThrough::macro('searchable', function ($chunk = null) {
51+
/** @var HasManyThrough $this */
5152
$this->chunkById($chunk ?: config('scout.chunk.searchable', 500), function ($models) {
5253
$models->filter->shouldBeSearchable()->searchable();
5354

@@ -56,6 +57,7 @@ public function extend(EloquentBuilder $builder)
5657
});
5758

5859
HasManyThrough::macro('unsearchable', function ($chunk = null) {
60+
/** @var HasManyThrough $this */
5961
$this->chunkById($chunk ?: config('scout.chunk.searchable', 500), function ($models) {
6062
$models->unsearchable();
6163

0 commit comments

Comments
 (0)