Symfony Best Practices
Submitted By bshaffer
Best practices in software development are all about improving communication between developers through standardization and enhancing security, maintainability, portability and interoperability by increasing code quality.
-
17Supplementary documents should be written in English
-
11No Propel Criteria or Doctrine_Query instances, SQL queries and any ORM-specific calls should ever be found in the templates or actions
-
7Use routes instead of raw module/action couple in url_for(), link_to() and redirect() calls
-
6Always enable output escaping and CSRF protection
-
4Controller methods should be less than 30 lines, controller class should have less than 15 action methods
-
3Always apply consistent coding standards
-
3Catch and log exception messages, display human-readable error messages to the end user
-
3Symfony core files should never be modified to add or change the features they provide.
-
2Verify cache settings, especially that the cache is enabled in prod
-
2Manage the view within the view
-
1Only deploy production front controllers in production
-
1The templates must contain PHP alternative templating syntax, for readability and ease of use
-
0Always write "symfony" starting with a small cap