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.

Wednesday, November 14, 2012

Extjs MVC. Multiple instances of views

If you find yourself thinking:

  1. Is there a way to use multiple instances of views in extjs
  2. I've created app that uses two instances of the same view in it. There are two controllers (each controller controls corresponding instance of view). When one of the instances fires event handlers in both controllers are called.
  3. How to manage two instances of the same view to have different stores
then you are in right place.

Saturday, November 10, 2012

Managing js vendors and symfony 2.1.x

In my preveous post I've described how to manage js vendors in symfony2. However that solution is only applicable for version 2.0.x of symfony. In this post I'll describe how to manage js vendors in 2.1.x.

The idea is the same: load js vendors via symfony's standard mechanism (composer). But load into the folder under web directory.

Symfony2 and js vendors

How to deal with vendor javascripts in symfony2?
Moreover, how to make installing/updating js vendor as easy as possible?