AWS RequestTimeTooSkewed

While scratching my head and doing my typical Google sleuthing I was stumped by a silly exception I was getting from AWS when attempting to upload images to S3 through a virtual machine (Vagrant/Virtualbox).

The solution was simple; apparently the virtual machine had lost synch due to idling (…or I honestly don’t know how). So simply resetting the date and updating the default timezones in PHP was sufficient:

Set proper timezone in PHP config(s)
Important: Make sure you set this for *all* your instances of php.ini; /cli/php.ini, /fpm/php.ini, and on and on..

Auto reset the physical date:

Simple WordPress style URL slug generator

A simple WordPress style slug generator function added to litwicki/common


Fix JSON serialization root as object instead of array in Symfony

JMS Serializer is perhaps my favorite and most frequently used open source package, and I am infinitely thankful for Johannes Schmitt for his contribution.

However, with heavy usage of Annotations JMS can become frustrating at times. Especially when building API data that you’re expecting to be formatted as an array or object and standardizing the behavior.

With the use of @MaxDepth, you’ll find that your recursive entity serialization may end up serialized as an object of nested objects, instead of an array of objects as you expect.

Check this issue for a deeper discussion on variations of the sameĀ problem, and also the solution implemented here.



The fix for this is actually quite simple: