Closed pelmennoteam closed 7 years ago
Please make tests (with 100% coverage) and respect the coding format with php-cs-fixer.
After I see that this is a specific server using a non-secure URL, which is a problem. Furthermore, it is better to have a generic system. As it stands, I cannot merge this PR.
You mean that this plugin can't use an external cache server?
No, I say that the implementation in the plugin should be generic, allowing to configure a cache (with composer.phar global config --editor
), and adding a dependency to this cache (with composer.phar global require assagist/composer-asset-plugin-cache
). Currently, your proposal to add a 'hard coding' cache directly in in the plugin is not correct.
I think we should have an interface in the plugin allowing to implement any type of cache.
Use of a cache server can be enabled or disabled via composer config --global --editor
{
"config": {
"assagist-cache-use": false
}
}
It is not necessary for creating another plugin only for a cache (as i can understand you). But i agree with you. I'll try to implement 'a more generic system' soon.
I've made some changes. Can you merge this PR?
I will see this PR tomorrow.
Ok. Thanks!
Can you create a new PR for the doc, thanks.
Thanks to rebase your PR for keep only one commit.
Ok. I'll do it tonight.
Done
Thanks to create the doc for build a package cache in a new PR. I will do some modification to comply to PSR-1 and PSR-2. Otherwise, at first glance, it's ok for me.
Do you think to have the time to make changes quickly? I will soon freeze the features for the version 1.2
.
What changes I need to do?
Concerning downloads (not API requests and dependency resolution) we use this plugin with great success: https://github.com/hirak/prestissimo
@pelmennoteam I close this PR because the changes are still not present, and the use of the Prestissimo Composer plugin allows a non-negligible gain of performance.
Due to the fact that I have to work with a large number of projects using Yii, and use of this plugin is a part of the deployment of the platform, waiting for the end of downloading all packages may take up to 40 minutes (bower uses github api and each time requests all pages with tags, eg package "bower-asset/angular" requests approximately 30 pages).
This service caches information about the packages and gives the already formed
json
file that accelerates project update.You can specify your own cache server (http://source.0daysolution.ru/open-source/assagist) for each package type (npm or bower) using the config (default:
http://assagist.0daysolution.ru/packages/{bower,npm}/%package%
):Also you can enable/disable use of cache server (default: false):