Fix composer and travis to framework 3.1

Since this version isn't compatible with 3.2 restrict the composer version to ~3.1.0