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

Already on GitHub? Sign in to your account

stable release and JMSSerializerBundle #330

Closed
lsmith77 opened this Issue Dec 1, 2012 · 20 comments

Comments

Projects
None yet
5 participants
Owner

lsmith77 commented Dec 1, 2012

so JMSSerializerBundle finally extracted the serializer part. this results in a bunch of classes changing their namespace. it would likely be possible to do some BC hacks to maintain compatibility, but i wonder if this isnt the right moment to just declare the current state as the stable release compatible with Symfony 2.1.

then start working on a 2.x release in master with the new JMSSerializerBundle and serializer component.

Contributor

schmittjoh commented Dec 1, 2012

If you plan to make a stable release, I'd depend on version 0.9 of the serializer bundle.

0.10 is fairly new and untested, I've just added it to give people a bit more time to upgrade, but I don't plan to make any bug fixes in there.

Owner

willdurand commented Dec 1, 2012

What about releasing 1.0.0 with JMS 0.9, and then start a new minor version (aka 1.1.0).

According to semver:

[Minor version] MAY be incremented if substantial new functionality or improvements are introduced within the private code.

Because if we don't introduce BC breaks on the public API, no need to start 2.0.0 IMO.

Owner

lsmith77 commented Dec 1, 2012

hmm you have a point there. not really sure what the philosophy is there. the Bundle will then no longer work with any version before 1.0 which in turn means that users using Annotation mapping will need to update their mappings. then again i guess those using other mapping formats should not need to change anything unless they also have custom handlers etc.

pulse00 commented Dec 3, 2012

just because i'm a little confused by the latest changes: is it possible to use the current master branch of the fosrestbundle with jms serializer bundle 1.0.* ?

Owner

lsmith77 commented Dec 3, 2012

no .. the latest supported version is 0.10, which includes the event related changes, but not the separation of the JMS Serializer. now supporting 1.0 is actually quite easy and i guess i will make a new branch asap that does. the question is however how to proceed from here.

i can of course just do the changes and increase the minor version of this Bundle .. or should we just tag the current state as stable .. and then follow up with 1.1-dev or 2.0-dev ..

Owner

lsmith77 commented Dec 3, 2012

here you go #332

pulse00 commented Dec 3, 2012

great, thanks.

@lsmith77 lsmith77 referenced this issue in nelmio/NelmioApiDocBundle Dec 3, 2012

Merged

JMSSerializerBundle 1.0 compatibility #106

Owner

lsmith77 commented Dec 3, 2012

just realized that JMSSerializerBundle 1.0 is no longer compatible with 2.0

pulse00 commented Dec 3, 2012

@lsmith77 2.0 is the current master? i can't find a branch/tag with version 2.0.

Contributor

schmittjoh commented Dec 3, 2012

@lsmith77, JMSSerializerBundle 0.10 is also not compatible with Symfony 2.0, only JMSSerializerBundle 0.9 is.

Owner

lsmith77 commented Dec 3, 2012

@pulse00 2.0 of what? I seem to have confused you. hopefully @schmittjoh's answer has cleared things up.

pulse00 commented Dec 3, 2012

@lsmith77 yep, i was confused ;) nevermind.

pulse00 commented Dec 3, 2012

i'm currently trying to upgrade our setup to #332. To satisfy composer with the changes, we needed to change the following dependencies:

  • jms/security-extra-bundle from 1.2.x-dev to 1.*
  • jms/di-extra-bundle from 1.1.* to 1.3.x-dev

after adding jms/serializer-bundle manually with version set to 1.0.*.

After renaming all namespaces to the standalone jms/serializer component and the serializer service to jms_serializer, we're getting the following exception:

Catchable Fatal Error: Argument 1 passed to JMS\SecurityExtraBundle\Security\Authorization\RememberingAccessDecisionManager::__construct() must implement interface Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface, array given

I'll try to find the reason for this BC break and let you know how we managed it to upgrade to the latest changes, however if someone could push me in the right direction, i'd be grateful.

Contributor

mvrhov commented Dec 4, 2012

Does setting the "jms/security-extra-bundle": "dev-master", help. AFAIR I've done just that the last time I had a dependency hell problem.
P.S I've not set any version for jms/di-extra-bundle the composer resolved this just fine from other dependencies...

pulse00 commented Dec 4, 2012

@mvrhov thanks for the tip, i've run into another upgrade problem which was related to the order of registering the security bundles with the latest security-bundle version (see my previous comment). The SecurityExtraBundle must be registered after the SecurityBundle. Anyway, here's the fos-rest / jms related composer setup that works for us now in case anyone else runs into the same upgrade troubles:

        "friendsofsymfony/rest-bundle": "dev-jms_serlializer_1_0",
        "jms/serializer-bundle": "1.0.*",
        "jms/security-extra-bundle": "1.4.x-dev",
        "jms/di-extra-bundle": "1.3.x-dev",

Owner

lsmith77 commented Dec 4, 2012

so the topic is essentially:

  1. tag the current state as a 0.10.0 dev release, continue in dev mode (ie. 0.11-dev) requiring JMSSerializerBundle 1.0 (meaning when using JMSSerializerBundle, then Symfony2.0 is no longer supported in 0.11-dev/dev-master)
  2. tag the current state as a stable release with minimal support (no new features, bug fixes only)
    a) switch to JMSSerializerBundle 1.0 for FOSRestBundle 1.1-dev (meaning when using JMSSerializerBundle, then Symfony2.0 is no longer supported in 1.1-dev/dev-master)
    b) switch to JMSSerializerBundle 1.0 for FOSRestBundle 2.0-dev (meaning when using JMSSerializerBundle, then Symfony2.0 is no longer supported in 2.0-dev/dev-master)

pulse00 commented Dec 4, 2012

So for anyone who used dev-master of the fos-rest-bundle, upgrading simply means search/replace the new jms namespaces and some changes to composer.json. Anyone who used fosrestbundle with 0.9 of the jms serializer must simply use the stable release of fosrestbundle.

Sounds good to me. I'd recommend to add some notes about the upgrade mechanism, as you can easily waste time in dependency hell during the upgrade process.

Owner

lsmith77 commented Dec 4, 2012

for most people they will not even have to change any of their code to work with JMSSerializerBundle 1.0. the only need to change anything is if someone has implemented some customization into the serializer, as long as the project is already running Symfony2.1 ..

for the dependencies it seems like the job is more on the end of the JMS bundles

Contributor

schmittjoh commented Dec 4, 2012

I'd go for 1).

Owner

lsmith77 commented Dec 5, 2012

ok went with 1)

@lsmith77 lsmith77 closed this Dec 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment