Fully isolated tests in Symfony2

The most important thing you should provide with your re-usable bundles is unit tests set. Lately I solved two major cases which Symfony2 hasn’t got out of the box: testing services, defined in Dependency Injection Container and running model tests with fixtures in fully isolated environment.

The most important thing you should provide with your re-usable bundles is unit tests set. Lately I solved two major cases which Symfony2 hasn’t got out of the box: testing services, defined in Dependency Injection Container and running model tests with fixtures in fully isolated environment.

Read more

Dutch PHP Conference – review of the day 2

I had great pleasure to attend to Dutch PHP Conference day 2, as a replacement for collegue of mine. The conference met all my expectations – organisation was on very high level and talks were worth listening. Firstly I attended opening keynote by Helgi Þormar Þorbjörnsson, who spoke about importance of APIs in nowadays bussiness. He was very convincing and his arguments has made a lot of sense. Then I listened to Lorna Jane Mitchell and her OAuth talk. She perfectly describes what OAuth is, its benefits and shared a lot of examples with audience. Then we attended speach about Shared MySQL farm by Thijs Feryn – example of hosting MySQL in shared environment. After typical dutch lunch we went to Agility and Quality talk given by Sebastian Bergmann. Sebastians knowledge and experience is very impressive. The last regular session was one about Hadoop for PHP by David Zülke. It was the best one I attended. David spoke in very entertaining way and I guess that every attendee has some  Hadoop basics after that. But there were not only basics, but real life stats and live demo, which showed the power of Hadoop. In the end, Cal Evans refers in very charismatic way the idea of an open teams, the importance of flexibility and respect for the developers work.
I need to admit, that it was a very good conference and I willing to go there in next year. I hope it will be even better than this one :-)

Read more

Artykuł mojego autorstwa w Software Developer Journal 05/2011

W najnowszym Software Developer Journal ukazał się mój artykuł pod tytułem “Test-Driven Development oraz Continous Integration w projektach PHP 5.3″. Zapraszam do lektury i dzielenia się spostrzeżeniami w komentarzach. http://sdjournal.pl/magazine/1683-po-co-nam-interfejsy-tworzenie-elastycznego-kodu

Read more

Dynamic LAMP setup for localhost development

If you are developing PHP application on your own PC, you probably have some vhost based configuration of your Apache. With some tricks, you can turn your Linux box into powerful development server without configuring vhost for every app . In the minimum configuration effort, you need to pass those steps:

  1. checkout repository to disk
  2. create vhost configuration with some ServerName
  3. create entry in /etc/hosts which reflects server name used in vhost to 127.0.0.1

I’m pretty sure, that above path is used by many developers. We can ommit two lasts steps, limiting preparation of the environment only to place source code somewhere in filesystem. To achieve this we need mod_vhost_alias module for Apache2 and simple DNS server which will resolve local domain names for us.

Read more

Symfony2 showcase

Na firmowym blogu http://xlab.pl zamieściłem post odnośnie mojej ostatniej prezentacji na temat Symfony2 – zapraszam do lektury :-) Post jest dostępny pod tym linkiem.

Read more

How I passed Zend Certified Engineer exam for PHP 5.3

On thursday 25th of November 2010 I passed Zend Certified Engineer exam for PHP 5.3 thanks to certification program in company where I work – XSolve. It’s quite new exam, because of PHP 5.3, so I will describe my feelings and recomend you some helpful sources.

Read more

Power of the PHP streams – decompress gz archives on the fly from remote server

Probably most of us heard about streams in PHP. They are background of all files and network operations in PHP, even if we don’t see it. Everytime when you use file_get_contetnts or fopen you are actually using streams. But there are many stream wrappers I haven’t used, because they aren’t well known.

Read more

Accessing private object property from other object in PHP

Last time I wrote about Weirdest PHP construction I’ve ever seen, now I found another unusual PHP solution. PHP offers 3 visibility modifiers: private, protected and public. Private properties and methods can’t be accessed outside the object, as well as from inherited classes. With one exception… They can be accessed by other instances of the same class.

Last time I wrote about Weirdest PHP construction I’ve ever seen, now I found another unusual PHP solution. PHP offers 3 visibility modifiers: private, protected and public. Private properties and methods can’t be accessed outside the object, as well as from inherited classes. With one exception… They can be accessed by other instances of the same class.

Read more

Weirdest PHP construction I’ve ever seen

Let’s say that PHP isn’t the best, if it goes with language organisation. But thing I discovered yesterday scared me and surprised in the same moment. I know about ability to nest function in function (I even saw something implemented this way…), but didn’t know that we can call nested method like in the listing bellow. Please, don’t do this ever!

Let’s say that PHP isn’t the best, if it goes with language organisation. But thing I discovered yesterday scared me and surprised in the same moment. I know about ability to nest function in function (I even saw something implemented this way…), but didn’t know that we can call nested method like in the listing bellow. Please, don’t do this ever!

Read more

Symfony sfWidgetFormSelect with disabled options

The sfWidgetFormSelect doesn’t provide ability to render disabled options. It’s rarely used feature of a HTML select element, but sometimes it could save your life :-) In fact, we can achieve this feature by creating our own widget, like one listed below, which inherits from sfWidgetFormSelect. This solution is inspired by problem posted on Symfony Experts.

Read more
starsze
nowsze
Back to top