Debug Symfony project in NetBeans

I am using vagrant box for developing the project on Symfony ( Locally my webroot files folder mounted at /home/ygerasimov/vagrant/puphpet/puphpet.

In order to debug the project in NetBeans we need to set up folders mapping:

Server path: /var/www/puphpet -- this is folder on the vagrant box where my site is

Project path: /home/ygerasimov/vagrant/puphpet/puphpet -- this is where project folder is mounted on my local machine (host)

Custom user name from profile

Current project I am working on has user profiles using profile2 module. So it is pretty common task to replace all links/references on the site with user's proper name from Profile instead of his drupal username.

This is really easy to achieve using hook_username_alter()

Install Drush with Puppet

While working on creating Vagrant profile for one of our projects that requires CentOS I have found out that most of puppet drush recepies use drush debian package that of course is not available on CentOS.

The workaround is to use The snippets are:

In Puppetfile (I am using

Practical Functional PHP

There are a lot of articles on internet about functional PHP. There is very nice presentation about it that was held in Munich.

I was thinking about applying techniques to every-day coding and came up with two quite useful examples.

Drupal 8 and Symfony

We all know that Symfony is already in the core of Drupal 8 but how it works and how both systems work? Not that many people understand fully this integration. Me neither but I would like to pubilsh my research notes about how Drupal 8 works now. Surely this material is based on the snapshot of beginning September and I really hope that more things will happen so this information is relevant only for some time.

I don't have any real life experience of the building projects with Symfony so my knowledge is very close to majority of drupal developers.

So lets start.

DrupalCamp Kyiv 2012

I would like to announce fifth DrupalCamp Kyiv. Official website of the event is Twitter @drupalcampkyiv #dckyiv12

Camp will be held on 14-15 September 2012 at i-Klass education center that is located in the spectacular part of old Kiev in front of Pechersk Lavra

Expose your Views to Services

Services module is a great tool for exposing API's of your website to other applications.

When we work with Services module most of of the changes can be done only in code. But sometimes clients ask to have configurable interface for GET calls we expose. For example client needs some "export" call for his another application that imports data from our site. This is where Services Views module can play its very nice role.

DrupalCamp Donetsk 2011 wrapup

Last weekends we held great drupal event -- DrupalCamp Donetsk 2011. This is one of the places of next year UEFA EURO 2012 and it was really great place for our meetup.

CTools plugins system

When we are writing our own module we, as good developers, should allow other people extend/modify some parts of it. Yes we are talking about defining our own module's hooks. But what we can do if we need to "extend" our module in several places but we should be sured that other module that implements one hook should also implement another one? What we should do if we have a lot of such cases and we should take care about consistency of implementations of other modules? Also sometimes we would like user to decide what implementation to run (so we want some kind of administration page where we select what extention to be active).

Drupal 7 show empty fields

In this note I would like to share solution for quite common task: show node fields titles even if field are empty. By default if the field is empty it is not included in the node. But practically sometimes client would like to see title of the field even if the field value is not set. As this task has made me debugging for a while I hope it will save someone else's time.

So solution is to use hook_field_attach_view_alter(). This hook is invoked after field module added fields renderable arrays to the content of the node.