After a small tweet I sent out recently, I noticed a lot of response on it. So it seems that a lot of people are struggling with their NodeJS projects and to be more specific with projects using environment variables. I had similar problems up until I discovered the direnv project on Github.
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'.
Thankfully there are some other services for that and I created a Node wrapper for one of them. Say hello to Gingerbread.
One of the latest addition to PHP's testing tools is Behat. A test framework that focusses on business expectations (behavior driven development) versus the good ol' unit tests of PHPUnit (test driven development). In short, with BDD you are describing your functionality instead of testing your functionality with TDD afterwards.
If you use Behat in combination with Mink, you can test the behaviour of your application in the browser. It simulates the interaction between users and your application. But what if you have any authentication mechanism in your application, do you need to go through the login form in any test? The answer is no. And in this article I'll explain how.
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.
I had the same with my Twitter integration (the latest tweet bar on top of this site). These are fetched with the brilliant Guzzle library and luckily they came up with functionality to mock up responses. I'll show you how to do it in Symfony.
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.