Using PHPUnit with Gaufrette to unit test IO-dependent behaviour
- By Piotr Belina
- 7 May, 2013
- No Comments
Recently I wanted to test some class which uses heavily IO. I was refactoring some legacy code depending on file_get_contents and other file functions. To allow easy testing I added … Continue Reading →
Magento: Enabling modules via local.xml
- By Piotr Belina
- 31 January, 2013
- No Comments
I wanted to enable some modules only locally, without the possibility to use them on production. This would eliminate a vulnerability of leaking debug data. As an example I will … Continue Reading →
Magento: Debugging Webservices
- By Piotr Belina
- 22 January, 2013
- No Comments
During an audit I had to check with a debugger how one of Magento Webservices works. I found a post on Troubleshooting Magento Web Service using Python so I could … Continue Reading →
Symfony 2: Sending a file to download from controller
- By Piotr Belina
- 16 December, 2012
- No Comments
Here is a snippet how to send a file to download. It creates a zip archive and sends it. <?php namespace Acme\DemoBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; … Continue Reading →
Magento, Composer and Dependency Injection
- By Piotr Belina
- 29 November, 2012
- No Comments
Recently I found an information about Composer installer for Magento. I explored this a little bit and I managed to include some other packages (Monolog) and Symfony’s bundles into magento installation. … Continue Reading →
Hello
- By Piotr Belina
- 18 November, 2012
- No Comments
I’m starting a new programming blog. I will write about: PHP Symfony Magento Python Hope you will find it useful.

Copyright © 2013