Commit 190b583
committed
fix(RemoveToolkitArgFromImageToolkitOperationConstructorRector): skip closures in $toolkit count
The 'exactly once' usage count for $toolkit descended into nested
closures and arrow-functions, where a `$toolkit` parameter shadow or
`use ($toolkit)` capture would have inflated the count and caused the
rector to refuse to rewrite an otherwise-valid constructor.
Contrib search (api.tresbien.tech) found zero ImageToolkitOperationBase
subclasses with this pattern, so the impact is purely defensive — but
the tightening is cheap and locks in the intended outer-scope-only
semantic. No fixture added (no realistic trigger).1 parent bd3fcfd commit 190b583
1 file changed
Lines changed: 11 additions & 2 deletions
File tree
- src/Drupal11/Rector/Deprecation
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
112 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| |||
0 commit comments