24 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.

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 " 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: Then set to the node_paths option: To test Assetic and Less together, in command line,…

Setting a Doctrine query limit in Sensio Lab’s Symfony PHP framework for customer queries in respositories

Here is an example of a simple DQL query in a custom repository method meant to return a single array result. The following will return the latest result in case there are multiple contact records that match the "customerId" field, which is actually "customer_id" in the database, but remember that camelCase convention applies to Doctrine…