Closed HYR closed 2 years ago
@HYR Have you found the time so far to check my suggestion from our discussion on Discord in March?
I'm posting it here again for reference in case other users have the same issue:
I've thought about it again and come to the conclusion that it would probably be better in the long run to use the native Composer installer for this use-case of custom install directories: https://github.com/composer/installers#custom-install-paths
It should do exactly what you need without adding complexity to Kirby's installer and also without duplicating the feature. After all, the use-case of "completely custom Composer install paths" is not specific to Kirby.
At the moment you might run into weird issues with Kirby sites once you use the
composer/installers
package. Once any plugin requires that package, it might clash with our installer for other plugins that usegetkirby/composer-installer
. The workaround to fix all the weird issues is to manually delete thevendor
folder inside all plugins insite/plugins
. I've just created a PR to fix this incomposer/installers
, but it will only be merged withcomposer/installers
v2.0 (no idea when that is going to happen): https://github.com/composer/installers/pull/485In the meantime, you could already try
composer/installers
for your use-case to check if it does what you need at all. If not, please get back to me and we'll discuss the options. 🙂
Hey @lukasbestle,
No, I'm sorry, I haven't yet. I'll try to get to it this coming week and report back to you. Thanks!
In the meantime, composer/installers
v2 has been released, so the issue I described above is no longer relevant. Completely custom install paths can be achieved with https://github.com/composer/installers#custom-install-paths now.
Feature Request
Add a new composer package type of
kirby-custom
to allow devs to create plugins that install to custom locations. Combinetype: kirby-custom
with some other property like likecustom-type
... for example:custom-type: theme
orcustom-type: cron
and then allow the site's composer.json file to define where they get installed. That way the plugin developer for the custom type doesn't get full control over where it installs which could become a security risk.Use Case
My current use case is theme development in plugins.
Currently all plugins get installed in
/site/plugins
. I'd like to create my theme plugins and install them to a custom location like/site/themes
to prevent them from being auto loaded. Then load a chosen via a config option at after all other plugins have loaded.This could be useful to Kirby Devs for other purposes as well.
@lukasbestle If you need more context see our direct message on Discord. Thanks!