Technical-minded creative, web entrepreneur and part-time nerd. Eats pixels for breakfast and bytes for lunch.
Given you need to render something - a toolbar for example - inside your template in a Symfony application. You have some options to do this like creating a specific controller action. Embedding a controller action is already described thoroughly in the Symfony docs and seems to be the most legit answer on this topic in multiple StackOverflow questions.
But there is another option; creating a Twig extension which facilitates a function to render your template. How to create such extension you ask? In this blog post I'll explain how.
When you need to write in a foreign language, you'll probably use Google Translate. An awesome service that does a great job for translating individual words. But what about the grammar of a sentence? Like for example 'Edwards will be sck yesterday'. It will corrects 'sck' to 'sick', but it doesn't correct 'will be' to 'was'.
Most of the apps these days have some sort of authentication mechanism. Maybe it's an ordinary login form, or users can be authenticated through an external oAuth service like Facebook or Twitter. You definitely want to test this functionality thoroughly and it can be easily done through Behat/Mink.
If you're a PHP-only developer, odds are that you've never heard of Heroku. It's one of the popular SAAS providers out there, but was targeting Ruby applications in the beginning. Nowadays they support almost everything with help of so-called buildpacks. They currently don't have an official PHP buildpack (yet), but thanks to Christoph Hochstrasser you can deploy your PHP applications to Heroku.
As a Symfony developer you run into translations sooner or later. This is a very powerful component of the framework. But requires some additional configuration of your MAMP environment before you can start using it. I'll explain to you in short how.
Most of the web applications out there have at least one integration with an external service. Like with Twitter for pulling in tweets for example. On the other hand, most of the web applications have (or should have) functional testing setup to be less error prone when deploying new releases. You want these tests to be executed as quick as possible and test every possible scenario that could happen with your external service integration.
Drush is a very powerful instrument in the toolbox of a Drupal developer. But it can give you a little headache when trying to install in your local MAMP setup.
Also because I had forgotten how to do it within my fresh installation of MAMP Pro, a quick and relatively simple tutorial on how to install Drush.
Maybe as you guessed from my previous post, I develop on a Mac with MAMP. I really like the interface of the pro version compared to other programs like XAMPP. But it seems very difficult to install PEAR extensions with it. This post will explain how to install the MongoDB extension, but I guess this technique can be applied to a lot of other extensions too.