Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] JMSSerializerBundle 1.0 compatibility #332

Merged
merged 1 commit into from
Dec 5, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ php:
- 5.4

env:
- SYMFONY_VERSION=2.0.*
- SYMFONY_VERSION=2.1.*
- SYMFONY_VERSION=dev-master

Expand Down
2 changes: 1 addition & 1 deletion Tests/View/ViewHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testCreateResponseWithoutLocation($format, $expected, $createVie
->with('fos_rest.templating')
->will($this->returnValue($templating));
} else {
$serializer = $this->getMockBuilder('\JMS\SerializerBundle\Serializer\Serializer')
$serializer = $this->getMockBuilder('\JMS\Serializer\Serializer')
->setMethods(array('serialize', 'setExclusionStrategy'))
->disableOriginalConstructor()
->getMock();
Expand Down
4 changes: 4 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Upgrading
Note as FOSRestBundle is not yet declared stable, this document will be updated to
list important BC breaks.

### upgrading from 0.10.0

* now requires JMSSerializerBundle 1.0 which is not compatible with Symfony2.0

### upgrading from 0.9.0

* the view response listener is now disabled by default. See [enable view listener](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/3-listener-support.md#view-response-listener) for how to enable it.
Expand Down
10 changes: 5 additions & 5 deletions View/GroupsVersionExclusionStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

namespace FOS\RestBundle\View;

use JMS\SerializerBundle\Metadata\ClassMetadata;
use JMS\SerializerBundle\Metadata\PropertyMetadata;
use JMS\SerializerBundle\Serializer\Exclusion\ExclusionStrategyInterface;
use JMS\SerializerBundle\Serializer\Exclusion\VersionExclusionStrategy;
use JMS\SerializerBundle\Serializer\Exclusion\GroupsExclusionStrategy;
use JMS\Serializer\Metadata\ClassMetadata;
use JMS\Serializer\Metadata\PropertyMetadata;
use JMS\Serializer\Exclusion\ExclusionStrategyInterface;
use JMS\Serializer\Exclusion\VersionExclusionStrategy;
use JMS\Serializer\Exclusion\GroupsExclusionStrategy;

class GroupsVersionExclusionStrategy implements ExclusionStrategyInterface
{
Expand Down
2 changes: 1 addition & 1 deletion View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function setSerializerGroups($serializerGroups)
/**
* set the serializer callback
*
* function (\FOS\RestBundle\View\ViewHandler $viewHandler, \JMS\SerializerBundle\Serializer\SerializerInterface $serializer) { .. }
* function (\FOS\RestBundle\View\ViewHandler $viewHandler, \JMS\Serializer\SerializerInterface $serializer) { .. }
*
* @param callable $serializerCallback
* @return View
Expand Down
2 changes: 1 addition & 1 deletion View/ViewHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace FOS\RestBundle\View;

use Symfony\Component\HttpFoundation\RedirectResponse;
use JMS\SerializerBundle\Serializer\Serializer;
use JMS\Serializer\Serializer;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\HttpException;
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
},

"require-dev": {
"sensio/framework-extra-bundle": ">=2.0,<2.3-dev",
"symfony/form": ">=2.0,<2.3-dev",
"symfony/yaml": ">=2.0,<2.3-dev",
"symfony/security": ">=2.0,<2.3-dev",
"jms/serializer-bundle": ">=0.9,<=0.10"
"sensio/framework-extra-bundle": ">=2.1,<2.3-dev",
"symfony/form": ">=2.1,<2.3-dev",
"symfony/yaml": ">=2.1,<2.3-dev",
"symfony/security": ">=2.1,<2.3-dev",
"jms/serializer-bundle": "1.0.*"
},

"suggest": {
"sensio/framework-extra-bundle": "Add support for route annotations",
"jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires >=0.9,<=0.10",
"sensio/framework-extra-bundle": "Add support for route annotations and the view response listener",
"jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires 1.0.*",
"symfony/serializer": "Add support for basic serialization capabilities, requires >=2.0,<2.3-dev"
},

Expand All @@ -49,7 +49,7 @@

"extra": {
"branch-alias": {
"dev-master": "0.10.x-dev"
"dev-master": "0.11.x-dev"
}
}
}