Page 2 of 3

Jira ticket number between git branches

Have you ever worked on a team where everyone needed to put the Jira ticket number in the git message? Ever wanted to know all the ticket being merge to another branch before doing so?

Here is a nifty little bash function that you can put in your bash profile:

Once you have this included, you can now compare 2 branches together like so:

gitjira master stage

PhpStorm code sniffer validation using scope

Have you ever wanted to apply php code sniffer validation on certain folders only in PhpStorm (for example when you do plugin development and you want to exclude the core of your libraries)?

Follow these four steps to create custom scope make them available in the inspection column.

Continue reading

Use Vagrant Rsync feature to maximize performance

Original article appeared on X-Team.com


png-2

We all know that Drupal doesn’t do really well under the default shared folder of VirtualBox. When we were given the task of creating a new box for one of our clients, we immediately went with NFS file system to circumvent this issue. We quickly realized two things:

  1. Vagrant is way faster with NFS enabled (but won’t work on Windows)
  2. Drupal is still slower reading files using NFS shared folder than using a default LAMP setup on the host directly

Thanks to the newly added feature in Vagrant 1.5, we can now use rsync to sync our shared folder with any Vagrant virtual machine. What does it mean for Drupal local development? A huge performance gain! Continue reading

The expert

Create a RESTful web service with Drupal 8

Read the full article on x-team.com.


Disclaimer: Drupal 8 is still in a very early stage. Therefore, some examples or content in this article is subject to change without notice. I will be using the Drupal 8.0-alpha10 package that you can find here.

My girlfriend and I (like mostly everyone really) are always looking for ideas about what to eat. We tried a lot of recipes over the years and couldn’t figure out a good way to file them for future use.

We finally took the time and created a  little website to expose all the recipes we loved; and we did it through a simple web service. It was the perfect time to try the new Drupal 8 web services!

Continue reading

A first look at Drupal 8 translation

Read the original article on x-team.com.


Disclaimer: Drupal 8 is still in a very early stage. Therefore, some examples or content in this article is subject to change without notice.

Translating content in Drupal isn’t a straightforward task in Drupal 7. That is why they made it a priority in Drupal 8 to make this process smoother. They even created a whole initiative that you can follow here.

Let’s take a look at what is needed to get up and running with a multilingual website in Drupal 8.

Continue reading

Use Xdebug profiler with PhpStorm

Today I played around a while trying to configure Xdebug profiler to work with PhpStorm.  The following config only apply to a local LAMP stack with Xdebug installed with homebrew.

Here is the xdebug.ini I used :

[xdebug]
zend_extension="PATH_TO_EXT"
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.cli_color=on
xdebug.profiler_output_dir=/PATH/TO/DIRECTORY
xdebug.profiler_enable_trigger = 1;

The folder you choose for the output must be writable by the server. You can also be lazy and do : chmod 777 /PATH/TO/DIRECTORY

Once this is set, you can use this nifty little chrome plugin to start profiling.

The output will be written to the folder you specified. You can use it and let PhpStorm interpret the result for you by choosing : Tools | Analyze XDebug Profiler Snapshot.

© 2017 Jonathan Bardo