<table>
<colgroup>
<col />
<col />
<col />
<col />
<col />
</colgroup>
<tr>
<td>Repo</td>
<td>Old phpstan level</td>
<td>Latest phpstan level</td>
<td>PR</td>
<td>Status</td>
</tr>
<tr>
<td>fundraising-memberships</td>
<td>5</td>
<td>9</td>
<td>https://github.com/wmde/fundraising-memberships/pull/145</td>
<td>✅</td>
</tr>
<tr>
<td>fundraising-address-change</td>
<td>7</td>
<td>9</td>
<td>https://github.com/wmde/fundraising-address-change/pull/46</td>
<td>✅</td>
</tr>
<tr>
<td>fundraising-donations</td>
<td>8</td>
<td>9</td>
<td>https://github.com/wmde/fundraising-donations/pull/236</td>
<td>✅</td>
</tr>
<tr>
<td>fundraising-application</td>
<td>5</td>
<td>9</td>
<td>[[ https://github.com/wmde/fundraising-application/pull/2930 | Add 'void' return type wherever it's missing ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2932 | Take care of potential 'false' values ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2939 | Clean up ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2940 | Take care of 'getEntityManager()' related errors ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2942 | Prepare for stricter phpstan rules ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2943 | Add 'phpstan-phpunit' rules ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2935 | Take care of potential 'null' values ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2946 | Make 'GetApplicationVarsTrait' type safe ]] ✅
[[ https://github.com/wmde/fundraising-application/pull/2949 | Type arrays ]] 🟡
[[ https://github.com/wmde/fundraising-application/pull/2925 | Upgrade phpstan level ]] 🟡</td>
<td>🟡</td>
</tr>
<tr>
<td>fundraising-backend</td>
<td>5</td>
<td>9</td>
<td>TBD</td>
<td>⚪</td>
</tr>
</table>
Following repositories already have phpstan level 9:
|fundraising-payments|https://github.com/wmde/fundraising-payments/blob/db7c652d82350acce23829ea0044b74fab4c2cca/Makefile#L34C92-L34C101
|fundraising-subscriptions|https://github.com/wmde/fundraising-subscriptions/blob/020c3d9cc0a6b813a00eb6866ddc8dfe6d1ba5d6/Makefile#L42C69-L42C78
Lernings:
- Always strictly type functions, variables, arrays
- Whenever possible use `scalar` type instead of `mixed`
- If possible, do not make your function return `null`, take care of the null value then and there
- `string[]` and `array<int, string>` are different! (`string[]` has consecutive keys, it's a list, while `array<int, string>` can have arbitrary keys)
- If you encounter any `code smell`, please create a ticket to take care of it in the future
- You should use `assertTrue()` instead of `assertSame()` when expecting `true`
- You should use `assertCount()` instead of `assertSame()` when comparing `count` of something