- Issue created by @mstrelan
- πΊπΈUnited States nicxvan
Thank you for creating this. I was able to help get a few of these in before the conversion landed.
hook_help unfortunately had deeper issues I could not resolve before that got in.
The preprocess and schema were not converted as part of that issue so the work done on those issues is still valid, baseline just needs to be regenerated.
- π¦πΊAustralia mstrelan
Some statistics so far.
We started with 1907 procedural functions with no return type specified. Hooks are OOP now, so they match a different grep pattern.
If we use the original grep pattern we can see how many non-hook functions are left in the baseline, which are out of scope for this meta:
$ grep "Function .* has no return type specified" core/.phpstan-baseline.php | wc -l 511
That means we had roughly 1396 hook implementations to update.
If we use this new grep pattern we can see how many hook implementations with no return type are remaining:
$ grep "Method Drupal\\\\.*\\\\Hook\\\\.* has no return type specified" core/.phpstan-baseline.php | wc -l 834
After π Add void return type to all *_alter hook implementations Active this drops to 587.
- πΊπΈUnited States nicxvan
Each baseline item is 6 lines too, that means you've eliminated over 4800 lines from baseline with another 3000 to go!
- π©πͺGermany tstoeckler Essen, Germany
Now that a bunch of the bigger "per-hook" issues landed, I looked into tackling this on a "per-module(ish)" basis and started with the biggest offender: π Add return types to update_test_* hooks Active
Hope that's OK and would love a review.
- π¦πΊAustralia mstrelan
@tstoeckler that's great. I realised we could probably tackle all hook_update_N implementations in one hit. Opened π Add return types to hook_update_N implementations Active if anyone wants to work on it.