Commit 37f866e
fix: restore install/upgrade on PS 9.0.x
Two bugs broke ps_mbo install/upgrade on PrestaShop 9.0.x:
- ResolvesServices was used inside the UseHooks trait, so getTraitNames()
(class_uses(UseHooks::class)) turned it into a bogus "ResolvesServices"
hook and registration failed. Move the trait onto the ps_mbo class so
getRequiredService() stays available without being scanned as a hook.
- The 'upload' action on route admin_module_manage_action only exists since
PS 9.1.0; generating its URL threw InvalidParameterException on 9.0.x.
Add the 'upload' action URL only when _PS_VERSION_ >= 9.1.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent abc39b4 commit 37f866e
3 files changed
Lines changed: 25 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 187 | + | |
197 | 188 | | |
198 | 189 | | |
199 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
0 commit comments