Merge branch '1.2'

This commit is contained in:
Graham Campbell
2015-08-08 17:38:28 +01:00
4 changed files with 14 additions and 25 deletions

View File

@@ -1 +0,0 @@
.git

View File

@@ -159,7 +159,15 @@ abstract class AbstractApiController extends Controller
],
];
return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($paginator->getCollection()))->respond();
$items = $paginator->getCollection();
if ($sortBy = $request->get('sort')) {
$direction = $request->has('order') && $request->get('order') == 'desc';
$items = $items->sortBy($sortBy, SORT_REGULAR, $direction);
}
return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($items->values()->all()))->respond();
}
/**

10
composer.lock generated
View File

@@ -3855,16 +3855,16 @@
},
{
"name": "phpunit/phpunit",
"version": "4.8.1",
"version": "4.8.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e"
"reference": "748c6963c0a8c983fa69ee8884c885d0e98209bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/25468d02f8224d6b5ee62407bedbd4cea1f5dd2e",
"reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/748c6963c0a8c983fa69ee8884c885d0e98209bf",
"reference": "748c6963c0a8c983fa69ee8884c885d0e98209bf",
"shasum": ""
},
"require": {
@@ -3923,7 +3923,7 @@
"testing",
"xunit"
],
"time": "2015-08-07 09:43:11"
"time": "2015-08-07 12:56:50"
},
{
"name": "phpunit/phpunit-mock-objects",

View File

@@ -1,18 +0,0 @@
mysql:
image: mysql:5.6
environment:
- MYSQL_ROOT_PASSWORD=cachet
- MYSQL_DATABASE=cachet
- MYSQL_USER=cachet
- MYSQL_PASSWORD=cachet
cachet:
build: .
ports:
- 80:8000
links:
- mysql:mysql
environment:
- DB_HOST=mysql
- DB_DATABASE=cachet
- DB_USERNAME=cachet
- DB_PASSWORD=cachet