How to create REST URLs without verbs? General principles for good URI design: Don’t use query parameters to alter state Don’t use mixed-case paths if you can help it; lowercase is best Don’t use implementation-specific extensions in your URIs (.php, .py, .pl, etc.) Don’t fall into RPC with your URIs Do limit your URI space as much as possible Do keep ...

Partial Doctrine entities

It turns out the solution is really simple. We just need to tell Doctrine of our intentions to fetch just part of the entity, by using the partial DQL keyword. SELECT partial l{id, title} FROM Log l Word of warning though: Doctrine will not lazily fetch the omitted fields, like it does for associations. If ...

Be lazy, be ESI: HTTP caching and Symfony2

Generates documentation for your REST API from annotations

The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs.

Speedup Symfony2 on Vagrant boxes Optimizing Symfony applications on Vagrant boxes Speedup Symfony2 on Vagrant boxes

REST-ful URI design

There can be confusion about URIs and URLs (and URNs!). To get a URL just tack on a server ( and a protocol (http or ftp) to a URI (/example): The URI identifies the resource. And a URL adds some information about how to get it.

ACLs and Symfony2

Conditionally Requiring a Form Field in Symfony2

MongoDB + MySQL with Doctrine 2. Example of listener to maintain redundant data (alternative to joins)

MongoDB ODM SELECT COUNT(*) equivalent

Equivalent to the MySQL-Query: “SELECT COUNT(*) FROM users” in MongoDB ODM is: $count = $this->dm->createQueryBuilder(‘Documents\Functional\Users’)->getQuery()->execute()->count()