Skip to content

Commit

Permalink
allow installing jQuery 1.10 for IE support
Browse files Browse the repository at this point in the history
fixes #1905
  • Loading branch information
cebe committed Jan 21, 2014
1 parent ca816ad commit f112cc6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -73,7 +73,7 @@
"ext-mbstring": "*",
"lib-pcre": "*",
"yiisoft/yii2-composer": "*",
"yiisoft/jquery": "2.0.*",
"yiisoft/jquery": "~2.0 | ~1.10",
"phpspec/php-diff": ">=1.0.2",
"ezyang/htmlpurifier": "4.6.*",
"michelf/php-markdown": "1.3.*"
Expand Down
21 changes: 20 additions & 1 deletion docs/guide/composer.md
Expand Up @@ -24,7 +24,7 @@ Adding more packages to your project
The act of [installing a Yii application](installation.md) creates the `composer.json` file in the root directory of your project.
In this file you list the packages that your application requires. For Yii sites, the most important part of the file is the `require` section:

```
```json
{
"require": {
"Michelf/php-markdown": ">=1.3",
Expand Down Expand Up @@ -63,6 +63,25 @@ In both cases, after some waiting, the required packages will be installed and r
No additional configuration of those packages will be required.


Using a specifc version of a package
------------------------------------

Yii always comes with the latest version of a required library that it is compatible with but allows you to use an
older version if you need to.
A good example for this is jQuery which has [dropped old IE browser support](http://jquery.com/browser-support/) in version 2.x.
When installing Yii via composer the installed jQuery version will be the latest 2.x release. When you want to use jQuery 1.10
because of IE browser support you can adjust your composer.json by requiring a specific version of jQuery like this:

```json
{
"require": {
...
"yiisoft/jquery": "1.10.*"
}
}
```


FAQ
---

Expand Down
2 changes: 1 addition & 1 deletion framework/composer.json
Expand Up @@ -53,7 +53,7 @@
"ext-mbstring": "*",
"lib-pcre": "*",
"yiisoft/yii2-composer": "*",
"yiisoft/jquery": "2.0.*",
"yiisoft/jquery": "~2.0 | ~1.10",
"phpspec/php-diff": ">=1.0.2",
"ezyang/htmlpurifier": "4.6.*",
"michelf/php-markdown": "1.3.*"
Expand Down

0 comments on commit f112cc6

Please sign in to comment.