-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer.json is replaced when installing magento 2 #1351
Comments
Hi @jamescowie , could you, please, describe your workflow? If you want to add other dependencies before even installing the project, you can use |
Hello, So the workflow Im using is that I create a composer.json file that contains:
It looks like this repository is only useful as the magento community package is loaded from packages.magento.com and not available via packagist and a default instal. Is there an alternative workflow that will mean that I can create a composer.json file that is not replaced ? This is more prominent in our case as we use an automated build tool that "seeds" each project. |
Hi @jamescowie , Let's clarify couple things:
The workflow I'd imagine is the following:
2 . As a result, you'll have a
3 . When you want to update Magento to the newer version, you can either change above version in
4 . As a result, your |
Hello, Thanks for clearing that up. The confusion for me came as I found 3 different repositories that could be used:
However you are correct the workflow should be that when a new Magento project needs to be created a person will run:
Then by either editing the composer.json file or running I tested this by modifying composer.json to revert to the previous version of the beta and behat still remained as well as re upgrading to the latest version. Only issues I found was that I define bin-dir to be
Or it may be an issue that needs to be looked at more within the composer realm. My only other point around this is that we and many people use version control so when we create the project we will add all the project files excluding the vendor directory and others. For Magento 2 this add's all |
@jamescowie , good point about |
This issue should be already fixed. Please reopen if persists. |
- Merge Pull Request magento-engcom/magento2ce#1351 from magento-engcom-team/magento2:batch-29-forwardport-2.3-develop - Merged commits: 1. 70dd5a3 2. 54bc3a1 3. 3debd3f 4. 72c4965 5. e60ecdf 6. 8703b3d 7. bd88ed8 8. 1c70b18 9. 5fd7481 10. 7c61506 11. 2653b8a 12. 917a03f 13. eca73d0 14. 26f3109 15. c223484 16. 3b90ad7 17. ad317c2 18. 53e721c 19. 6114120 20. 63b4839
When using composer to install magento 2 from this repository: https://github.com/magento/magento2-community-edition E.g.
composer create project magento/magento2-community-edition
then there is no way to add dependencies to the project to start with using composer require or require-dev as the composer.json file is replaced with that from the main magento 2 repository.This makes it hard for automated build tools to create the initial project containing Behat and PHPSpec for example. One solution would be to merge the 2 composer.json files into a single file and place in the first repository.
The text was updated successfully, but these errors were encountered: