(EN) The most useful features of PHP 5.4
10 luty 2012
Przepraszam, ten wpis nie jest dostępny po Polsku
Read more10 luty 2012
Przepraszam, ten wpis nie jest dostępny po Polsku
Read more25 styczeń 2012
Przepraszam, ten wpis nie jest dostępny po Polsku
Read more18 styczeń 2012
How many times were you curious which one of, modern web frameworks is the best? For developers who have their favourite, answer is simple. But there are plenty of questions from begginers or devs who want to learn new technology, wondering which one should take, to stay on the edge.
Read more30 grudzień 2011
Jako rok 2011 wkrótce się skończy, zrobiłem małe podsumowanie rzeczy, które miały miejsce na tym blogu. Napisałem 18 postów, czyli więcej niż w poprzednim roku (było 11). Czytelnicy zostawili ogólnie 43 komentarzy. Ten blog odwiedzono 58% częściej niż w roku poprzednim, wykonując 200% więcej czynności. W grudniu zmieniłem layout (z pomocą Chilid), poprawiając czytelność i przejrzystość bloga.
Podsumowując: to był dobry rok, ale w przyszłym będzie jeszcze lepiej :-) Dziękuję za czytanie moich artykułów i nie wahajcie aby zostawiać komentarzy i sugestii na temat ulepszeń, które można wprowadzić.
Read more8 grudzień 2011
Today I proudly present a brand new blog layout. Thanks to Chilid New Marketing Agency from Gliwice, Poland now blog is more readable and minimalistic. I need to admit that cooperation with Chilid was awesome – they clearly understand my needs, did great graphics and creation and communicated very well. Thanks again to Ania, Tomek, Patrycjusz, Marcin and Adam!
Read more23 listopad 2011
Gliwicki Software House XSolve poszukuje programistów PHP, Java, .NET, a także Functional Designerów, Solution Architectów, sysadminów. Jeśli jesteś jednym z powyższych i masz ambicje tworzyć oprogramowanie na najwyższym poziomie, dla klientów z pierwszej ligi – zobacz co oferujemy i aplikuj!
Więcej na Praca XSolve oraz naszym profilu XSolve Jobs
Read more1 listopad 2011
Recently I did a lot of Test Driven Development on my Symfony2 bundle. I used PHPUnit’s built-in mocks and stubs for many projects, so I took it again. But while I was working on mocking Symfony2 core objects I found those mocks very uncomfortable in use. I tried Mockery and it saved my day. Let’s see how to get it working with Symfony2 and how it kicks ass!
Read more23 październik 2011
Generally, it’s not a good idea to unit test protected or private methods, but in some cases it could be useful. Of course we don’t want to change our class contract, and expose those methods as a public ones, just becasue we want to test them with PHPUnit. This case can’t be solved with Proxy-Object library. It provides easy-to-use way to get protected classes to the surface. More about that is here http://blog.bastian-feder.de/blog/029_proxyObject.html. Here I’ll show how to integrate proxy object into your Symfony2 application:
Read more18 październik 2011
Today I needed to add a custom class to textarea field, to achieve TinyMCE field rendering (with help of http://symfony2bundles.org/stfalcon/TinymceBundle). It wasn’t such straightforward like I thought… I tried:
But it threw exception, that attribute „class” is undefined, so I need to solve it in other way. Thank god I use Twig, so I tried form theming (in template with form). Only thing you need to do is to find out html ID of the textarea field (in my case: wowo_bundle_newsletterbundle_newslettertype_mailing_body). Then you need to add a „_” on the front and „_widget” on the end and class=”tinymce” is there for you.
The solution is simple and powerful, Symfony2 has proven its quality again :-)
UPDATE 19.10.2011
As Florian and Stloyd mentioned in comments, setting custom class can be done in elegant way, which ain’t included in the documentation yet.
UPDATE 29.10.2011
After my contribution, „attr” element is now documented in official Symfony2 docs http://symfony.com/doc/current/reference/forms/types/field.html
Read more27 wrzesień 2011
Today I ran into a little issue: how to pass generic logger object to method? I wanted to get some verbose output from method, which I call from Command, but onc time it should log with Symfony2 OutputInterface and other time it should use monolog logger. Of course I can make some wrapper class for both of them, but it would be kind of an overkill. The Closure from PHP 5.3 came with solution. In calling method I created closure like this:
On the second hand I’ve got:
As you can see I don’t need to care about logging – just call the closure with message and it will log it properly, depending on context.