Been bit by this a couple of times now. It’s really a problem with a bad route. In my case I had some ajax using the FOSJsRoutingBundle to generate a route along the lines of:

Routing.generate('some_titles', {id: $(this).val()});

where val() was actually returning an empty string. The resulting URL (“some//titles”) was invalid, looks to JMSSerializer like a resource thanks to the double slash, and badda bing badda boom: completely irrelevant error.

I think this may also be the source of “Cannot redeclare class Doctrine\ORM\Mapping\Annotation” errors to boot. Double whammy.

Cygwin and Windows git stopped playing nicely together after a recent Windows update. There’s a variety of recommendations for how to fix this this on StackOverflow and elsewhere, but this post actually makes the most sense. In a nutshell, msys-1.0.dll (installed into your Program Files\Git\bin directory) is not built to be position independent. Use the dll rebaser to get it to load at a new address, like so:

Love the simplicity of Twig; mainly that it allows us to do away with the conditionals that tend to litter most interface code. You know the drill: If this then show that otherwise show the other thing except in such-and-such a case.. Confusing and brittle. Twig’s hierarchical layout is the way to go.

Falling back to a parent block depending on complex output can be tricky however. Here’s a simple way to do it without a bunch of ifs:

1

2

3

4

5

6

7

8

9

10

11

12

{%block header_details%}

{%set details%}

{# Use Ornicar's lovely GravatarBundle to show all Gravatars #}

{%foremail inuser.emails ifgravatar_exists(email)%}

<img title="{{ email }}"src="{{ gravatar(email, 50) }}"/>

{%endfor%}

{# Text tagline (may be blank) #}

{{user.tagline}}

{%endset%}

{# Show generic icon if no details #}

{{details|trim|default(parent())|raw}}

{%endblock%}

Yay. If less.

Or with one ternary conditional if running parent() through default() is unclear:

I love the Symfony framework, but really hate the form component at times. Two years after the initial release of Symfony 2 and we’re still waiting on some decent form validation debugging.

But enough griping. If you’ve ever worked with form events, then undoubtedly you have run into the This form should not contain extra fields error. Basically what it means is that the request parameters don’t match up with the form against which you’re trying to validate.

A confidential Justice Department memo concludes that the U.S. government can order the killing of American citizens if they are believed to be “senior operational leaders” of al-Qaida or “an associated force” — even if there is no intelligence indicating they are engaged in an active plot to attack the U.S.

Some time back I found myself discussing the fate of the Euro and the European Union with folks from academia-land. I was, and remain, rather confident that what is apparently an ill-conceived political shotgun polygamy will not survive another five years in any significant manner, at least not without some kind of military intervention. Multiple cultures with their own economies and their own sovereign debt… And Goldman Sachs lending a helping hand to fund it all. What could go wrong?

Anyway, academia argued the following point: Only by binding the nations of Europe and “controlling” them with a single currency could humanity be spared another World War.

Which at first sounds reasonable… until we look at what multinational central financial planning has wrought. Austerity, violent unrest, and talk of civilwar. I suppose convincing what remains of each nation state to commit suicide would prevent a “world” war, sure.

In my opinion, war — any war — is best prevented, not via centralized control, but organically through trends that have been evolving naturally: Increased travel and improved communication. Increasing freedom and understanding. It’s difficult to hate your neighbors, murderously, when you understand them, even dine with them. And since the second World War, technology has enabled a global renaissance in communication, travel, and as I see it, a trend towards a world of disparate yet harmonious cultures.

So how else would we prevent war? Allow cultures to communicate. Give them the freedom to self-actualize. And stop with the centralized meddling.