├── tests └── unit │ ├── .gitignore │ ├── config │ ├── .gitignore │ └── main.php │ ├── runtime │ └── .gitignore │ ├── bootstrap.php │ ├── TestCase.php │ └── geoip │ └── MainTest.php ├── .gitignore ├── composer.json ├── phpunit.xml.dist ├── LICENSE ├── README.md ├── HostInfo.php └── composer.lock /tests/unit/.gitignore: -------------------------------------------------------------------------------- 1 | runtime/cache/* -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /vendor 3 | /coverage -------------------------------------------------------------------------------- /tests/unit/config/.gitignore: -------------------------------------------------------------------------------- 1 | main-local.php -------------------------------------------------------------------------------- /tests/unit/runtime/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /tests/unit/config/main.php: -------------------------------------------------------------------------------- 1 | 'testapp', 9 | 'basePath' => realpath(__DIR__ . '/..'), 10 | ]; -------------------------------------------------------------------------------- /tests/unit/bootstrap.php: -------------------------------------------------------------------------------- 1 | =5.4.0", 21 | "ext-geoip": "*", 22 | 23 | "yiisoft/yii2": "2.0.*" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "rmrevin\\yii\\geoip\\": "" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | ./tests 11 | ./vendor 12 | 13 | 14 | 15 | 16 | ./tests/unit/geoip 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Revin Roman Borisovich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | GeoIP helper for Yii2 2 | =============================== 3 | 4 | DEPRECATED 5 | ---------- 6 | This package is no longer supported because MaxMind no longer supports the correct version of the database. 7 | Use official package [geoip2/geoip2](http://maxmind.github.io/GeoIP2-php/). 8 | 9 | Installation 10 | ------------ 11 | Install [`php5-geoip`](http://php.net/manual/ru/geoip.setup.php) extension. 12 | 13 | Add in `composer.json`: 14 | ``` 15 | { 16 | "require": { 17 | "rmrevin/yii2-geoip": "~1.1" 18 | } 19 | } 20 | ``` 21 | 22 | Usage 23 | ----- 24 | In view 25 | ```php 26 | '\rmrevin\yii\geoip\HostInfo', 32 | 'host' => 'phptime.ru', // some host or ip 33 | ]); 34 | 35 | // check available 36 | $Info->isAvailable(); 37 | 38 | // obtaining all data 39 | $Info->getData(); 40 | 41 | // obtaining the individual parameters 42 | $Info->getContinentCode(); // NA 43 | $Info->getCountryCode(); // US 44 | $Info->getCountryCode3(); // USA 45 | $Info->getCountryName(); // United States 46 | $Info->getRegion(); // MI 47 | $Info->getRegionName(); // Michigan 48 | $Info->getCity(); // Southfield 49 | $Info->getPostalCode(); // 48075 50 | $Info->getLatitude(); // 42.465000152588 51 | $Info->getLongitude(); // -83.230697631836 52 | $Info->getDmaCode(); // 505 53 | $Info->getAreaCode(); // 248 54 | $Info->getTimeZone(); // America/New_York 55 | ``` 56 | 57 | FAQ 58 | --- 59 | 60 | __Q__: I get error `Required database not available at /usr/share/GeoIP/GeoIPCity.dat.`. What to do? 61 | 62 | __A__: Download this file (this file [is no more available](https://support.maxmind.com/geolite-legacy-discontinuation-notice/)) http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz and ungzip it into `/usr/share/GeoIP/GeoIPCity.dat` 63 | -------------------------------------------------------------------------------- /tests/unit/TestCase.php: -------------------------------------------------------------------------------- 1 | mock_application(); 25 | } 26 | 27 | /** 28 | * Populates Yii::$app with a new application 29 | * The application will be destroyed on tearDown() automatically. 30 | * @param string $appClass 31 | */ 32 | protected function mock_application($appClass = '\yii\console\Application') 33 | { 34 | // for update self::$params 35 | $this->get_param('id'); 36 | 37 | /** @var \yii\console\Application $app */ 38 | new $appClass(self::$params); 39 | } 40 | 41 | /** 42 | * Returns a test configuration param from /data/config.php 43 | * @param string $name params name 44 | * @param mixed $default default value to use when param is not set. 45 | * @return mixed the value of the configuration param 46 | */ 47 | public function get_param($name, $default = null) 48 | { 49 | if (self::$params === null) { 50 | self::$params = require(__DIR__ . '/config/main.php'); 51 | $main_local = __DIR__ . '/config/main-local.php'; 52 | if (file_exists($main_local)) { 53 | self::$params = ArrayHelper::merge(self::$params, require($main_local)); 54 | } 55 | } 56 | 57 | return isset(self::$params[$name]) ? self::$params[$name] : $default; 58 | } 59 | 60 | protected function tearDown() 61 | { 62 | parent::tearDown(); 63 | } 64 | 65 | /** 66 | * Destroys application in Yii::$app by setting it to null. 67 | */ 68 | protected function destroy_application() 69 | { 70 | \Yii::$app = null; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /tests/unit/geoip/MainTest.php: -------------------------------------------------------------------------------- 1 | getInstance('192.30.252.131'); 21 | $this->assertInstanceOf('\rmrevin\yii\geoip\HostInfo', $Info); 22 | $this->assertTrue($Info->isAvailable()); 23 | $this->assertEquals('192.30.252.131', $Info->host); 24 | $this->assertNotEmpty($Info->getData()); 25 | 26 | $Info = $this->getInstance('127.0.0.1'); 27 | $this->assertFalse($Info->isAvailable()); 28 | $this->assertEquals('127.0.0.1', $Info->host); 29 | $this->assertEmpty($Info->getData()); 30 | } 31 | 32 | public function testData() 33 | { 34 | $Info = $this->getInstance('github.com'); 35 | 36 | $this->assertEquals('NA', $Info->getContinentCode()); 37 | $this->assertEquals('US', $Info->getCountryCode()); 38 | $this->assertEquals('USA', $Info->getCountryCode3()); 39 | $this->assertEquals('United States', $Info->getCountryName()); 40 | $this->assertEquals('CA', $Info->getRegion()); 41 | $this->assertEquals('California', $Info->getRegionName()); 42 | $this->assertEquals('San Francisco', $Info->getCity()); 43 | $this->assertEquals(94107, $Info->getPostalCode()); 44 | $this->assertEquals(37.76969909668, $Info->getLatitude()); 45 | $this->assertEquals(-122.39330291748, $Info->getLongitude()); 46 | $this->assertEquals(807, $Info->getDmaCode()); 47 | $this->assertEquals(415, $Info->getAreaCode()); 48 | $this->assertEquals('America/Los_Angeles', $Info->getTimeZone()); 49 | } 50 | 51 | /** 52 | * @param string|bool $host 53 | * @return \rmrevin\yii\geoip\HostInfo 54 | * @throws \yii\base\InvalidConfigException 55 | */ 56 | private function getInstance($host = false) 57 | { 58 | return \Yii::createObject([ 59 | 'class' => '\rmrevin\yii\geoip\HostInfo', 60 | 'host' => $host, 61 | ]); 62 | } 63 | } -------------------------------------------------------------------------------- /HostInfo.php: -------------------------------------------------------------------------------- 1 | host)) { 34 | $this->host = \Yii::$app->request->userIP; 35 | } 36 | 37 | $this->data = geoip_record_by_name($this->host); 38 | } 39 | 40 | /** 41 | * @return bool 42 | */ 43 | public function isAvailable() 44 | { 45 | return !empty($this->data); 46 | } 47 | 48 | /** 49 | * @param string|bool $key 50 | * @return array|string|bool 51 | */ 52 | public function getData($key = false) 53 | { 54 | return empty($this->data) 55 | ? $this->data 56 | : empty($key) 57 | ? $this->data 58 | : $this->data[$key]; 59 | } 60 | 61 | /** 62 | * @return string|bool 63 | */ 64 | public function getContinentCode() 65 | { 66 | return $this->getData('continent_code'); 67 | } 68 | 69 | /** 70 | * @return string|bool 71 | */ 72 | public function getCountryCode() 73 | { 74 | return $this->getData('country_code'); 75 | } 76 | 77 | /** 78 | * @return string|bool 79 | */ 80 | public function getCountryCode3() 81 | { 82 | return $this->getData('country_code3'); 83 | } 84 | 85 | /** 86 | * @return string|bool 87 | */ 88 | public function getCountryName() 89 | { 90 | return $this->getData('country_name'); 91 | } 92 | 93 | /** 94 | * @return string|bool 95 | */ 96 | public function getRegion() 97 | { 98 | return $this->getData('region'); 99 | } 100 | 101 | /** 102 | * @return string|bool 103 | */ 104 | public function getRegionName() 105 | { 106 | $result = false; 107 | 108 | $country = $this->getCountryCode(); 109 | $region = $this->getRegion(); 110 | 111 | if (!empty($country) && !empty($region)) { 112 | $result = geoip_region_name_by_code($country, $region); 113 | } 114 | 115 | return $result; 116 | } 117 | 118 | /** 119 | * @return string|bool 120 | */ 121 | public function getCity() 122 | { 123 | return $this->getData('city'); 124 | } 125 | 126 | /** 127 | * @return string|bool 128 | */ 129 | public function getPostalCode() 130 | { 131 | return $this->getData('postal_code'); 132 | } 133 | 134 | /** 135 | * @return string|bool 136 | */ 137 | public function getLatitude() 138 | { 139 | return $this->getData('latitude'); 140 | } 141 | 142 | /** 143 | * @return string|bool 144 | */ 145 | public function getLongitude() 146 | { 147 | return $this->getData('longitude'); 148 | } 149 | 150 | /** 151 | * @return string|bool 152 | */ 153 | public function getDmaCode() 154 | { 155 | return $this->getData('dma_code'); 156 | } 157 | 158 | /** 159 | * @return string|bool 160 | */ 161 | public function getAreaCode() 162 | { 163 | return $this->getData('area_code'); 164 | } 165 | 166 | /** 167 | * @return string|bool 168 | */ 169 | public function getTimeZone() 170 | { 171 | $country = $this->getCountryCode(); 172 | $region = $this->getRegion(); 173 | $region = empty($region) ? null : $region; 174 | 175 | return geoip_time_zone_by_country_and_region($country, $region); 176 | } 177 | } -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "05bb4c0e4b8cb8e967c80578412527c2", 8 | "content-hash": "27566aa064701d864a6ac97a06e92641", 9 | "packages": [ 10 | { 11 | "name": "bower-asset/jquery", 12 | "version": "2.2.4", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/jquery/jquery-dist.git", 16 | "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72", 21 | "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72", 22 | "shasum": "" 23 | }, 24 | "type": "bower-asset-library", 25 | "extra": { 26 | "bower-asset-main": "dist/jquery.js", 27 | "bower-asset-ignore": [ 28 | "package.json" 29 | ] 30 | }, 31 | "license": [ 32 | "MIT" 33 | ], 34 | "keywords": [ 35 | "browser", 36 | "javascript", 37 | "jquery", 38 | "library" 39 | ] 40 | }, 41 | { 42 | "name": "bower-asset/jquery.inputmask", 43 | "version": "3.2.7", 44 | "source": { 45 | "type": "git", 46 | "url": "https://github.com/RobinHerbots/jquery.inputmask.git", 47 | "reference": "5a72c563b502b8e05958a524cdfffafe9987be38" 48 | }, 49 | "dist": { 50 | "type": "zip", 51 | "url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38", 52 | "reference": "5a72c563b502b8e05958a524cdfffafe9987be38", 53 | "shasum": "" 54 | }, 55 | "require": { 56 | "bower-asset/jquery": ">=1.7" 57 | }, 58 | "type": "bower-asset-library", 59 | "extra": { 60 | "bower-asset-main": [ 61 | "./dist/inputmask/inputmask.js" 62 | ], 63 | "bower-asset-ignore": [ 64 | "**/*", 65 | "!dist/*", 66 | "!dist/inputmask/*", 67 | "!dist/min/*", 68 | "!dist/min/inputmask/*", 69 | "!extra/bindings/*", 70 | "!extra/dependencyLibs/*", 71 | "!extra/phone-codes/*" 72 | ] 73 | }, 74 | "license": [ 75 | "http://opensource.org/licenses/mit-license.php" 76 | ], 77 | "description": "jquery.inputmask is a jquery plugin which create an input mask.", 78 | "keywords": [ 79 | "form", 80 | "input", 81 | "inputmask", 82 | "jquery", 83 | "mask", 84 | "plugins" 85 | ] 86 | }, 87 | { 88 | "name": "bower-asset/punycode", 89 | "version": "v1.3.2", 90 | "source": { 91 | "type": "git", 92 | "url": "https://github.com/bestiejs/punycode.js.git", 93 | "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" 94 | }, 95 | "dist": { 96 | "type": "zip", 97 | "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", 98 | "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", 99 | "shasum": "" 100 | }, 101 | "type": "bower-asset-library", 102 | "extra": { 103 | "bower-asset-main": "punycode.js", 104 | "bower-asset-ignore": [ 105 | "coverage", 106 | "tests", 107 | ".*", 108 | "component.json", 109 | "Gruntfile.js", 110 | "node_modules", 111 | "package.json" 112 | ] 113 | } 114 | }, 115 | { 116 | "name": "bower-asset/yii2-pjax", 117 | "version": "v2.0.6", 118 | "source": { 119 | "type": "git", 120 | "url": "https://github.com/yiisoft/jquery-pjax.git", 121 | "reference": "60728da6ade5879e807a49ce59ef9a72039b8978" 122 | }, 123 | "dist": { 124 | "type": "zip", 125 | "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978", 126 | "reference": "60728da6ade5879e807a49ce59ef9a72039b8978", 127 | "shasum": "" 128 | }, 129 | "require": { 130 | "bower-asset/jquery": ">=1.8" 131 | }, 132 | "type": "bower-asset-library", 133 | "extra": { 134 | "bower-asset-main": "./jquery.pjax.js", 135 | "bower-asset-ignore": [ 136 | ".travis.yml", 137 | "Gemfile", 138 | "Gemfile.lock", 139 | "CONTRIBUTING.md", 140 | "vendor/", 141 | "script/", 142 | "test/" 143 | ] 144 | }, 145 | "license": [ 146 | "MIT" 147 | ] 148 | }, 149 | { 150 | "name": "cebe/markdown", 151 | "version": "1.1.0", 152 | "source": { 153 | "type": "git", 154 | "url": "https://github.com/cebe/markdown.git", 155 | "reference": "54a2c49de31cc44e864ebf0500a35ef21d0010b2" 156 | }, 157 | "dist": { 158 | "type": "zip", 159 | "url": "https://api.github.com/repos/cebe/markdown/zipball/54a2c49de31cc44e864ebf0500a35ef21d0010b2", 160 | "reference": "54a2c49de31cc44e864ebf0500a35ef21d0010b2", 161 | "shasum": "" 162 | }, 163 | "require": { 164 | "lib-pcre": "*", 165 | "php": ">=5.4.0" 166 | }, 167 | "require-dev": { 168 | "cebe/indent": "*", 169 | "facebook/xhprof": "*@dev", 170 | "phpunit/phpunit": "4.1.*" 171 | }, 172 | "bin": [ 173 | "bin/markdown" 174 | ], 175 | "type": "library", 176 | "extra": { 177 | "branch-alias": { 178 | "dev-master": "1.1.x-dev" 179 | } 180 | }, 181 | "autoload": { 182 | "psr-4": { 183 | "cebe\\markdown\\": "" 184 | } 185 | }, 186 | "notification-url": "https://packagist.org/downloads/", 187 | "license": [ 188 | "MIT" 189 | ], 190 | "authors": [ 191 | { 192 | "name": "Carsten Brandt", 193 | "email": "mail@cebe.cc", 194 | "homepage": "http://cebe.cc/", 195 | "role": "Creator" 196 | } 197 | ], 198 | "description": "A super fast, highly extensible markdown parser for PHP", 199 | "homepage": "https://github.com/cebe/markdown#readme", 200 | "keywords": [ 201 | "extensible", 202 | "fast", 203 | "gfm", 204 | "markdown", 205 | "markdown-extra" 206 | ], 207 | "time": "2015-03-06 05:28:07" 208 | }, 209 | { 210 | "name": "ezyang/htmlpurifier", 211 | "version": "v4.7.0", 212 | "source": { 213 | "type": "git", 214 | "url": "https://github.com/ezyang/htmlpurifier.git", 215 | "reference": "ae1828d955112356f7677c465f94f7deb7d27a40" 216 | }, 217 | "dist": { 218 | "type": "zip", 219 | "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40", 220 | "reference": "ae1828d955112356f7677c465f94f7deb7d27a40", 221 | "shasum": "" 222 | }, 223 | "require": { 224 | "php": ">=5.2" 225 | }, 226 | "type": "library", 227 | "autoload": { 228 | "psr-0": { 229 | "HTMLPurifier": "library/" 230 | }, 231 | "files": [ 232 | "library/HTMLPurifier.composer.php" 233 | ] 234 | }, 235 | "notification-url": "https://packagist.org/downloads/", 236 | "license": [ 237 | "LGPL" 238 | ], 239 | "authors": [ 240 | { 241 | "name": "Edward Z. Yang", 242 | "email": "admin@htmlpurifier.org", 243 | "homepage": "http://ezyang.com" 244 | } 245 | ], 246 | "description": "Standards compliant HTML filter written in PHP", 247 | "homepage": "http://htmlpurifier.org/", 248 | "keywords": [ 249 | "html" 250 | ], 251 | "time": "2015-08-05 01:03:42" 252 | }, 253 | { 254 | "name": "yiisoft/yii2", 255 | "version": "2.0.8", 256 | "source": { 257 | "type": "git", 258 | "url": "https://github.com/yiisoft/yii2-framework.git", 259 | "reference": "53992b136b993e32ca7b6f399cf42b143f8685a6" 260 | }, 261 | "dist": { 262 | "type": "zip", 263 | "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/53992b136b993e32ca7b6f399cf42b143f8685a6", 264 | "reference": "53992b136b993e32ca7b6f399cf42b143f8685a6", 265 | "shasum": "" 266 | }, 267 | "require": { 268 | "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable", 269 | "bower-asset/jquery.inputmask": "~3.2.2", 270 | "bower-asset/punycode": "1.3.*", 271 | "bower-asset/yii2-pjax": "~2.0.1", 272 | "cebe/markdown": "~1.0.0 | ~1.1.0", 273 | "ext-ctype": "*", 274 | "ext-mbstring": "*", 275 | "ezyang/htmlpurifier": "~4.6", 276 | "lib-pcre": "*", 277 | "php": ">=5.4.0", 278 | "yiisoft/yii2-composer": "~2.0.4" 279 | }, 280 | "bin": [ 281 | "yii" 282 | ], 283 | "type": "library", 284 | "extra": { 285 | "branch-alias": { 286 | "dev-master": "2.0.x-dev" 287 | } 288 | }, 289 | "autoload": { 290 | "psr-4": { 291 | "yii\\": "" 292 | } 293 | }, 294 | "notification-url": "https://packagist.org/downloads/", 295 | "license": [ 296 | "BSD-3-Clause" 297 | ], 298 | "authors": [ 299 | { 300 | "name": "Qiang Xue", 301 | "email": "qiang.xue@gmail.com", 302 | "homepage": "http://www.yiiframework.com/", 303 | "role": "Founder and project lead" 304 | }, 305 | { 306 | "name": "Alexander Makarov", 307 | "email": "sam@rmcreative.ru", 308 | "homepage": "http://rmcreative.ru/", 309 | "role": "Core framework development" 310 | }, 311 | { 312 | "name": "Maurizio Domba", 313 | "homepage": "http://mdomba.info/", 314 | "role": "Core framework development" 315 | }, 316 | { 317 | "name": "Carsten Brandt", 318 | "email": "mail@cebe.cc", 319 | "homepage": "http://cebe.cc/", 320 | "role": "Core framework development" 321 | }, 322 | { 323 | "name": "Timur Ruziev", 324 | "email": "resurtm@gmail.com", 325 | "homepage": "http://resurtm.com/", 326 | "role": "Core framework development" 327 | }, 328 | { 329 | "name": "Paul Klimov", 330 | "email": "klimov.paul@gmail.com", 331 | "role": "Core framework development" 332 | }, 333 | { 334 | "name": "Dmitry Naumenko", 335 | "email": "d.naumenko.a@gmail.com", 336 | "role": "Core framework development" 337 | } 338 | ], 339 | "description": "Yii PHP Framework Version 2", 340 | "homepage": "http://www.yiiframework.com/", 341 | "keywords": [ 342 | "framework", 343 | "yii2" 344 | ], 345 | "time": "2016-04-28 14:50:20" 346 | }, 347 | { 348 | "name": "yiisoft/yii2-composer", 349 | "version": "2.0.4", 350 | "source": { 351 | "type": "git", 352 | "url": "https://github.com/yiisoft/yii2-composer.git", 353 | "reference": "7452fd908a5023b8bb5ea1b123a174ca080de464" 354 | }, 355 | "dist": { 356 | "type": "zip", 357 | "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/7452fd908a5023b8bb5ea1b123a174ca080de464", 358 | "reference": "7452fd908a5023b8bb5ea1b123a174ca080de464", 359 | "shasum": "" 360 | }, 361 | "require": { 362 | "composer-plugin-api": "^1.0" 363 | }, 364 | "type": "composer-plugin", 365 | "extra": { 366 | "class": "yii\\composer\\Plugin", 367 | "branch-alias": { 368 | "dev-master": "2.0.x-dev" 369 | } 370 | }, 371 | "autoload": { 372 | "psr-4": { 373 | "yii\\composer\\": "" 374 | } 375 | }, 376 | "notification-url": "https://packagist.org/downloads/", 377 | "license": [ 378 | "BSD-3-Clause" 379 | ], 380 | "authors": [ 381 | { 382 | "name": "Qiang Xue", 383 | "email": "qiang.xue@gmail.com" 384 | } 385 | ], 386 | "description": "The composer plugin for Yii extension installer", 387 | "keywords": [ 388 | "composer", 389 | "extension installer", 390 | "yii2" 391 | ], 392 | "time": "2016-02-06 00:49:24" 393 | } 394 | ], 395 | "packages-dev": [], 396 | "aliases": [], 397 | "minimum-stability": "stable", 398 | "stability-flags": [], 399 | "prefer-stable": false, 400 | "prefer-lowest": false, 401 | "platform": { 402 | "php": ">=5.4.0", 403 | "ext-geoip": "*" 404 | }, 405 | "platform-dev": [] 406 | } 407 | --------------------------------------------------------------------------------