Hello… it took me a while from previous post. Basically had much work recently
Today I would like to write a few words about “tests” in software. Everyone knows that “tests” are the best stuff. It will make our code beautiful, make our clients happy and tests will resolve our all problems… right ?
Recently I started active development using phpspec2 tool and I have to admin that it really helps me in my work (especially when combined with behat).
Phpspec2 is really fresh project and sadly many stuff can be changed and documentation is quite raw right now. After more and more time with phpspec2 I had more and more questions (github issues list marked as FAQ can be helpfull). I will share with you what I discovered about phpspec.
Creating form type in Symfony 2 is relative easy, all details about it can be found in the official symfony documentation.
But let’s imagine that we need something more advanced…
let’s say that we need advanced widget which includes many entity types, and choices in one type are depends from other one.
I will try to show how I did such form type…
As you probably know from some time we have new version of Behat, so I have to check it
All stuff is described at @everzet blog: http://everzet.com/post/22899229502/behat-240 so I will not write it again.
I just will install new Behat in Symfony 2.1
I wrote this post cause I had discussion at #4developers.
We speak about anemic model problem in Symfony. I heard about that before but after conversation I try to learn more and write my thought about it.
Recently KnpLabs make some noise by released new edition of Symfony.
After some discussion at twitter and irc new PR with reverting directory structure appeared: https://github.com/KnpLabs/KnpRadBundle/pull/11
I am working for KnpLabs, but never tried RAD edition before. I decided to try… I needed to know what is so controversial about it.
We have heard a lot about Symfony2 recently. Now it’s time for a little oldschool. I mean… post about symfony 1.x I think that this post can be considered more generally, not only in symfony context.
PHPCS (PHP_CodeSniffer) is great php tool which can detect violations of our coding standard.
I will show how I configured it to check standards in my symfony 1.x projects.
We are software developers, and we make complicated things. But why do we make simple things complicated? I often ask myself:
Why did i implement something in such way?
- wrong assumption (lack of acceptace criteria)
- thinking about technical stuff, tools and architecture instead of client needs and client businees plans.
Welcome after break! Now I am back and ready to write .
After my last post, I began to look more closely at “Elastic Search”.
I think that SOLR is quite good, but SOLR WEB API sucks!
After reading documenation at http://www.elasticsearch.org/ I can tell that REST API is better than SOLR WEB API.
I wanted to check how “Elastic Search” works in practice.
It was after release of “Symfony2 Beta 2″, so I thought why not try to use “Elastic Search” with Symfony2?
I found out that for PHP we have two clients already (clients for other languages are available too: http://www.elasticsearch.org/guide/appendix/clients.html).
After few next queries to google I noticed that someone created “ElasticaBundle” (http://symfony2bundles.org/Exercise/ElasticaBundle).
I will describe step by step how I enabled and tried ElasticaBundle.
It is not so easy to provide good search results quickly using only RDBMS mechanism.
Fortunately, we can find many open source search engine platforms, and we can use them in PHP.
I needed some search platform which I can include in my symfony project using doctrine and postgres database.