Skip to content

Commit

Permalink
Merge pull request #26 from GoIntegro/bug/serializationException
Browse files Browse the repository at this point in the history
Error in the SerializationException and LinkedResourcesSerializer
  • Loading branch information
mdelrosso committed Jun 19, 2015
2 parents 4ecb046 + c2680e9 commit fdba4b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ php:
# aliased to a recent 5.6.x version
- 5.6

env:
- SYMFONY_VERSION=2.3.*

addons:
code_climate:
repo_token: 292a00e2f5cb75b3c35254f42c549690071404e7ffa415746b00beda15b1ddab
Expand Down
4 changes: 1 addition & 3 deletions JsonApi/Serializer/LinkedResourcesSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,8 @@ private function processToManyRelationship(
if (!empty($linkedResource)) {
$linkedResources[] = $linkedResource;
} else {
// @todo This should never happen.
throw new SerializationException(sprintf(
self::ERROR_INHERITANCE_MAPPING,
implode('.', $relationships)
self::ERROR_INHERITANCE_MAPPING, $relationship->type
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion JsonApi/Serializer/SerializationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author Javier Lorenzana <javier.lorenzana@gointegro.com>
*/

namespace GoIntegro\Hateoas\JsonApi\Request;
namespace GoIntegro\Hateoas\JsonApi\Serializer;

// JSON-API.
use GoIntegro\Hateoas\JsonApi\Exception\ErrorException;
Expand Down

0 comments on commit fdba4b8

Please sign in to comment.