Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[WIP] JMSSerializerBundle 1.0 compatibility #332

Merged
merged 1 commit into from

2 participants

@lsmith77
Owner

before merging we need to figure out how we want to handle this break #330

@pulse00

fyi: this doesn't seem to be compatible with 2.1, i've created a fork of the 2.1 branch and added the fos-rest-bundle / jms-serializer-bundle: https://github.com/pulse00/symfony-standard/blob/2.1/composer.json

Installing dependencies ends with the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install jms/di-extra-bundle 1.1.x-dev
    - Installation request for jms/serializer-bundle 1.0.* -> satisfiable by jms/serializer-bundle 1.0.x-dev.
    - Conclusion: don't install jms/di-extra-bundle 1.1.1
    - Conclusion: don't install jms/di-extra-bundle 1.1.0
    - jms/serializer-bundle 1.0.x-dev requires jms/di-extra-bundle >=1.3 -> satisfiable by jms/di-extra-bundle dev-master, jms/di-extra-bundle 1.3.x-dev.
    - Can only install one of: jms/di-extra-bundle dev-master, jms/di-extra-bundle 1.1.0-RC.
    - Can only install one of: jms/di-extra-bundle 1.3.x-dev, jms/di-extra-bundle 1.1.0-RC.
    - Installation request for jms/di-extra-bundle 1.1.* -> satisfiable by jms/di-extra-bundle 1.1.0, jms/di-extra-bundle 1.1.0-RC, jms/di-extra-bundle 1.1.1, jms/di-extra-bundle 1.1.x-dev.
@lsmith77
Owner

it is compatible with 2.1 .. we have functional tests in there to proof it :)
you just need to increase your dependencies to the other JMS Bundles.

@pulse00

yeah, that's somewhat not that easy, see #330 (comment) ;)

@pulse00

@lsmith77 yep, i can confirm that it works with 2.1 if the jms dependencies are set correctly: #330 (comment)

@lsmith77 lsmith77 merged commit fc92b76 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2012
  1. @lsmith77
This page is out of date. Refresh to see the latest.
View
1  .travis.yml
@@ -5,7 +5,6 @@ php:
- 5.4
env:
- - SYMFONY_VERSION=2.0.*
- SYMFONY_VERSION=2.1.*
- SYMFONY_VERSION=dev-master
View
2  Tests/View/ViewHandlerTest.php
@@ -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();
View
4 UPGRADING.md
@@ -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.
View
10 View/GroupsVersionExclusionStrategy.php
@@ -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
{
View
2  View/View.php
@@ -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
View
2  View/ViewHandler.php
@@ -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;
View
16 composer.json
@@ -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"
},
@@ -49,7 +49,7 @@
"extra": {
"branch-alias": {
- "dev-master": "0.10.x-dev"
+ "dev-master": "0.11.x-dev"
}
}
}
Something went wrong with that request. Please try again.