Monday, April 29, 2013

Composer in cygwin: CreateProcess failed, error code - 267

If you are using cygwin you may get the following error
admin@Win7-64:/var/www$ php composer.phar install

  proc_open(): CreateProcess failed, error code - 267
while installing stuff via composer.

After some investigation I found out that it doesn't throw exception if I run it in built-in windows cmd.

Microsoft docs say that error #267 occurs when invalid directory names are used. So I guess the reason is unix style paths in cygwin.

Thereby try to use composer in built-in cmd if you encounter #267 error.

P.S. You might want to add C:\cygwin\bin to your PATH environment variable.

Friday, March 15, 2013

Generate code with BasGeneratorBundle

Not all tasks of the programmer are fun, inspiring or exciting. Some of them just boring. But you still have to take care of those routine tasks. If you develop with Symfony2 you probably are familiar with SensioGeneratorBundle which makes your life easier by allowing you to avoid copying and pasting such things like bundles, form classes and CRUD controllers over and over again.

Though SensioGeneratorBundle copes with its task pretty well it has one drawback: there is no easy mechanism of extending generation commands with custom generation templates (aka skeletons). Since I had to create a lot of rest CRUD controllers of the same type and there were no way to generate them via SensioGeneratorBundle I decided to create my own BasGeneratorBundle.

Tuesday, March 5, 2013

ExtJs4 event handling. Components event handling

This is continuation of ExtJs4 event handling series. Today we are going to dug into ExtJs Components event handling.
Ext.Component is a core class of ExtJs that is extended by all built-in widgets (like Panel, Grid, etc). So everything I will talk about today may be applied to every widget that extends Ext.Component.

Sunday, March 3, 2013

ExtJs4 event handling. DOM Element event handling

Today I want to start new series on ExtJs4 event handling. The series are going to cover topics that might be interesting for beginners (like basic event handling of DOM Elements and ExtJs Components) as well as more advanced event handling related techniques and tricks (like event delegation and best practices for event handling in ExtJs MVC).
Without further ado let's dive into ExtJs4 DOM Elements event handling.