-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
I've made some research how to decrease linking customisation.
Composer already support linking but it makes us add the repositories section into each package and handle it in the right way if we use or not yii-dev-tool. So basically we can create a plugin that will add the repositories section at runtime and link packages if they are present locally.
I've developed this plugin and it works easy:
- At installation step it collects each packages that the
composer.jsoncontains in addition to they versions. - Registers "in-memory repository" that will provide that packages, but refer to their local versions.
The rest process is the same as we added the repositories section into composer.json.
The installation process is also easy:
composer req yiisoft/yii-dev-tool-installer. It's is not registered in packagist.org and you may face with error.- Allow it in
composer.jsonconfig.allow-pluginssection:"config": { "allow-plugins": { "yiisoft/yii-dev-tool-installer": true } }
Here is the plugin: https://github.com/xepozz/yii-dev-tool-installer/blob/master/src/InstallerPlugin.php.
Advantages:
- It works better that our mechanism of linking packages
- It works faster because of the overhead as linking packages after downloading originals
- It follows all package installations' instructions and also autoloading processes.
@yiisoft/yii3 I'd like to hear your opinions.
Reactions are currently unavailable