Configurer la rotation de log de Monolog dans Symfony2. Plus d'un an que je travaille sur un projet Symfony2 et un jour, le serveur m'a laché, à cause de Symfony2 ou plutôt de mon travail intensif sur le projet.
Plus on affiche de page, plus on crée de logs, mais sur un SSD la taille devient vite un problème et un fichier de log qui se rempli depuis plus d'un an sans jamais être vidé ça prend de la place, un peu trop. Si vous ne voulez ou ne pouvez pas configurer la rotation de logs de votre Os, Monolog peut s'en charger pour vous. Il est fourni avec un Handler: "rotating_file" facile à mettre en place et efficace. Il remplace le Handler "stream" et ajoute l'option "max_files" qui permet de configurer le nombre de fichier à garder. La rotation de logs se fait tous les jours, il n'est pas possible de configurer la fréquence. Voici la configuration à mettre dans les fichiers config_*.yml: New in Symfony 2.6: Security component improvements (Symfony Blog)
This is one of the major changes introduced by Symfony 2.6.
Fortunately, it won't affect your applications because it maintains the backwards compatibility. In any case, to prepare for future Symfony versions, you should start learning the new way to deal with security. The reason for this change is that when you inject the SecurityContext in other services, specially those related to Doctrine, you may introduce a circular reference that ends up in an exception. After some community discussions, it was decided that SecurityContext gives too many dependencies to retrieve a simple Token/User object.
Saro0h : #SensioLabsTeam @sensiolabs... The Francis Fanclub club - SensioLabs Connect. FrancisBesset : Je le savais ! @fabpot a son... Francisbesset/sfcontextbundle - Packagist. How to generate URLs and send Emails from the Console. Unfortunately, the command line context does not know about your VirtualHost or domain name.
This means that if you generate absolute URLs within a Console Command you'll probably end up with something like which is not very useful. To fix this, you need to configure the "request context", which is a fancy way of saying that you need to configure your environment so that it knows what URL it should use when generating URLs. There are two ways of configuring the request context: at the application level and per Command. Configuring the Request Context globally To configure the Request Context - which is used by the URL Generator - you can redefine the parameters it uses as default values to change the default host (localhost) and scheme (http).
Note that this does not impact URLs generated via normal web requests, since those will override the defaults. Configuring the Request Context per Command. POMM - Pomm - Pomm 1.0.3 is out and development branch forked to 1.1. Francisbesset/sfContextBundle - GitHub. Announcing the winner of the first Symfony Community Awards. Here we are.
The long awaited results of the first Symfony Community Awards are here. Don't scroll down yet! Please get your tuxedo first. Nearly 300 members of the community voted for who they think deserve to be honored by their work. This year, a special emphasis was given on support and evangelism. We would like to thank you for your commitment and the hard work you're doing to make the Symfony community strong and proud. Enough writing, here are the results: Connect - Join the Community. PleSoapBundle — BeSimpleSoapBundle v1.0.0-DEV documentation.
BeSimple/BeSimpleSoapBundle - GitHub. BeSimple/BeSimpleSoapBundle - GitHub. Nginx configuration for Symfony projects. Recent release of Nginx 1.0.0 triggered me to refresh my knowledge about its configuration options.
There were quite some additions since I looked in the docs for the last time. Monolog by stof for symfony's symfony-standard - Pull Request - GitHub. Pragmatism over Theory: Protected vs Private. I often favor pragmatism over theory; probably because programming is how I earn a living but also because I don't have any computer science degree and what I know I've learned from my experience.
In the recent months, there have been a lot of discussions in the PHP community about the usage of private over protected visibility for methods and properties in Open-Source libraries. To summarize my point of view: "private" is for purists and "protected" is for pragmatic developers. Coming from Perl, I've been a strong advocate of never using private for anything (as far as I remember, there is not a single use of private in symfony1; and until recently, the usage of private was explicitly disallowed in Symfony2 -- it was even part of the Symfony2 coding standards!).
So, why Symfony2 changed its mind? Anyway, a couple of weeks ago, we have started to switch most protected properties and methods to private. First, someone complained about not being able to customize the Routing component. T.co / Twitter. Voilà qui est bien plus beau. #Symfony2. Symfony Event Dispatcher - Facilitating communication between PHP classes. Beside being a full-stack framework, Symfony is also a set of decoupled and standalone components.
What is a Component? Symfony Components implement common features needed to develop websites. Symfony deployment Cheat Sheet. Fabpot/symfony - GitHub.