Replace Symfony2/Yaml in composer
Is there any specific reason why we need to do:
"symfony/yaml": "2.3.x-dev", in composer.json file ?
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.
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.
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.
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.
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.
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.
Internal ticket: MAGETWO-32346
@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?
Hello. Thanks for the reply. After testing I am happy for this to be closed now..