The Joy of Hex

Drunken Monkey Coding Style with a hint of Carlin humor

Adding Mockery to Symfony 2.3

Jul 9, 2013 - 1 minute read - Comments mockeryphp,phpunitsymfonytesting

Mockery is an essential part of my toolset. You can get more information about mockery from the repo itself, or from nettuts+. My current project in Symfony framework, 2.3 LTS, and I need to use mockery to make my life a whole lot easier. The process consists of three steps, of which step 3 is least documented. First you need to add mockery to your composer.json among other libs you will use

Building a Menu in Symfony With Events and Ordering

Jun 30, 2013 - 14 minute read - Comments eventsknpmenuphpsymfony

Menus are simple things, you have a root element, it has children, their children have children, and so on. All nice, clean and simple and utterly dull. Add Knp Menu and bundle to the composer file, run update, go through the docs and set it up, and be on your way. But what happens if you need to construct a menu from different bundles and you have no idea how many items there are and their order.