gremo
gremo

Reputation: 48909

jQuery as Composer dependency, why I'm forced to specify a version?

I want to manage jQuery using Composer.

I've added a custom repository and it's working fine. But why I need to specify a version and how to avoid this? The url will provide always the same stable version available and updating the version number all the time seems useless to me.

{
    "require": {
        "jquery/jquery": "*"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "jquery/jquery",
                "version": "1.9.1",
                "dist": {
                    "url": "http://code.jquery.com/jquery.js",
                    "type": "file"
                }
            }
        }
    ]
}

Upvotes: 0

Views: 656

Answers (2)

Rastko
Rastko

Reputation: 468

Because of that wrong version can break your code, due problem with deprecated functions, feature support or anything feature related.

Upvotes: 0

Ven
Ven

Reputation: 19040

By the way, you can use components/jquery instead of mapping yourself jquery ;).

Upvotes: 3

Related Questions