Interview To PHPPeru

Republish from source:

En la última edición del programa ‘Web Inc.’, que conducen Germán Martinez y Antonio Ognio por La MulaTV, estuvimos con Luis Córdova, experto desarrollador que lidera la comunidad PHP Perú.

Desde mediados de los noventas, PHP es una de las tecnologías más populares para la construcción de sitios web del lado del servidor.

La comunidad PHP Perú cuenta actualmente con más de 50 miembros que participan de reuniones presenciales y virtuales. Sus integrantes discuten, no solo de PHP, sino del conjunto de otras habilidades esenciales para los desarrolladores tales como: patrones de diseño, testing, control de versiones, paquetes entre otros.

Luis Córdova señaló que, entre las opciones de los programadores, también está la participación en comunidad, ayudando a otros y aprendiendo de los que saben más que uno. “Existe la necesidad de que el peruano se abra y participe con el exterior. El desarrollo va de la mano con la comunidad”, afirmó.

Posteriormente se conversó sobre Symfony 2, un framework full stack para PHP de última generación. Este sofware se construye sobre la base de un gran número de componentes, que están siendo usados como piezas fundacionales por los sistemas de manejo de contenido (SMC) más recientes como Drupal 8. Esto facilita la inter- operatividad con otras soluciones y el re-uso del código.

Finalmente, Córdova animó a que los programadores entren en la comunidad para aprender a contribuir con código a proyectos como Symfony 2 y otros. De esta manera serían partícipes de una comunidad global de programadores a través de internet y en eventos especializados. La comunidad pretende la participación enfocada el desarrollo: “Mejor hacer las herramientas que usarlas. Es importante la participación en development más que modificar o tomar algo ya hecho”, concretó .

Para más información:

Twitter: @php_peru
Grupo de google:!forum/phpperu

I give thanks to the Lord for the undeserved grace and opportunity to get to talk on php and the community here.
Thanks for all the friends that make this possible.

Kiss Your git clone’s Good-bye!: Part I

You heard me right, get ready to kiss your git clone’s good-bye with composer. If before you were accustomed to:

git clone git:// .

Then you would usually run more commands to get actually setup. And guess what, we don’t have time and we don’t have enough info for that. As PHP devs we are to get things done fast and in the best elegant way.
No more. Composer is here!

Sometimes we ignore that composer is all we need to start in the world of PHP. Today we are going to talk about the create-project command found in composer. I will assume you have a composer dev version installed on another folder and symlinked to /usr/bin/composer. The ability to bootstrap with dependencies ready a complete skeleton application lies into one command now thanks to this composer command. As long as there is a package registered in with the ability to setup a project with dependencies of any kind you can just tell composer to ready it for you. The example could be a silex application:

composer create-project fabpot/silex-skeleton

Thankfully @fabpot took the job to create a sample project skeleton for silex. Let’s remember that one thing is the framework or microframework and another different is the folders, organization, bootstrap files, that carry along with a proper application using those frameworks. For the case of symfony, don’t worry guys, we have know it all along just we did not look hard enough:

composer create-project symfony/framework-standard-edition

You really name it, as long as there was someone careful enough to prepare a bootstrapped skeleton for that particular lib or framework you love, there will be an easy 1 punch setup.
Furthermore, if you were looking for a particular version you can do:

composer create-project symfony/framework-standard-edition sf21beta1Dir v2.1.0-BETA1

If you want to go straight to the source you could do right on the same directory bootstrap in a php-flow subdirectory the project Bergie’s nice project PHPFlow like this:

composer create-project PhpFlo/PhpFlo php-flow --dev --prefer-source

Note: If create-project uses a source install, you generally want to delete the .git folder and init a clean git repo for your project. (thanks @stof)

Finally, it is in the responsibility of the package maintainer to work on composer post install hooks. This is the information that will make the development faster and easier. Using those post install scripts is not exactly easy but it can be done. This will benefit anyone coming and just doing work on a completely setup environment!

If you enjoy this blog post please consider donating. I am fund raising 1,800$ for my ticket to SymfonyLive 2012 in San Francisco.
If you want to help me go there, or would like to meet me, I would love to meet you there and hangout with the community. Please help me get there! Thanks!

I thank the Lord Jesus for His grace so far on learning symfony2 and for the opportunity that is opening to attend my first SymfonyLive event. I am also thankful to KnpLabs, happy developers! for helping me with the conference ticket!
You guys rock!

PHP Coding Standards Fixer: Let’s Put It To Work!

Nice i just embedded php-cs-fixer for my project. I git clone it to a ../php-cs-fixer dedicated git folder so i can update and have it permanently symlinked as /usr/bin/php-cs-fixer. Then I created my .php_cs like in the instructions on the github readme page. Then i ran into problems and comparing to what the –config=sf21 does I wrote my own .php_cs:

use Symfony\CS\FixerInterface;
$finder = Symfony\CS\Finder\DefaultFinder::create()
return Symfony\CS\Config\Config::create()

Then you just run it like a boss:

~ php-cs-fixer fix .

Performance review: Make sure you add that src limit so that it will not take forever to scan your vendor folder.
In addition I noticed that the main changes on my code were the removal of use statements, the addition of space lines and removal of wrong ordered things like `public static` from `static public`. Other than that I guess I bet it is going to get more fixers as they come available from contributions.

Now to continue with the project by His grace.

Sismo Github Exploring

Today I was wondering how do i create a sismo notifier that can interface an API. I have mapped a quick diagram of sismo objects and is shown here:

The Notifier object is set actually within the configuration passed to sismo which is basically an include file returning project objects.
So the notifier is actually set within the project object. However looking through github I was surprised to find more notifiers on the history of network as shown in this picture:

I found therefore someone else has worked on a twitter and a mail notifier. These of course as I said above are set per project configured within the configuration sismo file in each project folder if we are using sismoFinder.

Now everything is pointing to the need to create an app dashboard that can receive the json payloads from sismo and could mark certain merge requests within a self-hosted github like environment. I have found several tools like gitlabhq which is open source however it is coded in ruby, another was gerrit as other posts attest but they are in java and are hard to configure and explode on my face when i want to use them on my local box because they cannot conceive a world without authentication.

So I am still thinking on this app. If you have ideas please let me know. Thanks!