fix: resolve all confirmed bugs (#75, #76, #77, #78, #9, root cause of #69)#79
fix: resolve all confirmed bugs (#75, #76, #77, #78, #9, root cause of #69)#79olivierbinet-code wants to merge 1 commit intoPrestaShop:devfrom
Conversation
|
Hello @olivierbinet-code! This is your first pull request on ps_banner repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
|
@PrestaShop/committers I think some rules of AI usage should be established. Not only we have the repository spammed by a robot, but the PR and the issue doesn't follow any required template at all. |
|
there are some already I'm not against fixing things, but not following the rules definitely won't be acceptable. |
|
That being said, I think this PR is just a test 😀 |
|
Vibe coding hell finally reached our project 😄 |
|
Hello thanks for your first contribution. We also encourage our new contributors to have a look at our guidelines There is also a problem on this module that uses an old version of phpstan. There is a fix that is already done and has to be implemented on each module one by one. This is a bit much for a first time contributor so we will do a PR to fix this and then you'll have to rebase yours in order to fix your CI. I'll keep you in touch once i'll do the fix. |
|
Hello @olivierbinet-code CI PhPstan fixed can you close and reopen your PR or reabase 🤣 |
ga-devfront
left a comment
There was a problem hiding this comment.
CS fixer stil broken and E2E tests too. Please fix it.
e9b2d98 to
47c0360
Compare
|
I don't know how you managed to do that, but it needs to be rebased. |
47c0360 to
ea4b67b
Compare
I was rebasing... you went too fast... |
1b16e5c to
922acbc
Compare
Hi @ga-devfront, I've rebased on dev, fixed the coding standard violations, and updated the PR description to follow the template. Could you re-review when you have a chance? Note that the CI workflows are awaiting maintainer approval to run. |
|
I've started testing again, my friend. |
|
PHP stan not happy my friend |
922acbc to
14d58b8
Compare
|
Just pushed a fix — I had missed the CRLF line ending issue introduced by Windows. Set |
14d58b8 to
08b0827
Compare
|
The problem was introduced during rebase. You have |
Yes I saw that, it should be fixed now |
|
Here are all the problems reported by PHPStan: |
08b0827 to
4f82dee
Compare
…Shop#77, PrestaShop#78, PrestaShop#9, PrestaShop#69) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
yes wrong file, my bad Krystian |
|
Hello bot Binet on my PR i have this comment
Please don't cheat and use AI |
Thanks @Touxten for flagging this. The concern about mobile rendering is valid — a full-width desktop banner may not always look good on mobile. However, the issue with the original code is not the default choice itself, but that disableDevice(Context::DEVICE_MOBILE) in install() creates a one-way trap: once disabled, there is no UI toggle in the banner module's configuration to re-enable it. Merchants who want the banner on mobile have no recourse short of editing the database directly. |
|
That’s not a bad answer, but it would be worth looking further into it and configuring the core deprecations. You could have realised that this method is going to be removed, so it’s pointless. https://github.com/search?q=repo%3APrestaShop%2FPrestaShop%20disableDevice&type=code |
|
Good point @Touxten — I've just checked and disableDevice is indeed deprecated since 9.0.0, with the explicit note that "there is no replacement, all clients should have the same experience." That actually makes our fix stronger: removing the call avoids triggering the deprecation warning and aligns with the intended direction of the core. |
|
Il est bon ! |
>on<img>tag (#75),getWidgetVariables()returning incomplete variable set (#76),updateUrl()hardcodinghttp://(#77), shared banner image deleted when uploading for one language (#78, root cause of #69), and banner hidden on mobile after fresh install (#9). Also fixes coding standard violations (line length) across the file.Test plan
<img>should have no parse errorsgetWidgetVariables()returns all 5 keys:banner_img,banner_width,banner_height,banner_link,banner_descupdateUrl()with: bare domain (example.com),http://,https://, and//example.com— only bare domain should get a protocol prependedhttps://nothttp://🤖 Generated with Claude Code