Skip to content

Commit f87cd33

Browse files
committed
Merge branch 'v3.x'
2 parents cf73b6b + ab950cb commit f87cd33

File tree

160 files changed

+19789
-5268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+19789
-5268
lines changed

.github/CODEOWNERS

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Laravel Elasticsearch Package Code Ownership
2+
# Defines who must review changes to specific parts of the codebase.
3+
4+
# Package metadata and config
5+
/composer.json @pdphilip
6+
/LICENSE @pdphilip
7+
/.github/ @pdphilip
8+
/README.md @pdphilip
9+
10+
# Core source code
11+
/src/ @pdphilip

.github/ISSUE_TEMPLATE/bug_report.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
## Package version
10+
ex: v2.10.3 (NB!)
11+
12+
13+
## Describe the bug
14+
A clear and concise description of what the bug is.
15+
16+
17+
18+
## To Reproduce
19+
Steps to reproduce the behavior:
20+
21+
22+
23+
## Expected behavior
24+
A clear and concise description of what you expected to happen.
25+
26+
27+
28+
---
29+
**Screenshots**:
30+
If applicable, add screenshots to help explain your problem.
31+
32+
**Component Versions (Paste in the `require` section from your composer.json file):**
33+
```json
34+
"require": {
35+
36+
},
37+
```
38+
39+
**Additional context**:
40+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/phpstan.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- github-actions
8+
paths:
9+
- '**.php'
10+
- 'phpstan.neon.dist'
11+
- '.github/workflows/phpstan.yml'
12+
13+
jobs:
14+
phpstan:
15+
name: phpstan
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 5
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: '8.2'
25+
coverage: none
26+
27+
- name: Install composer dependencies
28+
uses: ramsey/composer-install@v3
29+
30+
- name: Run PHPStan
31+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/run-tests.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev-main
8+
jobs:
9+
test:
10+
runs-on: ubuntu-22.04
11+
env:
12+
BROADCAST_DRIVER: log
13+
CACHE_DRIVER: redis
14+
QUEUE_CONNECTION: redis
15+
SESSION_DRIVER: redis
16+
DB_CONNECTION: testing
17+
APP_KEY: base64:2fl+Ktvkfl+Fuz3Qp/A76G2RTiGVA/ZjKZaz6fiiM10=
18+
APP_ENV: testing
19+
BCRYPT_ROUNDS: 10
20+
MAIL_MAILER: array
21+
TELESCOPE_ENABLED: false
22+
23+
# Docs: https://docs.github.com/en/actions/using-containerized-services
24+
services:
25+
opensearch:
26+
image: opensearch:latest
27+
env:
28+
discovery.type: single-node
29+
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
30+
ports:
31+
- 9200:9200
32+
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=5
33+
34+
redis:
35+
image: redis
36+
ports:
37+
- 6379/tcp
38+
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
39+
40+
steps:
41+
- name: Checkout 🛎
42+
uses: actions/checkout@v4
43+
44+
- name: Verify Opensearch connection
45+
run: |
46+
curl -X GET "localhost:${{ job.services.opensearch.ports['9200'] }}/_cluster/health?pretty=true"
47+
48+
- name: Setup PHP 🏗
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: 8.2
52+
tools: composer:v2
53+
coverage: xdebug
54+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, mysql
55+
56+
- name: Install Project Dependencies 💻
57+
run: |
58+
composer install --no-interaction --prefer-dist --optimize-autoloader
59+
60+
- name: List Installed Dependencies
61+
run: composer show -D
62+
63+
- name: Run tests
64+
run: |
65+
./vendor/bin/pest --version
66+
./vendor/bin/pest
67+
env:
68+
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
69+
OPENSEARCH_PORT: ${{ job.services.opensearch.ports['9200'] }}
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: main
20+
21+
- name: Update Changelog
22+
uses: stefanzweifel/changelog-updater-action@v1
23+
with:
24+
latest-version: ${{ github.event.release.name }}
25+
release-notes: ${{ github.event.release.body }}
26+
27+
- name: Commit updated CHANGELOG
28+
uses: stefanzweifel/git-auto-commit-action@v5
29+
with:
30+
branch: main
31+
commit_message: Update CHANGELOG
32+
file_pattern: CHANGELOG.md

0 commit comments

Comments
 (0)