We know how difficult it is to unlearn old habits and some tips shock you, but by following them you will be able to develop applications faster, make them less complex and at the same time more qualitative.
In any case, it is worth remembering that these are just recommendations and your team is not obliged to follow them. You can continue to use your approaches, symfony is flexible enough for any need and this will never change.
app/config/parameters.yml
.app/config/parameters.yml.dist
.app/config/parameters.yml
).Symfony\Bundle\FrameworkBundle\Controller\Controller
, use annotations for routing and caching when possible.@Template()
annotation to customize the template used by the controller. The abstract is useful, but it works "magically", so it is recommended not to use it. Also the use of this annotation slows down your application by 21ms. /** * @Route("/{id}", name="admin_post_show") */ public function showAction(Post $post)
app/Resources/views/
directory.app/Resources/translations/
.Username
, but label.username
.anonymous
parameter enabled.bcrypt
algorithm to hash user passwords.access_control
. When possible, use the @Security
annotation. In more complex situations, use the security.context
service.web/
directory.UrlGenerator
.Source: https://habr.com/ru/post/240187/
All Articles