magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Replace Symfony2/Yaml in composer

Open jamescowie opened this issue 11 years ago • 9 comments

Is there any specific reason why we need to do:

"symfony/yaml": "2.3.x-dev", in composer.json file ?

jamescowie avatar Dec 24 '14 22:12 jamescowie

No reason. It had to be removed together with the library. Thanks for reporting this issue, we'll work on cleanup of composer.json file.

buskamuza avatar Dec 24 '14 22:12 buskamuza

The reason was

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

  Problem 1
    - Installation request for phpunit/phpunit 4.1.0 -> satisfiable by phpunit/phpunit[4.1.0].
    - phpunit/phpunit 4.1.0 requires symfony/yaml ~2.0 -> no matching package found.

It can be avoided by composer.lock added to repository.

orlangur avatar Dec 25 '14 09:12 orlangur

Is adding the composer.lock file part of the roadmap for a future release ? Im working on MageSpec and this relies on having symfony/yaml available to read the configuration file.

jamescowie avatar Dec 25 '14 21:12 jamescowie

composer.lock will appear in regular weekly update. It will fully correspond to root composer.json. With some of next updates to fix issue you mentioned symfony/yaml will be removed from both files as this component is not used in M2 currently.

To have symfony/yaml available for your project, just specify it as a requirement instead of relying on M2 dependency.

orlangur avatar Dec 26 '14 11:12 orlangur

symfony/yaml is specified in replace section, so Composer will assume that it's already included in Magento project and "specifying it as a requirement" will not help. The task of fixing composer.json is currently in progress, so it should be in the public GitHub with one of the next updates.

composer.lock is already present in the repository.

buskamuza avatar Dec 27 '14 03:12 buskamuza

Thanks for the replies all. MageSpec / PHPSpec has symfony/yaml set as a dependency but because of the Magento2 composer replace flag this is removed resulting in the class not found error.

It looks like you have it in hand with adding the composer.lock file. For the time being I have removed the replace in my branch so I can continue working on PHPSpec for Magento 2. When the next push is made I will revert this change and re test.

jamescowie avatar Dec 27 '14 19:12 jamescowie

Internal ticket: MAGETWO-32346

verklov avatar Jan 05 '15 15:01 verklov

@jamescowie, changes in the source code according issue you placed are already published and available from 0.42.0-beta5. Are you OK with that? Can we close this issue?

vpelipenko avatar Jan 29 '15 14:01 vpelipenko

Hello. Thanks for the reply. After testing I am happy for this to be closed now..

jamescowie avatar Jan 29 '15 20:01 jamescowie