Commit 7bb817f
authored
Fix migration using wrong config key for database connection (#3)
## Summary
- The migration stub was referencing `barstool.database_connection` but
the actual config key is `barstool.connection`
- Uses null coalescing to fall back to the old key for backwards
compatibility with anyone who may have published the migration with the
old key
- Adds test coverage for the migration connection config
## Test plan
- [x] New test verifies `barstool.connection` is used
- [x] New test verifies fallback to `barstool.database_connection`
- [x] New test verifies `barstool.connection` takes priority when both
are set
- [x] Full test suite passes (18 tests, 129 assertions)
- [x] PHPStan passes1 parent 15b89b9 commit 7bb817f
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
94 | 112 | | |
95 | 113 | | |
96 | 114 | | |
| |||
0 commit comments