Symfony2 on PHP5.3, Python2.7, Node.js, Java, and what not on Shared Hosting

Sometimes one has too many privileges 😀
Yes so I needed to use less right on my sharedhosting. For that to work I had to install several things. My former hosting had just recently upgraded to php5.3 and only had available python2.4 because of this. I discovered one can install python2.7 latest easily on user space with some commands here. The need for python2.7 is that there is a node.js script for installation that was written on python2.7 or later and that it requires some json components, etc. That being said python2.7 was out of our way. We then moved to install node.js on user space too. We found some helpful commands here and completed our setup setting things on .bashrc on server.
Then in order to configure less we said:

// parameters.yml
parameters:
  node_path:         "/home/cordoval/bin/node"
  node_paths:        "/home/cordoval/bin/node_modules"
 
// config.yml
assetic:
    filters:
        less:
            node: %node_path%
            node_paths: [%node_paths%]

This setup was for local but the server side was similar. If you want like me a shared hosting that looks like VPS where you can do all sort of things with symfony2 (including deploying with capifony.org), well you can find more information here where I am an affiliate. Hope this is useful to you! I hunted for months for a hosting like this.

Load Behat CommonContexts from Symfony2

To load common contexts for behat on a symfony2 project we basically add to deps and also to autoload as follows:

// to deps
[BehatCommonContexts]
    git=https://github.com/Behat/CommonContexts.git
    target=/behat/CommonContexts
// to autoload.php
'Behat\CommonContext'       => __DIR__.'/../vendor/behat/CommonContexts',

Then do a `bin/vendors install` and then run your behat scenarios!

Updating Behat

I was working on redirect steps and found a command set to upgrade my behat environment.
You can check first what you currently have:

pear list -c behat

And then compare to the following:

sudo pear channel-discover pear.behat.org
pear remote-list -c behat
sudo pear channel-update pear.behat.org
sudo pear upgrade behat/behat
sudo pear upgrade behat/gherkin
sudo pear upgrade behat/mink

Sharing so you don’t have to look or spend time on this and keep to the current bleeding edge.

Vespolina: The Sanbox Story 2

So vespolina ProductBundle gained today a feature section to customize products as we can see:

I guess the next step is to implement or setup nice template and product images to store the to make it more realistic so we can be able to feel the real needs of a component like this. The step after that is the integration with different services within the app so perhaps we will need to make the component even more modular. Refactoring etc coming I supose.

Thanks!

Hours later. I went and worked on getting travis-ci on VespolinaProductBundle and now got it passing at least.

http://travis-ci.org/#!/cordoval/VespolinaProductBundle/builds/319041

Now the store is more functional by itself and things are starting to work more nicely.

Vespolina: The Sandbox Story 1

Today I was able to use EasyExtends to make use of BaseProduct class by generating a directory structure that would help me implement Product class from Vespolina ProductBundle. The task involved bringing up the mongodb properly installed, with settings on cgi as well as on cli php.ini files to understand the why of EasyExtends.

The command you say?

~ php app/console sonata:easy-extends:generate VespolinaProductBundle --dest=src

The sandbox contains all the additions here showing you the sort of directory structure that was created.

A little encouragement for an url http://store.local/app_dev.php/admin/products/ follows :

I worked also on fixing some of the tests due to the break by refactory. Now that i understand a little bit more about vespolina, I can go back and work more on the tests. Focusing currently on ProductBundle and trying to get something working asap.