schmittjoh / JMSSerializerBundle

Easily serialize, and deserialize data of any complexity (supports XML, JSON, YAML)
http://jmsyst.com/bundles/JMSSerializerBundle
MIT License
1.8k stars 313 forks source link

Error on last composer update : jms/serializer lib removed ! #295

Closed FredoVelcro-zz closed 11 years ago

FredoVelcro-zz commented 11 years ago

When i ran "composer update" this morning, i saw this:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing jms/metadata (1.2.0-RC)
  - Installing jms/metadata (1.3.0)
    Loading from cache

  - Installing pimple/pimple (v1.0.2)
    Downloading: 100%

  - Installing silex/silex (v1.0.0)
    Downloading: 100%

  - Installing henrikbjorn/flint (1.2.0)
    Downloading: 100%

  - Installing henrikbjorn/bernard (0.3.0)
    Downloading: 100%

  - Installing henrikbjorn/bernard-service-provider (0.2.1)
    Downloading: 100%

  - Removing jms/serializer (0.11.0)
  - Installing henrikbjorn/juno (0.4.0)
    Downloading: 100%

  - Installing predis/predis (v0.8.3)
    Downloading: 100%

  - Installing predis/service-provider (v0.4.1)
    Downloading: 100%

  - Removing phpcollection/phpcollection (0.2.0)
henrikbjorn/bernard suggests installing ext-redis (Native redis extension for php if you want to use PhpRedisConnection)
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
Writing lock file
Generating autoload files

  [ReflectionException]
  Class JMS\Serializer\EventDispatcher\Subscriber\DoctrineProxySubscriber does not exist

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

  [RuntimeException]
  An error occurred when executing the "'cache:clear --no-warmup'" command.

What's happening ??

NB : i use Symfony 2.2 and in my composer.json : "jms/serializer-bundle": "*"

wpottier commented 11 years ago

Same error for me...

skroczek commented 11 years ago

Same here …

ghost commented 11 years ago

Same for me 0.9 version works

skroczek commented 11 years ago

henrikbjorn/juno (0.4.0) replace jms/serializer: * so jms/serializer-bundle < 0.10 works, because it does not require jms/serializer (lib)

But where henrikbjorn/juno is coming from?

schmittjoh commented 11 years ago

Closing as this is not related to this repository.

FredoVelcro-zz commented 11 years ago

Sorry but in master branch, there is still a dependency with jms/serializer :

"require": {
        "php": ">=5.3.2",
        "jms/serializer": ">=0.11.0,<0.13-dev",
        "symfony/framework-bundle": ">=2.1,<3.0-dev",
        "jms/di-extra-bundle": "~1.3@alpha"
    },
schmittjoh commented 11 years ago

This is apparently caused by https://github.com/henrikbjorn/juno

If you somehow require this package either directly or indirectly, this might remove jms/serializer.

ghost commented 11 years ago

Find a solution : Add repository in your repositories section of your root composer.json : { "type" : "vcs", "url" : "https://github.com/schmittjoh/serializer.git" } Next add to require : "jms/serializer": "0.11.0" Then clean your composer cache (~/.composer/cache/), your vendors and composer.lock

This probably override packagist parameters for jms/serializer. This works for me (temporarly)

Edit : This works only if dependencies are installer via "composer update" instead of "composer install" .... Strange

FredoVelcro-zz commented 11 years ago

How to know which package depends on "henrikbjorn/juno" ? my composer.json :

    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",

        "elao/web-profiler-extra-bundle":       "dev-master",
        "doctrine/doctrine-fixtures-bundle":    "dev-master",
        "doctrine/data-fixtures" : "dev-master",
        "friendsofsymfony/user-bundle": "*",
        "friendsofsymfony/jsrouting-bundle": "1.1.*",
        "coresphere/console-bundle": "dev-master",
        "mopa/bootstrap-bundle": "2.1.*@dev",
        "hwi/oauth-bundle": "*",
        "jms/serializer-bundle": "*"
    }
ghost commented 11 years ago

it's the jms/serializer-bundle which depends of jms/serializer (normal) But the developer of https://github.com/henrikbjorn/juno has set "replace": { "jms/serializer" : "*" } in the composer.json file. With this composer replace all version of the serializer library with the package from henrikbjorn. This is a dangerous features, hope packagist will remove it.

The trick i proposed seems to solve the problem... it's ugly but it works.

FredoVelcro-zz commented 11 years ago

OK, but where does "juno" come from ? who require it ???

ghost commented 11 years ago

jms/serializer-bundle require jms/serializer. And when you require jms/serializer, composer require henrikbjorn/juno for you because packagist tell it that henrikbjorn/juno replace jms/serializer. That's the problem.

The owner of the lib fix the problem, the issue is solved now.