Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Starting with version 1.6.1.0, the PrestaShop Core codebase has switched to the PSR-1 coding standard and PSR-2 coding style guide. See the reasons why on the announcement article on the Build PrestaShop deblog.

Existing modules and themes are not required to switch to PSR-1 and PSR-2.
PrestaShop's own modules and any newly-created community module are expected to adopt these guidelines.

If you want to update your PHP code to the PSR-1 and PSR-2 guidelines, you can use the PHP Coding Standards Fixer, which fixes most issues automatically.

For reference's sake, the old PrestaShop coding standards is kept in this page: Pre-1.6.1.0 PHP Coding Standards. Please do not use it anymore!

 


Note
 

 

As of May 10th, 2016, our chosen standards were further detailed. Read the announcement article.

Here are the standards, conventions and guidelines that we choose to follow as of May 5th 10th, 2016 (for PrestaShop 1.6.1.5+ and PrestaShop 1.7):

...