Second problem found with Symfony2

There are not really good tutorials on symfony2 yet as of this time.

One of them is here http://www.dobervich.com/2011/03/05/symfony2-blog-application-tutorial-part-ii-the-data-model/
however it uses a symfony2project git repo code to generate certain bundles.

Asking on the IRC channel I was aware there is a bundle init command to create a bundle.

app/console init:bundle “Vendor/FirstBundle” src myFirstBundle

which will actually create under the namespace “Vendor/FirstBundle” and placed under the directory /src the bundle named “myFirstBundle”

now it is time to update three things:

Follow-up actions

Ok so I have done all of the above, and now adapted it to myFirstBundle bundle that i just created.

Now let’s proceed with instantiating the entities within Entity folder.

Now running: php app/console doctrine:schema:create

I was able to generate the schema and had to change the name of my class to VendorFirstBundle rather than myFirstBundle

now installing phpunit but i have found it needs to be installed through my distribution
and not through https://github.com/sebastianbergmann/phpunit/

was getting stuck here because I did not have the right version of pear nor of phpunit installed so what I did is found here http://superuser.com/questions/55055/how-to-install-an-updated-version-of-pear-phpunit-on-ubuntu

I had to first fix and remove the install I mistakenly did with pear installed as user and now I removed everything from my home/user directory including .pearcc or the like and now I am setting up phpunit on top of pear 1.9.2

Finally after a complete day, I edited the php.ini that had been changed by pear and now commented the path set and now it is done! (php –ini)

ok but now I am getting different number of tests failing… I solved it. I noticed that the acme bundle was also running on tests so I re-enabled the routing again and it is now working properly.

Right now I am here http://www.dobervich.com/2011/03/15/symfony2-blog-application-tutorial-part-iv-displaying-data-using-doctrine2/

Leave a Reply

Your email address will not be published. Required fields are marked *