These are chat archives for composer/composer

13th
Jun 2016
Lennart Fries
@Cruiser13
Jun 13 2016 12:53
Hi all, I'm trying to install software by composer. The software does have a dependency which has some really long paths (too long for windows).That's the reason composer fails. Is there anything I can add into the composer.json so these paths will be excluded from download / install? The pathsa re not needed (at least for me) anyway...
FlyLo11
@FlyLo11
Jun 13 2016 14:30
@Cruiser13 although not a nice solution, but you could reduce the path length by moving your main project closer to root (like C:\myproj). hopefully it should be enough to not hit the limitation
Lennart Fries
@Cruiser13
Jun 13 2016 14:33
@FlyLo11 that's sadly not possible in this special case (intranet project). I read that there is an exclude option: https://getcomposer.org/doc/04-schema.md#archive Would this solve the issue?
FlyLo11
@FlyLo11
Jun 13 2016 14:38
@Cruiser13 i meant to move your main project, the one with vendor/ directory, where you import the dependency
i assume that one is on your local disk, right?
Lennart Fries
@Cruiser13
Jun 13 2016 14:44
@FlyLo11 yes but that project has a lot of dependencies itself so it can not be moved. And even if it's be moved two levels higher to C:\a for example that'd not be small enough.
FlyLo11
@FlyLo11
Jun 13 2016 14:45
got it. to be honest, i'm also curious about a valid solution for this
Lennart Fries
@Cruiser13
Jun 13 2016 14:47
I read that there is an exclude option: https://getcomposer.org/doc/04-schema.md#archive But I can't get it to work (invalid json). Wonder if that'd actually be the solution?
FlyLo11
@FlyLo11
Jun 13 2016 14:51
i might be mistaken, but that setting is only for generating an archive for that project. "exclude" is to tell which directories should not be included in the archive
maybe you could fork the dependency and get rid of those directories. lol
Ben Johnson
@mmic-bjohnson
Jun 13 2016 15:33
@Cruiser13 composer/composer#2497
Are you using PHP < 5.6?
Lennart Fries
@Cruiser13
Jun 13 2016 16:05
@mmic-bjohnson thank you for that information. Yes, I'm running PHP 5.6, the limit is within Windows itself though I think.
Ben Johnson
@mmic-bjohnson
Jun 13 2016 16:10
@Cruiser13 Yeah, I think so, too. I just ran into the same problem with npm on Windows. It's awful. The worst part is that Windows supports much longer file paths, but so many of its API methods don't.