Highly Opinionated Thoughts on Programming

by Elnur Abdurrakhimov

Programmatic Transaction Management in Tests With Spring

Aug 9, 2014

Spring supports transactions during tests, but those transactions either roll back or commit only after a test has finished running. So what if we need to commit a transaction during the test? That might be necessary if we’re preparing test fixtures for each test inside tests themselves — not using some global fixtures that all the tests share.

Testing Repositories

Jun 11, 2014

Another common confusion I see in the PHP community is unit testing repositories. Some developers using an ORM like Doctrine mock a query builder and make their mocks expect particular methods calls with particular arguments. Others even try to parse resulting DQL and check it for particular structure. And there are some who go as far as doing the same with the resulting SQL. o_O

Assets Cache Busting in Symfony

Jun 7, 2014

When using Assetic or the asset function to output assets in Symfony, you get something like the following in the HTML output:

Symfony Without Bundles

May 21, 2014

One of the first things developers new to the Symfony framework learn about is bundles. Everything in Symfony is a bundle, the documentation says.

Symfony: Disabling HTML5 Form Validation Globally

May 21, 2014

If for some reason you want to disable HTML5 form validation globally by changing something in one place only, here’s one way you could do it:

© Elnur Abdurrakhimov