Skip to content
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 Integration and project specific moduls? #1342

tobi-pb opened this issue Jun 5, 2015 · 5 comments


None yet
5 participants
Copy link

commented Jun 5, 2015

In our magento-1 project wie are using composer to install external dependencies (magento-core, germansetup, some extensions). Customer specific stuff is locacted in src/"Modulename".

This opens up possiblity to have composer.lock + composer.json and customer specfic extensions or themes in same git repository.

As I unterstand current composer integration i have to create minimum 2 repositories for each magento customer? first contains composer.json + composer.json ONLY, second contains all other customer specfic stuff. Do I have this right?

In case I got it right: Could we implement a solution to use one repo?


This comment has been minimized.

Copy link

commented Jun 6, 2015

We are not prescribing how people use Git.

One approach is to use composer to download external dependencies then Git commit everything (including external dependencies). You could call this the paranoid pattern.

Another is to gitignore external dependencies (there is work to keep them under vendor/ so this is a single directory).

You can certainly put local modules in same Git repo as composer.json file - just add the custom code dependencies to root composer. Json file


This comment has been minimized.

Copy link

commented Jun 6, 2015

Mh, I am not sure I have explained my problem exactly.

As an ageny we are supporting more than one shop and i like to have one GIT Repo with magento core packages. All shops are depending on this core repository.

So I created a new project using

composer create-project magento/product-community-edition magento2 -s dev --prefer-dist

In this case i got a new project including a lot of php files which i NEVER NEVER allowed to change in my project:


All this files are supplied from dependecy magento/product-community-edition, isn't it?
So i desided to add them to gitignore - excluding composer.json and composer.lock.

I provide that in my GIT Repo at

At next I tried to create a new clone of this repo.

git clone .

And installed:

composer install

Great job, everything works fine.

So, may we could cleanup a little bit?

I think we have to add following files to .gitignore because they exists in vendor as well as in root dir:


Alternative we could add

      "magento-root-dir": "mage"

to composer.json add only add mage to .gitignore - sounds a little bit cleaner.

Thanks for reading ;)



This comment has been minimized.

Copy link

commented Jun 6, 2015

In an agency, you would have only one git repositorie per customer, the composer.json you have would look something like this:


    "repositories": [
            "type": "composer",
            "url": ""
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "magento/product-community-edition": "0.74.0-beta12"
        "magento-root-dir": "build/"

!!!! _caution, thats currently a lot of packages, and some big ones, so download can be slow._!!

if everything is cached by composer, this needs around 60 seconds.

Your customer specific modules/code could then be placed in an extra directory lice src.

note: this way to install is not finished yet and I assume will need some months, as supporting/documenting it, would make debugging core issues a lot harder as long as the core gets regular changes.

But thats only what I would expect, I have no idea about the real plans regarding this :)

[UPDATE] have tested it a bit and updated extra and hint about download time


This comment has been minimized.

Copy link

commented Jun 6, 2015

Thanks @Flyingmana, I allready got it, testet it and I find some improvements :)

Custom directory like "src" would be great but it is not supported at the moment (as you said) and it its not clear that your code would be merged to the official magento composer fork isn't it? So let us focus and discuss a simple solution together with magento.

Would be great to use that in our first magento 2 projects :-)


@tobi-pb tobi-pb changed the title Composer Integration? Composer Integration and project spefific moduls? Jun 7, 2015

@tobi-pb tobi-pb changed the title Composer Integration and project spefific moduls? Composer Integration and project specific moduls? Jun 7, 2015


This comment has been minimized.

Copy link

commented Jun 7, 2015

As @Flyingmana told me "src"-problem is solved when #1206 is merged. So .gitignore default values are open here only :)

@maksek maksek closed this May 9, 2016

magento-team pushed a commit that referenced this issue Jul 19, 2017

Merge pull request #1342 from magento-firedrakes/MAGETWO-64120
Fixed issues:
- MAGETWO-64120 Error processing your request when placing reorder for simple product of configurable if attribute is changed

magento-engcom-team pushed a commit that referenced this issue Feb 8, 2018

MAGETWO-87531: [EngCom Team] Batch 27. Forwardports to 2.3-develop #1342

 - Merge Pull Request magento-engcom/magento2ce#1342 from magento-engcom-team/magento2:batch-27-forwardport-2.3-develop
 - Merged commits:
   1. aa93f83
   2. 0b76fcd
   3. be77fdd
   4. 4bad8be
   5. 59e1020
   6. ef63b3a
   7. a278aaf
   8. f7c00d7
   9. f1ecb11
   10. 74aabb4
   11. 1d66e5e
   12. dc4977d
   13. 99f982c
   14. 76c4f0d
   15. 9e2cc5e
   16. 82d488b

magento-engcom-team pushed a commit that referenced this issue Feb 8, 2018

VitaliyBoyko pushed a commit to VitaliyBoyko/magento2 that referenced this issue Jun 22, 2018

Merge pull request magento#1342 from magespecialist/fix_issue_1339
Fix issue magento#1339 - \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.