PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.11k stars 4.79k forks source link

Module constants are not allowed at install / activate / deactivate #17806

Closed aecarlosae closed 4 years ago

aecarlosae commented 4 years ago

Describe the bug Modules that have class constants in its main class definition, fails at install or activation / deactivation process.

To Reproduce Steps to reproduce the behavior:

  1. Create a module with its elemental definition (Module::__construct(), Module::install(), Module::uninstall().
  2. Add in the module class definition a constant ( const MY_CONSTANT)
  3. Generate the .zip module file
  4. Go to your backoffice -> modules -> module manager
  5. Try to install the .zip module file

Additional information PrestaShop version: 1.7.5.1 PHP version: 7.1.33

khouloudbelguith commented 4 years ago

Hi @aecarlosae,

Thanks for your report. Could you please provide me a demo module to test it. This is a public space. You can provide me the module by email. My address mail: khouloud.belguith@prestashop.com Let's be safe!

Thanks!

aecarlosae commented 4 years ago

Hi @khouloudbelguith, I sent you the demo module by mail.

khouloudbelguith commented 4 years ago

@aecarlosae, thanks for your feedback. I tried with PS1.7.6.3 and it well working. I attached a screen record https://drive.google.com/file/d/1euGNEOJZMHyYvhl2hLHDJ0J18azr26nj/view Thanks to check and feedback.

aecarlosae commented 4 years ago

Excellent, well it's only an issue related with PS1.7.5.1 then.

Thank you @khouloudbelguith.

khouloudbelguith commented 4 years ago

@aecarlosae, thanks for your feedback. Since it is fixed with PS1.7.6, can we close this issue?

Thanks!

aecarlosae commented 4 years ago

Yes @khouloudbelguith, I'm closing it. Greetings!