25 articles Symfony

Fabien Potencier is a mad genius, he’s the man behind Sensio Labs and the Symfony PHP framework, which I have grown to really appreciate. For one, any business with a web development team needs to be on a framework. Period. Collaboration will improve exponentially while development time will decrease as your systems become more stable and scalable. PHP frameworks are a necessity for any company with serious skin in the web!

Looking for a PHP developer, a Symfony expert or Wordpress web developer? Perhaps a business system architect that specializes in scalable MySQL business system design and deployment? We have reliable, fast and professional developers that meets your organization’s needs! Contact us for your next web development project and schedule a free consultation today.

Rendering Twig templates from Symfony Repository without Using Dependency Injection (DIC)

Sometimes it's useful to access Twig templates from a Symfony repository, one could argue that this goes against a repository's role, but if you think of Twig template files or Twig strings perhaps grabbed from a database as data, then this coincides nicely with the function of a repo. These arguments aside, whatever your situation,…

Symfony: Re-authenticate FOS user automatically without making users log back in

Integrating a Wordpress user login with Symfony is pretty painless if you need to share user sessions.  Just don't rely solely on that Wordpress cookie, but cross reference a randomly assigned hash that can reference back to the Wordpress user's table.  When you get your system to authenticate a user and you find your FOS…

Symfony: Forcing redirects in controller and specifying redirect type

The Symfony documentation is getting better, but it still lacks more detail, which is why I've been collecting helpful tips and snippets here.  According to the Symfony docs, by default, the "redirectToRoute()" method performs a 302 (temporary) redirect, so in order to specify a 301 (permanent) redirect, you can add the third argument in this…

Latest Symfony version with standard Composer dependency settings that won’t break!

The latest and greatest version of Symfony is so fresh, it's just not ready for prime time -- at least some of its standard dependency packages they call bundles!  I hope this saves other Sensio Labs Symfony framework users trouble because if you're hoping for all new versions, you're bound to run into the trouble. …

Symfony Assetic troubleshooting with the LESS filter

Installing Symfony doesn't take long, but depending on your Composer capabilities on your web server, you may run into issues if you don't install LESS and Node properly. Find the Node modules path by typing in the Linux command line: find / -name node_modules -type d Then set to the node_paths option: assetic: filters: less: node_paths: /usr/lib/node_modules…