Pitfalls of mocking 4

Pitfalls of mocking
Tweet DISCLAIMER: The problem described below has been fixed by the mocking framework Prophecy. Thank @_md and @everzet on Twitter. Lately I’m doing some quite extensive specing with PHPSpec. Of course when you do BDD or TDD you always have to mock your dependencies. Mocks can be very effective but they have a serious flaw ...

Behat with Propel performance tip

Behat with Propel performance tip
Tweet Lately I’m writting a REST API and since I have converted fully to BDD there is nothing better then Behat to describe my features for the API. So having that said I noticed that there is some serious memory leaking when you use Propel 1.6 with Behat. All the scenarios are executed in one ...

PHPSpec – How I’ve stopped testing and started specifying 2

PHPSpec - How I've stopped testing and started specifying
Tweet Probably like most of you reading this post I’m a PHP developer that was deeply into TDD. Some time ago I’ve felt in love with the BDD concept and a tool called Behat. My work made sense on the level that I’ve finally was able to get in the software’s beneficient role. Behat gave ...

Symfony 2 Bundle for Last.fm API

Symfony 2 Bundle for Last.fm API
Tweet What I was thinking for some time now was writting my own Symfony 2 Bundle. I had some ideas what I want to do and one of them was to implement the Last.fm API. I found a bundle for that but it was written in a messy way and there were only methods concerning ...

Deleting records from big data tables in MySQL

Deleting records from big data tables in MySQL
Tweet Selecting records to remove The issue with big data tables is that you can’t easily perform simple queries like deleting a couple of records without exceeding either time or memory. You can encounter those problems both on MySQL side or PHP/Apache side. If there are a lot of records involved, you will want to ...

Preparing for PHP ZCE exam : Passing the exam !

Preparing for PHP ZCE exam : Passing the exam !
Tweet I hope that the series of “Preparing for PHP ZCE exam” helped you to learn for the exam itself . As for me I have successfully passed the exam on 25th of April 2012. This is just a short note that I would like to share with all people reading my series of articles. ...

Preparing for PHP ZCE exam : Chapter #10 Web Features

Preparing for PHP ZCE exam : Chapter #10 Web Features
Tweet This is one of the easy chapters that everyone should be well familiar with. So just refresh your memory on this one because it may earn you some easy extra points in the exam. This is as well the final chapter of the PHP ZCE exam preparation. Sessions This is a part that describes ...

Preparing for PHP ZCE exam : Chapter #9 Security

Preparing for PHP ZCE exam : Chapter #9 Security
Tweet This is probably the hardest chapter of the exam and one that is strongly emphasized. Configuration & Installation Read all about installing PHP as CGI binary or as an Apache module, which is most likely the way you have done it usually. It is crucial to understand the way how the redirect mechanism works. ...

Preparing for PHP ZCE exam : Chapter #8 Databases

Preparing for PHP ZCE exam : Chapter #8 Databases
Tweet SQL This chapter focuses on some of the topics related with databases. For example SQL is one of the key points of this part. This should not be an issue for people that want to pass the exam because the questions mainly consist of standard SQL queries like SELECT, INSERT, UPDATE, DELETE. One thing ...

Preparing for PHP ZCE exam : Chapter #7 OOP

Preparing for PHP ZCE exam : Chapter #7 OOP
Tweet Object Oriented Programming Most of the rules mentioned in this chapter apply to a great majority of programming languages, so assuming you have some experience with software this should be just a good reminder. Although this chapter has some general ideas of programming there are some PHP specific issues here and there. Take a ...