composer with aura and submodule error

53 views
Skip to first unread message

Grummfy

unread,
Dec 16, 2013, 10:57:10 AM12/16/13
to aur...@googlegroups.com
Hello,
I have a project with this composer's configuration
{
    "require":
    {
        "slim/slim": "2.*",
        "aura/sql": "2.0.x-dev",
        "aura/cli": "2.0.x-dev",
        "twig/twig": "1.14.*",
        "twig/extensions": "1.0.*",
        "swiftmailer/swiftmailer": "5.0.*",
        "symfony/translation": "v2.4.0"
    },
    "autoload":
    {
        "psr-0":
        {
            "classmap": ["library/"],
            "Xspecific": "library/",
            "Xspecific\\Entity": "app/Entity/",
            "Xspecific\\Services": "app/Services/"
        }
    },
    "config" :
    {
        "vendor-dir": "library/"
    }
}


I have commit my git repository, but It seems that git is a bit lost on aura dependencies.
When I tried to add library/aura/cli/* I have the following error :
fatal: Path 'library/aura/cli/autoload.php' is in submodule 'library/aura/cli'
This is realy strange (I have no submodule, no .gitsubmodules or .giot/modules file)
Any clue?

Hari K T

unread,
Dec 16, 2013, 9:00:26 PM12/16/13
to aur...@googlegroups.com
Hi,


Hello,
I have a project with this composer's configuration
{
    "require":
    {
        "slim/slim": "2.*",
        "aura/sql": "2.0.x-dev",
        "aura/cli": "2.0.x-dev",
        "twig/twig": "1.14.*",
        "twig/extensions": "1.0.*",
        "swiftmailer/swiftmailer": "5.0.*",
        "symfony/translation": "v2.4.0"
    },
    "autoload":
    {
        "psr-0":
        {
            "classmap": ["library/"],
            "Xspecific": "library/",
            "Xspecific\\Entity": "app/Entity/",
            "Xspecific\\Services": "app/Services/"
        }
    },
    "config" :
    {
        "vendor-dir": "library/"
    }
}


One thing I like to point is don't add vendor directories ( by composer ) to your git commit. That will help you to update the dependencies on server itself.


I have commit my git repository, but It seems that git is a bit lost on aura dependencies.
When I tried to add library/aura/cli/* I have the following error :
fatal: Path 'library/aura/cli/autoload.php' is in submodule 'library/aura/cli'

I am not sure why this happens though. One reason probably may be for when you look at

ls -la library/aura/cli

You can see a .git repo . What ever composer installed will be having a .git in the specific folder. It can also be in twig I assume.
 
This is realy strange (I have no submodule, no .gitsubmodules or .giot/modules file)
Any clue?

Probably remove the .git folder inside the aura/cli/.git , aura/sql/.git .

Let me know if that helps!

Hari K T

You can ring me : +91 9388 75 8821

Skype  : kthari85
Twitter : harikt

Grummfy

unread,
Dec 17, 2013, 3:33:22 AM12/17/13
to aur...@googlegroups.com
Indeed removing .git files in composer works perfectly. Have any clue on why composer add .git files in the directory (and don't do any cache on aura project) ?

Thanks

Hari K T

unread,
Dec 17, 2013, 3:53:46 AM12/17/13
to aur...@googlegroups.com
no idea :-( .

May be you can get some help from composer user group.

Hari K T

You can ring me : +91 9388 75 8821

Skype  : kthari85
Twitter : harikt


--
You received this message because you are subscribed to the Google Groups "The Aura Project for PHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to auraphp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Grummfy

unread,
Jan 15, 2014, 3:36:33 AM1/15/14
to aur...@googlegroups.com
Just for info,
since I change to this definition :
{
    "require":
    {
        "aura/sql": "2.*@beta",
        "aura/cli": "2.*@beta",
    },
    "config" :
    {
        "vendor-dir": "library/"
    }
}

(using @beta instead of @dev)
I have no more issue.

Hari K T

unread,
Jan 15, 2014, 3:48:40 AM1/15/14
to aur...@googlegroups.com
Good to hear.

Hari K T

You can ring me : +91 9388 75 8821

Skype  : kthari85
Twitter : harikt


Grummfy

unread,
Feb 12, 2014, 8:07:02 AM2/12/14
to aur...@googlegroups.com
Hello,
just to let people understand I have the answer :
https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md

aura/cli is tagged => no problem
aura/di is not tagged => the same error as evoked here.


Hope it helps other people.
Reply all
Reply to author
Forward
0 new messages