简体   繁体   中英

Symfony bower vesionized packages

Official symfony2 documentatation writes:

Bower currently does not have a "lock" feature, which means that there's no guarantee that running bower install on a different server will give you the exact assets that you have on other machines. For more details, read the article Checking in front-end dependencies.

But we can init bower.json and in that file we have dependencies with precized version like

#bower.json
"dependencies": {
    "html5shiv": "3.7.1",
    "bootstrap-sass-official": "3.3.0",
}

So if i use bower install it should install precized version of packages. I dont understand so for what bower.lock is neeeded ?

Symfony website warns you about this situation.

For example there is lock file in composer so in that way when you define php dependency in composer.json like as following.

"require": {
    "php": ">=5.3.3",
}

It means php version should be at least 5.3.3 or above.

In this situation lock file is important to make server's synced.

But in your requirements there is no need to wonder about. Because you defined spesific minor version '3.3.0' without any operator like '~' so no worries if you are using exact versions.

But then, if your vendors doesn't follow semantic versioning exactly then there may be a sync problem again. For instance : If any changes change tagged version while you are deploying. But it is so rare case you shouldn't worry about it too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM