5 Tips for developing Symfony reusable bundles

I’ve been working with Symfony for around six years and I wanted to go a step further developing a reusable bundle. Now I want to share my experience helping Symfony developers not to get stuck where I got. This is the bundle: (https://github.com/msalsas/MsalsasVotingBundle) And this is an installable demo: (https://github.com/msalsas/voting-bundle-demo) 1. Put your bundle in[…]

Anonymous functions function() use ()

Anonymous functions in PHP may use this expression: function($parameter) use ($value) { } What does it means? This function, simply use a reference to the variable $value that then returns to the parent scope. For example: $value = 5; $customFunction = function($parameter) use ($value) { $value = $value + $parameter; } call_user_func ( $customFunction, 2[…]

Install Imagick

Imagick is a native extension of php to create and modify images using the API ImageMagick. To install it in Ubuntu you will have to perform the following steps: 1. Go to the installation directory for ImageMagick: cd /usr/local/src 2. Download ImageMagick: You can download it from: Link to download page ImageMagick Example: sudo wget[…]

Basic Git commands

Git is the version management system by excellence currently. You can find complete information on the official website: http://git-scm.com. The aim of this article is to provide a basic Git commands reference, in the end, are what you will use the 95% of times. Here’s the repertoire: Clone repository: git clone repository You will use[…]