Publishing when 'composer.json' is not in root of project

72 views
Skip to first unread message

Alex Birch

unread,
Aug 28, 2014, 1:17:34 PM8/28/14
to compos...@googlegroups.com
Hi,

We are trying to publish on Composer a PHP library we just wrote.
For tidyness, all 'composer' content is inside a 'composer/' directory. This has worked well for us so far.

Composer publish expects a 'composer.json' in package root. Naturally our 'composer.json' is not located there.
Is there any way I can publish when the path is 'composer/composer.json'?

The repository in question is here:

https://github.com/billforward/bf-php

Thanks,
-Alex

Christophe COEVOET

unread,
Aug 28, 2014, 1:46:09 PM8/28/14
to compos...@googlegroups.com
Nope. Having the composer metadata at the root is a requirement
(otherwise, loading metadata for a package would require looking at all
possible paths to find the file, and this is an infinite set)

--
Christophe | Stof

Alex Birch

unread,
Aug 28, 2014, 2:26:57 PM8/28/14
to compos...@googlegroups.com
Is there no workaround? For example a symlink? Or telling Composer at publish-time that the .json is not in the usual place?
Reply all
Reply to author
Forward
0 new messages