Skip to content

Commit 77e5170

Browse files
committed
Merge remote-tracking branch 'cachewerk/main' into v2
# Conflicts: # composer.json
2 parents c7d710e + 0193edd commit 77e5170

File tree

8 files changed

+78
-22
lines changed

8 files changed

+78
-22
lines changed

.codespellrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codespell]
2+
skip=./.git
3+
check-hidden=
4+
check-filenames=
5+
builtin=clear,rare,informal,usage,code,names
6+
ignore-words-list=master,iam

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/.github export-ignore
44
/examples export-ignore
5+
.codespellrc export-ignore
56
.editorconfig export-ignore
67
.gitattributes export-ignore
78
.gitignore export-ignore

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Linters
2+
3+
on:
4+
pull_request: null
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: "${{ github.workflow }}-${{ github.ref }}"
14+
cancel-in-progress: true
15+
16+
jobs:
17+
18+
spelling:
19+
name: Spell check
20+
runs-on: ubuntu-22.04
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v3
25+
26+
- name: Cache pip
27+
uses: actions/cache@v3
28+
with:
29+
path: ~/.cache/pip
30+
key: "${{ runner.os }}-pip-codespell"
31+
32+
- name: Install codespell
33+
run: |
34+
pip install --user 'codespell>=2.2'
35+
36+
- name: Search for misspellings
37+
run: |
38+
"$(python -m site --user-base)/bin/codespell"

.github/workflows/test.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
name: "Tests"
44

55
on:
6+
pull_request: null
67
push:
78
branches:
89
- "main"
9-
pull_request: null
10+
11+
permissions:
12+
contents: "read"
1013

1114
concurrency:
1215
group: "${{ github.workflow }}-${{ github.ref }}"
@@ -16,9 +19,9 @@ jobs:
1619

1720
byte_level:
1821
name: "Byte-level"
19-
runs-on: "ubuntu-20.04"
22+
runs-on: "ubuntu-22.04"
2023
steps:
21-
- name: "Checkout code"
24+
- name: "Checkout repository"
2225
uses: "actions/checkout@v3"
2326

2427
- name: "Check file permissions"
@@ -31,15 +34,15 @@ jobs:
3134
3235
syntax_errors:
3336
name: "Syntax errors"
34-
runs-on: "ubuntu-20.04"
37+
runs-on: "ubuntu-22.04"
3538
steps:
3639
- name: "Set up PHP"
3740
uses: "shivammathur/setup-php@v2"
3841
with:
3942
php-version: "8.0"
4043
coverage: "none"
4144

42-
- name: "Checkout code"
45+
- name: "Checkout repository"
4346
uses: "actions/checkout@v3"
4447

4548
- name: "Install dependencies"
@@ -64,15 +67,15 @@ jobs:
6467
dependencies:
6568
- "lowest"
6669
- "highest"
67-
runs-on: "ubuntu-20.04"
70+
runs-on: "ubuntu-22.04"
6871

6972
steps:
7073
- name: "Set up PHP"
7174
uses: "shivammathur/setup-php@v2"
7275
with:
7376
php-version: "${{ matrix.php-version }}"
7477

75-
- name: "Checkout code"
78+
- name: "Checkout repository"
7679
uses: "actions/checkout@v3"
7780

7881
- name: "Install dependencies"
@@ -88,7 +91,7 @@ jobs:
8891
needs:
8992
- "byte_level"
9093
- "syntax_errors"
91-
runs-on: "ubuntu-20.04"
94+
runs-on: "ubuntu-22.04"
9295

9396
steps:
9497
- name: "Set up PHP"
@@ -97,23 +100,23 @@ jobs:
97100
php-version: "8.0"
98101
coverage: "none"
99102

100-
- name: "Checkout code"
103+
- name: "Checkout repository"
101104
uses: "actions/checkout@v3"
102105

103106
- name: "Check JSON files"
104107
run: |
105108
find . -type f -name '*.json' | xargs -t -L 1 -- php -r 'json_decode(file_get_contents($argv[1]), null, 512, JSON_THROW_ON_ERROR);'
106109
107110
- name: "Validate Composer configuration"
108-
run: "composer validate --strict"
111+
run: "composer validate --no-interaction --strict"
109112

110113
- name: "Install dependencies"
111114
uses: "ramsey/composer-install@v2"
112115
with:
113116
dependency-versions: "highest"
114117

115118
- name: "Check PSR-4 mapping"
116-
run: "composer dump-autoload --optimize --strict-psr"
119+
run: "composer dump-autoload --no-interaction --optimize --strict-psr"
117120

118121
- name: "Perform static analysis"
119122
run: "composer exec -- phpstan analyze -c vendor/nunomaduro/larastan/extension.neon -l 5 src/ stubs/"
@@ -123,7 +126,7 @@ jobs:
123126
needs:
124127
- "byte_level"
125128
- "syntax_errors"
126-
runs-on: "ubuntu-20.04"
129+
runs-on: "ubuntu-22.04"
127130

128131
steps:
129132
- name: "Set up PHP"
@@ -132,7 +135,7 @@ jobs:
132135
php-version: "8.0"
133136
coverage: "none"
134137

135-
- name: "Checkout code"
138+
- name: "Checkout repository"
136139
uses: "actions/checkout@v3"
137140

138141
- name: "Check EditorConfig configuration"
@@ -149,15 +152,20 @@ jobs:
149152
- name: "Check coding style"
150153
run: "composer exec -- phpcs -s src/ stubs/"
151154

155+
# Move TODO-s into GitHub issues!
156+
- name: "Search for TODO-s and FIXME-s"
157+
run: |
158+
! git grep --extended-regexp --ignore-case '\b(TODO|FIXME)\b' -- ':/' ':!*/test\.yml'
159+
152160
exported_files:
153161
name: "Exported files"
154162
needs:
155163
- "byte_level"
156164
- "syntax_errors"
157-
runs-on: "ubuntu-20.04"
165+
runs-on: "ubuntu-22.04"
158166

159167
steps:
160-
- name: "Checkout code"
168+
- name: "Checkout repository"
161169
uses: "actions/checkout@v3"
162170

163171
- name: "Check exported files"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
## [v0.2.0] - 2022-11-07
2020
### Added
2121
- Added maintenance mode support ([#7](https://github.com/cachewerk/bref-laravel-bridge/pull/7))
22-
- Support persistent PostgresSQL sessions with Octane ([#9](https://github.com/cachewerk/bref-laravel-bridge/pull/9))
22+
- Support persistent PostgreSQL sessions with Octane ([#9](https://github.com/cachewerk/bref-laravel-bridge/pull/9))
2323
- Parse `Authorization: Basic` header into `PHP_AUTH_*` variables ([#10](https://github.com/cachewerk/bref-laravel-bridge/pull/10))
2424
- Prepare Octane responses without `Content-Type` ([08ab941](08ab941ab734d636697847b036cd9ed5e31a30ad))
2525

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ serverless deploy function --function=cli --update-config
180180
serverless deploy function --function=queue --update-config
181181
```
182182

183-
One caveat with the `--update-config` flag is that it doesn't objects in `environment` variables in the `serverless.yml`:
183+
One caveat with the `--update-config` flag is that it doesn't do objects in `environment` variables in the `serverless.yml`:
184184

185185
```yml
186186
provider:

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"php": "^8.0",
1515
"aws/aws-sdk-php": "^3.222",
1616
"bref/bref": "^2.0.0-beta14",
17-
"illuminate/container": "^8.0 || ^9.0",
18-
"illuminate/contracts": "^8.0 || ^9.0",
19-
"illuminate/http": "^8.0 || ^9.0",
20-
"illuminate/queue": "^8.0 || ^9.0",
21-
"illuminate/support": "^8.0 || ^9.0",
17+
"illuminate/container": "^8.0 || ^9.0 || ^10.0",
18+
"illuminate/contracts": "^8.0 || ^9.0 || ^10.0",
19+
"illuminate/http": "^8.0 || ^9.0 || ^10.0",
20+
"illuminate/queue": "^8.0 || ^9.0 || ^10.0",
21+
"illuminate/support": "^8.0 || ^9.0 || ^10.0",
2222
"laravel/octane": "^1.2",
2323
"riverline/multipart-parser": "^2.0"
2424
},

src/Queue/Worker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function runSqsJob(Job $job, string $connectionName, WorkerOptions $optio
2727
$job,
2828
$this->maxAttemptsExceededException($job),
2929
);
30+
31+
// exit so that PHP will shutdown and close DB connections etc.
32+
exit(1);
3033
});
3134

3235
pcntl_alarm(

0 commit comments

Comments
 (0)