php - Composer packages, specifying package root -
perhaps i've missed basic (hopefully) can't quite figure out.
i have pair of php projects, each initialized git repo/composer package; foobar/package-a
depends on foobar/package-b
.
packagea
structured follows:
packageb +- src | +- packageb | +- namespace1 | | +- <files> | +- namespace2 | | +- <files> | +- namespace3 | +- <files> +- docs +- other +- things
packagea
structured similarly:
packagea +- src | +- packagea | +- <files> +- vendor +- <files>
anyway, i'm targeting package-b
dependency package-a
, using local git repository.
# packagea's composer.json "require": { "foobar/package-b": "dev-master" }, "repositories": [ { "type": "vcs", "url": "path/to/foobar/packageb" } ]
however, package-b
's side, wish expose under /src/packageb
, excluding /docs
, , /other
, /things
.
i surprised larn there isn't package-root
key in composer schema, indicate i'd dependent projects pull directory:
# hypothetical in packageb's composer.json "package-root": "/src/packageb"
is there way using composer indicate consumers files located somewhere other package's root directory?
currently, i'm ending everything packageb
root (/src
, /docs
, etc.) in vendor
directory of packagea
.
exclude
key, though i'm looking re-root bundle , not ignore other directories. moreover, i'm not sure if that'd apply here anyway. php directory composer-php
No comments:
Post a Comment