Describe the bug
Why using a FINAL class on the PrestaShopBundle\Entity\Lang class ?
When i get an attribute group name with doctrine i see this exception :
Compile Error: Class Proxies\__CG__\PrestaShopBundle\Entity\Lang may not inherit from final class (PrestaShopBundle\Entity\Lang)
The doctrine proxy classes use the inheritance of entity class
To Reproduce
$em = $this->getDoctrine()->getManager();
$groups = $em->getRepository(AttributeGroup::class)->findAll();
var_dump($groups[0]->getAttributeGroupLangs()->first()->getPublicname());
Additional information
PrestaShop version: 1.7.6.1
PHP version: 7.1
Hi @Fabuloops,
Thanks for your report.
Ping @jolelievre what do you think?
https://github.com/PrestaShop/PrestaShop/blob/develop/src/PrestaShopBundle/Entity/Lang.php#L37
It is added by this PR:
https://github.com/PrestaShop/PrestaShop/pull/13481
Thanks!
Woups you're absolutely right I shouldn't have added this 馃槄 I'm making a PR to fix this in the next patch version
Thanks for the report @Fabuloops
Most helpful comment
Woups you're absolutely right I shouldn't have added this 馃槄 I'm making a PR to fix this in the next patch version