Symfony2: How to install the dev-master version of Doctrine to resolve the "Erroneous data format for non-serialization" with the composer?

I am trying to fix Doctrine Incorrect data format for unserializing , as indicated here and here .


My composer.json looks like this:

 require: { "symfony/symfony": "~2.5", "doctrine/doctrine-bundle": "~1.2", "doctrine/orm": "dev-master", "...": "..." } 

... but the composer complains that he cannot find the appropriate package:

doctrine / orm dev-master requires the doctrine / dbal> = 2.5-dev, <2.6-dev → no corresponding package was found.

How can I resolve freezes without formatting or raising minimum-stability in composer.json ?

UPDATE: Nifr clause worked, this is a new configuration:

 "symfony/symfony": "~2.5", "doctrine/orm": "dev-master", "doctrine/dbal": "@dev", "doctrine/common": "@dev", "doctrine/doctrine-bundle": "@dev", 
+5
source share
1 answer

You can "white" packages that currently have a lower level of stability than the "global" minimum-stability defined in your composer.json using the stability flags .

To stop the composer from complaining ...

doctrine / orm dev-master requires the doctrine / dbal> = 2.5-dev, <2.6-dev → no corresponding package was found .

... the doctrine / dbal package is simply required explicitly with the @dev stability @dev .

So do ...

 composer require doctrine/dbal:@dev 

... or add the entry to your .json composer manually:

 require: { "...": "...", "doctrine/orm": "dev-master", "doctrine/dbal": "@dev" } 

Repeat this procedure for all dependencies that do not match the global minimum-stability until the composer installs without complaint.


Further reading:

Igor V. has published an excellent article in a blog article explaining the flags of stability in detail.

+6
source

Source: https://habr.com/ru/post/1202593/


All Articles