Closed mbrodala closed 8 years ago
hello @mbrodala sorry for the late reply,
but won't this make all packages, no matter what type they are, go throw LibraryInstaller and would cause faulty behavior?
May be I need to modify the support
function in each installer type, wouldn't that be a better approach?
Faulty behavior can be caused by packages which heavily rely on the default vendor-dir
setup of Composer. But if one uses this package, he should know what he does anyways.
My usecase was pulling in piwik/piwik
as dependency but still install it into a web directory. But since the Composer support of that package isn't that well anyways, I had to go the Git clone route for now.
I think the main problem is people out there are using wrong typed in their composer.json
, piwik/piwik
is using "type":"application"
, which is a not supported type by composer
.
This, my, package's purpose is to provide flexibility for consumers with also preserving the default behavior of the composer
installer.
Let me do some investigations and tests, because I'm curious how will this behave with pear packages or tarred, as from previous experience, they were downloaded but never untarred and I don't want to break the functionality to fix other people miss-using composer
properties.
NB I'm going for vacations for 1 month starting from next week and will be back on 14th of October, so please be patience, if I didn't reply before.
thanks
piwik
should be supported by composer/installers ..
@drAlberT But only Piwik plugins are handled by composer/installers
. (Package type piwik-plugin
.)
@mbrodala you are right ...
@mbrodala
Overriding the support
function for the LibraryInstaller
and always returning true
will cause everything and every package no-matter the type of it, be handled by the LibraryInstaller
and that shouldn't be the case.
For me, that is altering the entire composer
behavior, may be implementing another installer or actually making a pull request to piwik/piwik
to put the correct composer type
.
Also, as per the composer
documentation https://getcomposer.org/doc/04-schema.md#type
The type of the package. It defaults to library.
Package types are used for custom installation logic. If you have a package that needs some special logic, you can define a custom type. This could be a
symfony-bundle
, awordpress-plugin
or atypo3-module
. These types will all be specific to certain projects, and they will need to provide an installer capable of installing packages of that type.
what is your opinion?
@mnsami I agree with your observation that this would have a grave impact. I'll abandon this.
This makes sure not only packages of
"type": "library"
are supported but any type.