See 1.7.5.1 version and develop version.
I've noticed while updating training contents, this should be fixed.
Proposal:
Ping @sarjon / @matks
@eternoendless can we add this to 1.7.6 backlog ?
@mickaelandrieu what BC break are you talking about? :thinking: Can you explain it more?
I can see that SearchAndResetType code has changed, but I cannot see where the BC break was introduced. Is there something that was not working for you? Do you have code example that is not working?
@sarjon he's talking about https://github.com/PrestaShop/PrestaShop/blob/develop/src/PrestaShopBundle/Form/Admin/Type/SearchAndResetType.php#L49 which is now a mandatory construct parameter.
Ohhh, then I don't think it's a big deal. It is very very uncommon to create instances of form types as they are configured using Fully Qualified names (for example $this->createForm(SearchAndResetType::class).
@matks wdyt?
it's not only that @sarjon (but you're right @PierreRambaud), I think you should try your training module on 1.7.6 ;)
I'm afraid @mickaelandrieu is right, we cannot modify such as useful and reusable class with BC
I think you should try your training module on 1.7.6
Regarding SearchAndResetType, seems to be working. Am I missing something? :thinking:
we cannot modify such as useful and reusable class with BC
You mean add constructor parameter to form type?
I think you should try your training module on 1.7.6
Regarding
SearchAndResetType, seems to be working. Am I missing something? 馃
ping @mickaelandrieu
we cannot modify such as useful and reusable class with BC
You mean add constructor parameter to form type?
Yes
You mean add constructor parameter to form type?
Yes
I know that in theory it's a BC break, but this is a form type, you never create new instances by yourself. This kind of BC break is acceptable imo and will affect very little _if any_ developers.
I think it's better than introducing yet another similar form type which would add more confusion.
This kind of BC break is acceptable imo and will affect very little if any developers.
this affects me and probably you (your training module).
But above all, we could easily avoid this BC break by introducing back the setter injection and making it deprecated and removed for the next major: what the hurry now to break stuff for no functional reason?
Ping @sarjon, @matks any news?
@khouloudbelguith nope and it's shipped now in 1.7.6 so it's too late => closed.
we could easily avoid this BC break by introducing back the setter injection and making it deprecated and removed for the next major
What setter? This can still be done in 1.7.6.1 if necessary.
What setter? This can still be done in 1.7.6.1 if necessary.
This won't help the module developer to maintain its modules across PrestaShop versions
As they'll have to support 1.7.6.0 anyway, this changes nothing for them.
It would be considered a bug fix, and people upgrade more easily between patch versions than between minor versions.