├── LICENSE ├── README.md ├── composer.json ├── composer.lock └── src ├── ActiveForm.php └── AjaxFormAsset.php /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 lichunqiang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 |

Yii2 Ajax Form

6 |
7 |

8 | 9 | [![Build Status](https://img.shields.io/travis/lichunqiang/yii2-ajaxform.svg?style=flat-square)](http://travis-ci.org/lichunqiang/yii2-ajaxform) 10 | [![version](https://img.shields.io/packagist/v/light/yii2-ajaxform.svg?style=flat-square)](https://packagist.org/packages/light/yii2-ajaxform) 11 | [![Download](https://img.shields.io/packagist/dt/light/yii2-ajaxform.svg?style=flat-square)](https://packagist.org/packages/light/yii2-ajaxform) 12 | [![Issues](https://img.shields.io/github/issues/lichunqiang/yii2-ajaxform.svg?style=flat-square)](https://github.com/lichunqiang/yii2-ajaxform/issues) 13 | 14 | 15 | ## Overview 16 | 17 | Using `jquery.form` to make `ActiveForm` has ability to submit via ajax but not fullpage reload. 18 | 19 | ## Install 20 | 21 | Using composer: 22 | 23 | ``` 24 | $ composer require light/yii2-ajaxform=* 25 | ``` 26 | 27 | ## Usage 28 | 29 | ```php 30 | use light\widgets\ActiveForm; 31 | use yii\web\JsExpression; 32 | 33 | ActiveForm::begin([ 34 | 'ajaxSubmitOptions' => [ 35 | 'success' => new JsExpression('function(response) {console.log(response)}'), 36 | 'complete' => new JsExpression('function() {console.log("request completed.")}') 37 | ] 38 | ]) 39 | 40 | ``` 41 | 42 | ### Options 43 | 44 | * Default enabled `enableAjaxSubmit` is true 45 | * `ajaxSubmitOptions` you can find in [jquery.form](https://github.com/malsup/form) 46 | 47 | 48 | ## Test 49 | 50 | ``` 51 | $ phpunit 52 | ``` 53 | ## LICENSE 54 | 55 | ![MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) 56 | 57 | 58 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lichunqiang/yii2-ajaxform/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 59 | 60 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "light/yii2-ajaxform", 3 | "description": "yii2 activeform ActiveForm ajax", 4 | "type": "library", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "lichunqiang", 9 | "email": "light-li@hotmail.com" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.4.0", 14 | "yiisoft/yii2": "~2.0.6", 15 | "bower-asset/jquery-form": "~3.51" 16 | }, 17 | "require-dev": { 18 | "phpunit/phpunit": "^4.8" 19 | }, 20 | "autoload": { 21 | "psr-4": { 22 | "light\\widgets\\": "src" 23 | } 24 | }, 25 | "autoload-dev": { 26 | "psr-4": { 27 | "tests\\": "tests" 28 | } 29 | }, 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "1.0.x-dev" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "f1056094009608b145127d7d7bafb8a9", 8 | "packages": [ 9 | { 10 | "name": "bower-asset/jquery", 11 | "version": "2.2.4", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/jquery/jquery-dist.git", 15 | "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72", 20 | "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72", 21 | "shasum": "" 22 | }, 23 | "type": "bower-asset-library", 24 | "extra": { 25 | "bower-asset-main": "dist/jquery.js", 26 | "bower-asset-ignore": [ 27 | "package.json" 28 | ] 29 | }, 30 | "license": [ 31 | "MIT" 32 | ], 33 | "keywords": [ 34 | "browser", 35 | "javascript", 36 | "jquery", 37 | "library" 38 | ] 39 | }, 40 | { 41 | "name": "bower-asset/jquery-form", 42 | "version": "3.51", 43 | "source": { 44 | "type": "git", 45 | "url": "https://github.com/malsup/form.git", 46 | "reference": "6bf24a5f6d8be65f4e5491863180c09356d9dadd" 47 | }, 48 | "dist": { 49 | "type": "zip", 50 | "url": "https://api.github.com/repos/malsup/form/zipball/6bf24a5f6d8be65f4e5491863180c09356d9dadd", 51 | "reference": "6bf24a5f6d8be65f4e5491863180c09356d9dadd", 52 | "shasum": "" 53 | }, 54 | "require": { 55 | "bower-asset/jquery": ">=1.5" 56 | }, 57 | "type": "bower-asset-library", 58 | "extra": { 59 | "bower-asset-main": "jquery.form.js", 60 | "bower-asset-ignore": [ 61 | "README.md", 62 | "composer.json", 63 | "form.jquery.json", 64 | "package.json" 65 | ] 66 | } 67 | }, 68 | { 69 | "name": "bower-asset/jquery.inputmask", 70 | "version": "3.2.7", 71 | "source": { 72 | "type": "git", 73 | "url": "https://github.com/RobinHerbots/Inputmask.git", 74 | "reference": "5a72c563b502b8e05958a524cdfffafe9987be38" 75 | }, 76 | "dist": { 77 | "type": "zip", 78 | "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38", 79 | "reference": "5a72c563b502b8e05958a524cdfffafe9987be38", 80 | "shasum": "" 81 | }, 82 | "require": { 83 | "bower-asset/jquery": ">=1.7" 84 | }, 85 | "type": "bower-asset-library", 86 | "extra": { 87 | "bower-asset-main": [ 88 | "./dist/inputmask/inputmask.js" 89 | ], 90 | "bower-asset-ignore": [ 91 | "**/*", 92 | "!dist/*", 93 | "!dist/inputmask/*", 94 | "!dist/min/*", 95 | "!dist/min/inputmask/*", 96 | "!extra/bindings/*", 97 | "!extra/dependencyLibs/*", 98 | "!extra/phone-codes/*" 99 | ] 100 | }, 101 | "license": [ 102 | "http://opensource.org/licenses/mit-license.php" 103 | ], 104 | "description": "jquery.inputmask is a jquery plugin which create an input mask.", 105 | "keywords": [ 106 | "form", 107 | "input", 108 | "inputmask", 109 | "jquery", 110 | "mask", 111 | "plugins" 112 | ] 113 | }, 114 | { 115 | "name": "bower-asset/punycode", 116 | "version": "v1.3.2", 117 | "source": { 118 | "type": "git", 119 | "url": "https://github.com/bestiejs/punycode.js.git", 120 | "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" 121 | }, 122 | "dist": { 123 | "type": "zip", 124 | "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", 125 | "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", 126 | "shasum": "" 127 | }, 128 | "type": "bower-asset-library", 129 | "extra": { 130 | "bower-asset-main": "punycode.js", 131 | "bower-asset-ignore": [ 132 | "coverage", 133 | "tests", 134 | ".*", 135 | "component.json", 136 | "Gruntfile.js", 137 | "node_modules", 138 | "package.json" 139 | ] 140 | } 141 | }, 142 | { 143 | "name": "bower-asset/yii2-pjax", 144 | "version": "v2.0.6", 145 | "source": { 146 | "type": "git", 147 | "url": "https://github.com/yiisoft/jquery-pjax.git", 148 | "reference": "60728da6ade5879e807a49ce59ef9a72039b8978" 149 | }, 150 | "dist": { 151 | "type": "zip", 152 | "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978", 153 | "reference": "60728da6ade5879e807a49ce59ef9a72039b8978", 154 | "shasum": "" 155 | }, 156 | "require": { 157 | "bower-asset/jquery": ">=1.8" 158 | }, 159 | "type": "bower-asset-library", 160 | "extra": { 161 | "bower-asset-main": "./jquery.pjax.js", 162 | "bower-asset-ignore": [ 163 | ".travis.yml", 164 | "Gemfile", 165 | "Gemfile.lock", 166 | "CONTRIBUTING.md", 167 | "vendor/", 168 | "script/", 169 | "test/" 170 | ] 171 | }, 172 | "license": [ 173 | "MIT" 174 | ] 175 | }, 176 | { 177 | "name": "cebe/markdown", 178 | "version": "1.1.2", 179 | "source": { 180 | "type": "git", 181 | "url": "https://github.com/cebe/markdown.git", 182 | "reference": "25b28bae8a6f185b5030673af77b32e1163d5c6e" 183 | }, 184 | "dist": { 185 | "type": "zip", 186 | "url": "https://api.github.com/repos/cebe/markdown/zipball/25b28bae8a6f185b5030673af77b32e1163d5c6e", 187 | "reference": "25b28bae8a6f185b5030673af77b32e1163d5c6e", 188 | "shasum": "" 189 | }, 190 | "require": { 191 | "lib-pcre": "*", 192 | "php": ">=5.4.0" 193 | }, 194 | "require-dev": { 195 | "cebe/indent": "*", 196 | "facebook/xhprof": "*@dev", 197 | "phpunit/phpunit": "4.1.*" 198 | }, 199 | "bin": [ 200 | "bin/markdown" 201 | ], 202 | "type": "library", 203 | "extra": { 204 | "branch-alias": { 205 | "dev-master": "1.1.x-dev" 206 | } 207 | }, 208 | "autoload": { 209 | "psr-4": { 210 | "cebe\\markdown\\": "" 211 | } 212 | }, 213 | "notification-url": "https://packagist.org/downloads/", 214 | "license": [ 215 | "MIT" 216 | ], 217 | "authors": [ 218 | { 219 | "name": "Carsten Brandt", 220 | "email": "mail@cebe.cc", 221 | "homepage": "http://cebe.cc/", 222 | "role": "Creator" 223 | } 224 | ], 225 | "description": "A super fast, highly extensible markdown parser for PHP", 226 | "homepage": "https://github.com/cebe/markdown#readme", 227 | "keywords": [ 228 | "extensible", 229 | "fast", 230 | "gfm", 231 | "markdown", 232 | "markdown-extra" 233 | ], 234 | "time": "2017-07-16T21:13:23+00:00" 235 | }, 236 | { 237 | "name": "ezyang/htmlpurifier", 238 | "version": "v4.10.0", 239 | "source": { 240 | "type": "git", 241 | "url": "https://github.com/ezyang/htmlpurifier.git", 242 | "reference": "d85d39da4576a6934b72480be6978fb10c860021" 243 | }, 244 | "dist": { 245 | "type": "zip", 246 | "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021", 247 | "reference": "d85d39da4576a6934b72480be6978fb10c860021", 248 | "shasum": "" 249 | }, 250 | "require": { 251 | "php": ">=5.2" 252 | }, 253 | "require-dev": { 254 | "simpletest/simpletest": "^1.1" 255 | }, 256 | "type": "library", 257 | "autoload": { 258 | "psr-0": { 259 | "HTMLPurifier": "library/" 260 | }, 261 | "files": [ 262 | "library/HTMLPurifier.composer.php" 263 | ] 264 | }, 265 | "notification-url": "https://packagist.org/downloads/", 266 | "license": [ 267 | "LGPL" 268 | ], 269 | "authors": [ 270 | { 271 | "name": "Edward Z. Yang", 272 | "email": "admin@htmlpurifier.org", 273 | "homepage": "http://ezyang.com" 274 | } 275 | ], 276 | "description": "Standards compliant HTML filter written in PHP", 277 | "homepage": "http://htmlpurifier.org/", 278 | "keywords": [ 279 | "html" 280 | ], 281 | "time": "2018-02-23T01:58:20+00:00" 282 | }, 283 | { 284 | "name": "yiisoft/yii2", 285 | "version": "2.0.12.2", 286 | "source": { 287 | "type": "git", 288 | "url": "https://github.com/yiisoft/yii2-framework.git", 289 | "reference": "8ec73da1e0f56e74ebc01aa09faf5fdc65d76c45" 290 | }, 291 | "dist": { 292 | "type": "zip", 293 | "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/8ec73da1e0f56e74ebc01aa09faf5fdc65d76c45", 294 | "reference": "8ec73da1e0f56e74ebc01aa09faf5fdc65d76c45", 295 | "shasum": "" 296 | }, 297 | "require": { 298 | "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", 299 | "bower-asset/jquery.inputmask": "~3.2.2 | ~3.3.5", 300 | "bower-asset/punycode": "1.3.*", 301 | "bower-asset/yii2-pjax": "~2.0.1", 302 | "cebe/markdown": "~1.0.0 | ~1.1.0", 303 | "ext-ctype": "*", 304 | "ext-mbstring": "*", 305 | "ezyang/htmlpurifier": "~4.6", 306 | "lib-pcre": "*", 307 | "php": ">=5.4.0", 308 | "yiisoft/yii2-composer": "~2.0.4" 309 | }, 310 | "bin": [ 311 | "yii" 312 | ], 313 | "type": "library", 314 | "extra": { 315 | "branch-alias": { 316 | "dev-master": "2.0.x-dev" 317 | } 318 | }, 319 | "autoload": { 320 | "psr-4": { 321 | "yii\\": "" 322 | } 323 | }, 324 | "notification-url": "https://packagist.org/downloads/", 325 | "license": [ 326 | "BSD-3-Clause" 327 | ], 328 | "authors": [ 329 | { 330 | "name": "Qiang Xue", 331 | "email": "qiang.xue@gmail.com", 332 | "homepage": "http://www.yiiframework.com/", 333 | "role": "Founder and project lead" 334 | }, 335 | { 336 | "name": "Alexander Makarov", 337 | "email": "sam@rmcreative.ru", 338 | "homepage": "http://rmcreative.ru/", 339 | "role": "Core framework development" 340 | }, 341 | { 342 | "name": "Maurizio Domba", 343 | "homepage": "http://mdomba.info/", 344 | "role": "Core framework development" 345 | }, 346 | { 347 | "name": "Carsten Brandt", 348 | "email": "mail@cebe.cc", 349 | "homepage": "http://cebe.cc/", 350 | "role": "Core framework development" 351 | }, 352 | { 353 | "name": "Timur Ruziev", 354 | "email": "resurtm@gmail.com", 355 | "homepage": "http://resurtm.com/", 356 | "role": "Core framework development" 357 | }, 358 | { 359 | "name": "Paul Klimov", 360 | "email": "klimov.paul@gmail.com", 361 | "role": "Core framework development" 362 | }, 363 | { 364 | "name": "Dmitry Naumenko", 365 | "email": "d.naumenko.a@gmail.com", 366 | "role": "Core framework development" 367 | }, 368 | { 369 | "name": "Boudewijn Vahrmeijer", 370 | "email": "info@dynasource.eu", 371 | "homepage": "http://dynasource.eu", 372 | "role": "Core framework development" 373 | } 374 | ], 375 | "description": "Yii PHP Framework Version 2", 376 | "homepage": "http://www.yiiframework.com/", 377 | "keywords": [ 378 | "framework", 379 | "yii2" 380 | ], 381 | "time": "2018-03-21T18:48:03+00:00" 382 | }, 383 | { 384 | "name": "yiisoft/yii2-composer", 385 | "version": "2.0.7", 386 | "source": { 387 | "type": "git", 388 | "url": "https://github.com/yiisoft/yii2-composer.git", 389 | "reference": "1439e78be1218c492e6cde251ed87d3f128b9534" 390 | }, 391 | "dist": { 392 | "type": "zip", 393 | "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/1439e78be1218c492e6cde251ed87d3f128b9534", 394 | "reference": "1439e78be1218c492e6cde251ed87d3f128b9534", 395 | "shasum": "" 396 | }, 397 | "require": { 398 | "composer-plugin-api": "^1.0" 399 | }, 400 | "require-dev": { 401 | "composer/composer": "^1.0" 402 | }, 403 | "type": "composer-plugin", 404 | "extra": { 405 | "class": "yii\\composer\\Plugin", 406 | "branch-alias": { 407 | "dev-master": "2.0.x-dev" 408 | } 409 | }, 410 | "autoload": { 411 | "psr-4": { 412 | "yii\\composer\\": "" 413 | } 414 | }, 415 | "notification-url": "https://packagist.org/downloads/", 416 | "license": [ 417 | "BSD-3-Clause" 418 | ], 419 | "authors": [ 420 | { 421 | "name": "Qiang Xue", 422 | "email": "qiang.xue@gmail.com" 423 | }, 424 | { 425 | "name": "Carsten Brandt", 426 | "email": "mail@cebe.cc" 427 | } 428 | ], 429 | "description": "The composer plugin for Yii extension installer", 430 | "keywords": [ 431 | "composer", 432 | "extension installer", 433 | "yii2" 434 | ], 435 | "time": "2018-07-05T15:44:47+00:00" 436 | } 437 | ], 438 | "packages-dev": [ 439 | { 440 | "name": "doctrine/instantiator", 441 | "version": "1.2.0", 442 | "source": { 443 | "type": "git", 444 | "url": "https://github.com/doctrine/instantiator.git", 445 | "reference": "a2c590166b2133a4633738648b6b064edae0814a" 446 | }, 447 | "dist": { 448 | "type": "zip", 449 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", 450 | "reference": "a2c590166b2133a4633738648b6b064edae0814a", 451 | "shasum": "" 452 | }, 453 | "require": { 454 | "php": "^7.1" 455 | }, 456 | "require-dev": { 457 | "doctrine/coding-standard": "^6.0", 458 | "ext-pdo": "*", 459 | "ext-phar": "*", 460 | "phpbench/phpbench": "^0.13", 461 | "phpstan/phpstan-phpunit": "^0.11", 462 | "phpstan/phpstan-shim": "^0.11", 463 | "phpunit/phpunit": "^7.0" 464 | }, 465 | "type": "library", 466 | "extra": { 467 | "branch-alias": { 468 | "dev-master": "1.2.x-dev" 469 | } 470 | }, 471 | "autoload": { 472 | "psr-4": { 473 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 474 | } 475 | }, 476 | "notification-url": "https://packagist.org/downloads/", 477 | "license": [ 478 | "MIT" 479 | ], 480 | "authors": [ 481 | { 482 | "name": "Marco Pivetta", 483 | "email": "ocramius@gmail.com", 484 | "homepage": "http://ocramius.github.com/" 485 | } 486 | ], 487 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 488 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 489 | "keywords": [ 490 | "constructor", 491 | "instantiate" 492 | ], 493 | "time": "2019-03-17T17:37:11+00:00" 494 | }, 495 | { 496 | "name": "phpdocumentor/reflection-common", 497 | "version": "1.0.1", 498 | "source": { 499 | "type": "git", 500 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 501 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" 502 | }, 503 | "dist": { 504 | "type": "zip", 505 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 506 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 507 | "shasum": "" 508 | }, 509 | "require": { 510 | "php": ">=5.5" 511 | }, 512 | "require-dev": { 513 | "phpunit/phpunit": "^4.6" 514 | }, 515 | "type": "library", 516 | "extra": { 517 | "branch-alias": { 518 | "dev-master": "1.0.x-dev" 519 | } 520 | }, 521 | "autoload": { 522 | "psr-4": { 523 | "phpDocumentor\\Reflection\\": [ 524 | "src" 525 | ] 526 | } 527 | }, 528 | "notification-url": "https://packagist.org/downloads/", 529 | "license": [ 530 | "MIT" 531 | ], 532 | "authors": [ 533 | { 534 | "name": "Jaap van Otterdijk", 535 | "email": "opensource@ijaap.nl" 536 | } 537 | ], 538 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 539 | "homepage": "http://www.phpdoc.org", 540 | "keywords": [ 541 | "FQSEN", 542 | "phpDocumentor", 543 | "phpdoc", 544 | "reflection", 545 | "static analysis" 546 | ], 547 | "time": "2017-09-11T18:02:19+00:00" 548 | }, 549 | { 550 | "name": "phpdocumentor/reflection-docblock", 551 | "version": "4.3.1", 552 | "source": { 553 | "type": "git", 554 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 555 | "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" 556 | }, 557 | "dist": { 558 | "type": "zip", 559 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", 560 | "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", 561 | "shasum": "" 562 | }, 563 | "require": { 564 | "php": "^7.0", 565 | "phpdocumentor/reflection-common": "^1.0.0", 566 | "phpdocumentor/type-resolver": "^0.4.0", 567 | "webmozart/assert": "^1.0" 568 | }, 569 | "require-dev": { 570 | "doctrine/instantiator": "~1.0.5", 571 | "mockery/mockery": "^1.0", 572 | "phpunit/phpunit": "^6.4" 573 | }, 574 | "type": "library", 575 | "extra": { 576 | "branch-alias": { 577 | "dev-master": "4.x-dev" 578 | } 579 | }, 580 | "autoload": { 581 | "psr-4": { 582 | "phpDocumentor\\Reflection\\": [ 583 | "src/" 584 | ] 585 | } 586 | }, 587 | "notification-url": "https://packagist.org/downloads/", 588 | "license": [ 589 | "MIT" 590 | ], 591 | "authors": [ 592 | { 593 | "name": "Mike van Riel", 594 | "email": "me@mikevanriel.com" 595 | } 596 | ], 597 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 598 | "time": "2019-04-30T17:48:53+00:00" 599 | }, 600 | { 601 | "name": "phpdocumentor/type-resolver", 602 | "version": "0.4.0", 603 | "source": { 604 | "type": "git", 605 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 606 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" 607 | }, 608 | "dist": { 609 | "type": "zip", 610 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", 611 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", 612 | "shasum": "" 613 | }, 614 | "require": { 615 | "php": "^5.5 || ^7.0", 616 | "phpdocumentor/reflection-common": "^1.0" 617 | }, 618 | "require-dev": { 619 | "mockery/mockery": "^0.9.4", 620 | "phpunit/phpunit": "^5.2||^4.8.24" 621 | }, 622 | "type": "library", 623 | "extra": { 624 | "branch-alias": { 625 | "dev-master": "1.0.x-dev" 626 | } 627 | }, 628 | "autoload": { 629 | "psr-4": { 630 | "phpDocumentor\\Reflection\\": [ 631 | "src/" 632 | ] 633 | } 634 | }, 635 | "notification-url": "https://packagist.org/downloads/", 636 | "license": [ 637 | "MIT" 638 | ], 639 | "authors": [ 640 | { 641 | "name": "Mike van Riel", 642 | "email": "me@mikevanriel.com" 643 | } 644 | ], 645 | "time": "2017-07-14T14:27:02+00:00" 646 | }, 647 | { 648 | "name": "phpspec/prophecy", 649 | "version": "1.8.0", 650 | "source": { 651 | "type": "git", 652 | "url": "https://github.com/phpspec/prophecy.git", 653 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" 654 | }, 655 | "dist": { 656 | "type": "zip", 657 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 658 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 659 | "shasum": "" 660 | }, 661 | "require": { 662 | "doctrine/instantiator": "^1.0.2", 663 | "php": "^5.3|^7.0", 664 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", 665 | "sebastian/comparator": "^1.1|^2.0|^3.0", 666 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" 667 | }, 668 | "require-dev": { 669 | "phpspec/phpspec": "^2.5|^3.2", 670 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" 671 | }, 672 | "type": "library", 673 | "extra": { 674 | "branch-alias": { 675 | "dev-master": "1.8.x-dev" 676 | } 677 | }, 678 | "autoload": { 679 | "psr-0": { 680 | "Prophecy\\": "src/" 681 | } 682 | }, 683 | "notification-url": "https://packagist.org/downloads/", 684 | "license": [ 685 | "MIT" 686 | ], 687 | "authors": [ 688 | { 689 | "name": "Konstantin Kudryashov", 690 | "email": "ever.zet@gmail.com", 691 | "homepage": "http://everzet.com" 692 | }, 693 | { 694 | "name": "Marcello Duarte", 695 | "email": "marcello.duarte@gmail.com" 696 | } 697 | ], 698 | "description": "Highly opinionated mocking framework for PHP 5.3+", 699 | "homepage": "https://github.com/phpspec/prophecy", 700 | "keywords": [ 701 | "Double", 702 | "Dummy", 703 | "fake", 704 | "mock", 705 | "spy", 706 | "stub" 707 | ], 708 | "time": "2018-08-05T17:53:17+00:00" 709 | }, 710 | { 711 | "name": "phpunit/php-code-coverage", 712 | "version": "2.2.4", 713 | "source": { 714 | "type": "git", 715 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 716 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" 717 | }, 718 | "dist": { 719 | "type": "zip", 720 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", 721 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", 722 | "shasum": "" 723 | }, 724 | "require": { 725 | "php": ">=5.3.3", 726 | "phpunit/php-file-iterator": "~1.3", 727 | "phpunit/php-text-template": "~1.2", 728 | "phpunit/php-token-stream": "~1.3", 729 | "sebastian/environment": "^1.3.2", 730 | "sebastian/version": "~1.0" 731 | }, 732 | "require-dev": { 733 | "ext-xdebug": ">=2.1.4", 734 | "phpunit/phpunit": "~4" 735 | }, 736 | "suggest": { 737 | "ext-dom": "*", 738 | "ext-xdebug": ">=2.2.1", 739 | "ext-xmlwriter": "*" 740 | }, 741 | "type": "library", 742 | "extra": { 743 | "branch-alias": { 744 | "dev-master": "2.2.x-dev" 745 | } 746 | }, 747 | "autoload": { 748 | "classmap": [ 749 | "src/" 750 | ] 751 | }, 752 | "notification-url": "https://packagist.org/downloads/", 753 | "license": [ 754 | "BSD-3-Clause" 755 | ], 756 | "authors": [ 757 | { 758 | "name": "Sebastian Bergmann", 759 | "email": "sb@sebastian-bergmann.de", 760 | "role": "lead" 761 | } 762 | ], 763 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 764 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 765 | "keywords": [ 766 | "coverage", 767 | "testing", 768 | "xunit" 769 | ], 770 | "time": "2015-10-06T15:47:00+00:00" 771 | }, 772 | { 773 | "name": "phpunit/php-file-iterator", 774 | "version": "1.4.5", 775 | "source": { 776 | "type": "git", 777 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 778 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" 779 | }, 780 | "dist": { 781 | "type": "zip", 782 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", 783 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", 784 | "shasum": "" 785 | }, 786 | "require": { 787 | "php": ">=5.3.3" 788 | }, 789 | "type": "library", 790 | "extra": { 791 | "branch-alias": { 792 | "dev-master": "1.4.x-dev" 793 | } 794 | }, 795 | "autoload": { 796 | "classmap": [ 797 | "src/" 798 | ] 799 | }, 800 | "notification-url": "https://packagist.org/downloads/", 801 | "license": [ 802 | "BSD-3-Clause" 803 | ], 804 | "authors": [ 805 | { 806 | "name": "Sebastian Bergmann", 807 | "email": "sb@sebastian-bergmann.de", 808 | "role": "lead" 809 | } 810 | ], 811 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 812 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 813 | "keywords": [ 814 | "filesystem", 815 | "iterator" 816 | ], 817 | "time": "2017-11-27T13:52:08+00:00" 818 | }, 819 | { 820 | "name": "phpunit/php-text-template", 821 | "version": "1.2.1", 822 | "source": { 823 | "type": "git", 824 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 825 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 826 | }, 827 | "dist": { 828 | "type": "zip", 829 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 830 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 831 | "shasum": "" 832 | }, 833 | "require": { 834 | "php": ">=5.3.3" 835 | }, 836 | "type": "library", 837 | "autoload": { 838 | "classmap": [ 839 | "src/" 840 | ] 841 | }, 842 | "notification-url": "https://packagist.org/downloads/", 843 | "license": [ 844 | "BSD-3-Clause" 845 | ], 846 | "authors": [ 847 | { 848 | "name": "Sebastian Bergmann", 849 | "email": "sebastian@phpunit.de", 850 | "role": "lead" 851 | } 852 | ], 853 | "description": "Simple template engine.", 854 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 855 | "keywords": [ 856 | "template" 857 | ], 858 | "time": "2015-06-21T13:50:34+00:00" 859 | }, 860 | { 861 | "name": "phpunit/php-timer", 862 | "version": "1.0.9", 863 | "source": { 864 | "type": "git", 865 | "url": "https://github.com/sebastianbergmann/php-timer.git", 866 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" 867 | }, 868 | "dist": { 869 | "type": "zip", 870 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 871 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 872 | "shasum": "" 873 | }, 874 | "require": { 875 | "php": "^5.3.3 || ^7.0" 876 | }, 877 | "require-dev": { 878 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 879 | }, 880 | "type": "library", 881 | "extra": { 882 | "branch-alias": { 883 | "dev-master": "1.0-dev" 884 | } 885 | }, 886 | "autoload": { 887 | "classmap": [ 888 | "src/" 889 | ] 890 | }, 891 | "notification-url": "https://packagist.org/downloads/", 892 | "license": [ 893 | "BSD-3-Clause" 894 | ], 895 | "authors": [ 896 | { 897 | "name": "Sebastian Bergmann", 898 | "email": "sb@sebastian-bergmann.de", 899 | "role": "lead" 900 | } 901 | ], 902 | "description": "Utility class for timing", 903 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 904 | "keywords": [ 905 | "timer" 906 | ], 907 | "time": "2017-02-26T11:10:40+00:00" 908 | }, 909 | { 910 | "name": "phpunit/php-token-stream", 911 | "version": "1.4.12", 912 | "source": { 913 | "type": "git", 914 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 915 | "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" 916 | }, 917 | "dist": { 918 | "type": "zip", 919 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", 920 | "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", 921 | "shasum": "" 922 | }, 923 | "require": { 924 | "ext-tokenizer": "*", 925 | "php": ">=5.3.3" 926 | }, 927 | "require-dev": { 928 | "phpunit/phpunit": "~4.2" 929 | }, 930 | "type": "library", 931 | "extra": { 932 | "branch-alias": { 933 | "dev-master": "1.4-dev" 934 | } 935 | }, 936 | "autoload": { 937 | "classmap": [ 938 | "src/" 939 | ] 940 | }, 941 | "notification-url": "https://packagist.org/downloads/", 942 | "license": [ 943 | "BSD-3-Clause" 944 | ], 945 | "authors": [ 946 | { 947 | "name": "Sebastian Bergmann", 948 | "email": "sebastian@phpunit.de" 949 | } 950 | ], 951 | "description": "Wrapper around PHP's tokenizer extension.", 952 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 953 | "keywords": [ 954 | "tokenizer" 955 | ], 956 | "time": "2017-12-04T08:55:13+00:00" 957 | }, 958 | { 959 | "name": "phpunit/phpunit", 960 | "version": "4.8.36", 961 | "source": { 962 | "type": "git", 963 | "url": "https://github.com/sebastianbergmann/phpunit.git", 964 | "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" 965 | }, 966 | "dist": { 967 | "type": "zip", 968 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", 969 | "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", 970 | "shasum": "" 971 | }, 972 | "require": { 973 | "ext-dom": "*", 974 | "ext-json": "*", 975 | "ext-pcre": "*", 976 | "ext-reflection": "*", 977 | "ext-spl": "*", 978 | "php": ">=5.3.3", 979 | "phpspec/prophecy": "^1.3.1", 980 | "phpunit/php-code-coverage": "~2.1", 981 | "phpunit/php-file-iterator": "~1.4", 982 | "phpunit/php-text-template": "~1.2", 983 | "phpunit/php-timer": "^1.0.6", 984 | "phpunit/phpunit-mock-objects": "~2.3", 985 | "sebastian/comparator": "~1.2.2", 986 | "sebastian/diff": "~1.2", 987 | "sebastian/environment": "~1.3", 988 | "sebastian/exporter": "~1.2", 989 | "sebastian/global-state": "~1.0", 990 | "sebastian/version": "~1.0", 991 | "symfony/yaml": "~2.1|~3.0" 992 | }, 993 | "suggest": { 994 | "phpunit/php-invoker": "~1.1" 995 | }, 996 | "bin": [ 997 | "phpunit" 998 | ], 999 | "type": "library", 1000 | "extra": { 1001 | "branch-alias": { 1002 | "dev-master": "4.8.x-dev" 1003 | } 1004 | }, 1005 | "autoload": { 1006 | "classmap": [ 1007 | "src/" 1008 | ] 1009 | }, 1010 | "notification-url": "https://packagist.org/downloads/", 1011 | "license": [ 1012 | "BSD-3-Clause" 1013 | ], 1014 | "authors": [ 1015 | { 1016 | "name": "Sebastian Bergmann", 1017 | "email": "sebastian@phpunit.de", 1018 | "role": "lead" 1019 | } 1020 | ], 1021 | "description": "The PHP Unit Testing framework.", 1022 | "homepage": "https://phpunit.de/", 1023 | "keywords": [ 1024 | "phpunit", 1025 | "testing", 1026 | "xunit" 1027 | ], 1028 | "time": "2017-06-21T08:07:12+00:00" 1029 | }, 1030 | { 1031 | "name": "phpunit/phpunit-mock-objects", 1032 | "version": "2.3.8", 1033 | "source": { 1034 | "type": "git", 1035 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 1036 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" 1037 | }, 1038 | "dist": { 1039 | "type": "zip", 1040 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", 1041 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", 1042 | "shasum": "" 1043 | }, 1044 | "require": { 1045 | "doctrine/instantiator": "^1.0.2", 1046 | "php": ">=5.3.3", 1047 | "phpunit/php-text-template": "~1.2", 1048 | "sebastian/exporter": "~1.2" 1049 | }, 1050 | "require-dev": { 1051 | "phpunit/phpunit": "~4.4" 1052 | }, 1053 | "suggest": { 1054 | "ext-soap": "*" 1055 | }, 1056 | "type": "library", 1057 | "extra": { 1058 | "branch-alias": { 1059 | "dev-master": "2.3.x-dev" 1060 | } 1061 | }, 1062 | "autoload": { 1063 | "classmap": [ 1064 | "src/" 1065 | ] 1066 | }, 1067 | "notification-url": "https://packagist.org/downloads/", 1068 | "license": [ 1069 | "BSD-3-Clause" 1070 | ], 1071 | "authors": [ 1072 | { 1073 | "name": "Sebastian Bergmann", 1074 | "email": "sb@sebastian-bergmann.de", 1075 | "role": "lead" 1076 | } 1077 | ], 1078 | "description": "Mock Object library for PHPUnit", 1079 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", 1080 | "keywords": [ 1081 | "mock", 1082 | "xunit" 1083 | ], 1084 | "abandoned": true, 1085 | "time": "2015-10-02T06:51:40+00:00" 1086 | }, 1087 | { 1088 | "name": "sebastian/comparator", 1089 | "version": "1.2.4", 1090 | "source": { 1091 | "type": "git", 1092 | "url": "https://github.com/sebastianbergmann/comparator.git", 1093 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" 1094 | }, 1095 | "dist": { 1096 | "type": "zip", 1097 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 1098 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 1099 | "shasum": "" 1100 | }, 1101 | "require": { 1102 | "php": ">=5.3.3", 1103 | "sebastian/diff": "~1.2", 1104 | "sebastian/exporter": "~1.2 || ~2.0" 1105 | }, 1106 | "require-dev": { 1107 | "phpunit/phpunit": "~4.4" 1108 | }, 1109 | "type": "library", 1110 | "extra": { 1111 | "branch-alias": { 1112 | "dev-master": "1.2.x-dev" 1113 | } 1114 | }, 1115 | "autoload": { 1116 | "classmap": [ 1117 | "src/" 1118 | ] 1119 | }, 1120 | "notification-url": "https://packagist.org/downloads/", 1121 | "license": [ 1122 | "BSD-3-Clause" 1123 | ], 1124 | "authors": [ 1125 | { 1126 | "name": "Jeff Welch", 1127 | "email": "whatthejeff@gmail.com" 1128 | }, 1129 | { 1130 | "name": "Volker Dusch", 1131 | "email": "github@wallbash.com" 1132 | }, 1133 | { 1134 | "name": "Bernhard Schussek", 1135 | "email": "bschussek@2bepublished.at" 1136 | }, 1137 | { 1138 | "name": "Sebastian Bergmann", 1139 | "email": "sebastian@phpunit.de" 1140 | } 1141 | ], 1142 | "description": "Provides the functionality to compare PHP values for equality", 1143 | "homepage": "http://www.github.com/sebastianbergmann/comparator", 1144 | "keywords": [ 1145 | "comparator", 1146 | "compare", 1147 | "equality" 1148 | ], 1149 | "time": "2017-01-29T09:50:25+00:00" 1150 | }, 1151 | { 1152 | "name": "sebastian/diff", 1153 | "version": "1.4.3", 1154 | "source": { 1155 | "type": "git", 1156 | "url": "https://github.com/sebastianbergmann/diff.git", 1157 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" 1158 | }, 1159 | "dist": { 1160 | "type": "zip", 1161 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1162 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1163 | "shasum": "" 1164 | }, 1165 | "require": { 1166 | "php": "^5.3.3 || ^7.0" 1167 | }, 1168 | "require-dev": { 1169 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 1170 | }, 1171 | "type": "library", 1172 | "extra": { 1173 | "branch-alias": { 1174 | "dev-master": "1.4-dev" 1175 | } 1176 | }, 1177 | "autoload": { 1178 | "classmap": [ 1179 | "src/" 1180 | ] 1181 | }, 1182 | "notification-url": "https://packagist.org/downloads/", 1183 | "license": [ 1184 | "BSD-3-Clause" 1185 | ], 1186 | "authors": [ 1187 | { 1188 | "name": "Kore Nordmann", 1189 | "email": "mail@kore-nordmann.de" 1190 | }, 1191 | { 1192 | "name": "Sebastian Bergmann", 1193 | "email": "sebastian@phpunit.de" 1194 | } 1195 | ], 1196 | "description": "Diff implementation", 1197 | "homepage": "https://github.com/sebastianbergmann/diff", 1198 | "keywords": [ 1199 | "diff" 1200 | ], 1201 | "time": "2017-05-22T07:24:03+00:00" 1202 | }, 1203 | { 1204 | "name": "sebastian/environment", 1205 | "version": "1.3.8", 1206 | "source": { 1207 | "type": "git", 1208 | "url": "https://github.com/sebastianbergmann/environment.git", 1209 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" 1210 | }, 1211 | "dist": { 1212 | "type": "zip", 1213 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", 1214 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", 1215 | "shasum": "" 1216 | }, 1217 | "require": { 1218 | "php": "^5.3.3 || ^7.0" 1219 | }, 1220 | "require-dev": { 1221 | "phpunit/phpunit": "^4.8 || ^5.0" 1222 | }, 1223 | "type": "library", 1224 | "extra": { 1225 | "branch-alias": { 1226 | "dev-master": "1.3.x-dev" 1227 | } 1228 | }, 1229 | "autoload": { 1230 | "classmap": [ 1231 | "src/" 1232 | ] 1233 | }, 1234 | "notification-url": "https://packagist.org/downloads/", 1235 | "license": [ 1236 | "BSD-3-Clause" 1237 | ], 1238 | "authors": [ 1239 | { 1240 | "name": "Sebastian Bergmann", 1241 | "email": "sebastian@phpunit.de" 1242 | } 1243 | ], 1244 | "description": "Provides functionality to handle HHVM/PHP environments", 1245 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1246 | "keywords": [ 1247 | "Xdebug", 1248 | "environment", 1249 | "hhvm" 1250 | ], 1251 | "time": "2016-08-18T05:49:44+00:00" 1252 | }, 1253 | { 1254 | "name": "sebastian/exporter", 1255 | "version": "1.2.2", 1256 | "source": { 1257 | "type": "git", 1258 | "url": "https://github.com/sebastianbergmann/exporter.git", 1259 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" 1260 | }, 1261 | "dist": { 1262 | "type": "zip", 1263 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", 1264 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", 1265 | "shasum": "" 1266 | }, 1267 | "require": { 1268 | "php": ">=5.3.3", 1269 | "sebastian/recursion-context": "~1.0" 1270 | }, 1271 | "require-dev": { 1272 | "ext-mbstring": "*", 1273 | "phpunit/phpunit": "~4.4" 1274 | }, 1275 | "type": "library", 1276 | "extra": { 1277 | "branch-alias": { 1278 | "dev-master": "1.3.x-dev" 1279 | } 1280 | }, 1281 | "autoload": { 1282 | "classmap": [ 1283 | "src/" 1284 | ] 1285 | }, 1286 | "notification-url": "https://packagist.org/downloads/", 1287 | "license": [ 1288 | "BSD-3-Clause" 1289 | ], 1290 | "authors": [ 1291 | { 1292 | "name": "Jeff Welch", 1293 | "email": "whatthejeff@gmail.com" 1294 | }, 1295 | { 1296 | "name": "Volker Dusch", 1297 | "email": "github@wallbash.com" 1298 | }, 1299 | { 1300 | "name": "Bernhard Schussek", 1301 | "email": "bschussek@2bepublished.at" 1302 | }, 1303 | { 1304 | "name": "Sebastian Bergmann", 1305 | "email": "sebastian@phpunit.de" 1306 | }, 1307 | { 1308 | "name": "Adam Harvey", 1309 | "email": "aharvey@php.net" 1310 | } 1311 | ], 1312 | "description": "Provides the functionality to export PHP variables for visualization", 1313 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1314 | "keywords": [ 1315 | "export", 1316 | "exporter" 1317 | ], 1318 | "time": "2016-06-17T09:04:28+00:00" 1319 | }, 1320 | { 1321 | "name": "sebastian/global-state", 1322 | "version": "1.1.1", 1323 | "source": { 1324 | "type": "git", 1325 | "url": "https://github.com/sebastianbergmann/global-state.git", 1326 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" 1327 | }, 1328 | "dist": { 1329 | "type": "zip", 1330 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", 1331 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", 1332 | "shasum": "" 1333 | }, 1334 | "require": { 1335 | "php": ">=5.3.3" 1336 | }, 1337 | "require-dev": { 1338 | "phpunit/phpunit": "~4.2" 1339 | }, 1340 | "suggest": { 1341 | "ext-uopz": "*" 1342 | }, 1343 | "type": "library", 1344 | "extra": { 1345 | "branch-alias": { 1346 | "dev-master": "1.0-dev" 1347 | } 1348 | }, 1349 | "autoload": { 1350 | "classmap": [ 1351 | "src/" 1352 | ] 1353 | }, 1354 | "notification-url": "https://packagist.org/downloads/", 1355 | "license": [ 1356 | "BSD-3-Clause" 1357 | ], 1358 | "authors": [ 1359 | { 1360 | "name": "Sebastian Bergmann", 1361 | "email": "sebastian@phpunit.de" 1362 | } 1363 | ], 1364 | "description": "Snapshotting of global state", 1365 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1366 | "keywords": [ 1367 | "global state" 1368 | ], 1369 | "time": "2015-10-12T03:26:01+00:00" 1370 | }, 1371 | { 1372 | "name": "sebastian/recursion-context", 1373 | "version": "1.0.5", 1374 | "source": { 1375 | "type": "git", 1376 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1377 | "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" 1378 | }, 1379 | "dist": { 1380 | "type": "zip", 1381 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", 1382 | "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", 1383 | "shasum": "" 1384 | }, 1385 | "require": { 1386 | "php": ">=5.3.3" 1387 | }, 1388 | "require-dev": { 1389 | "phpunit/phpunit": "~4.4" 1390 | }, 1391 | "type": "library", 1392 | "extra": { 1393 | "branch-alias": { 1394 | "dev-master": "1.0.x-dev" 1395 | } 1396 | }, 1397 | "autoload": { 1398 | "classmap": [ 1399 | "src/" 1400 | ] 1401 | }, 1402 | "notification-url": "https://packagist.org/downloads/", 1403 | "license": [ 1404 | "BSD-3-Clause" 1405 | ], 1406 | "authors": [ 1407 | { 1408 | "name": "Jeff Welch", 1409 | "email": "whatthejeff@gmail.com" 1410 | }, 1411 | { 1412 | "name": "Sebastian Bergmann", 1413 | "email": "sebastian@phpunit.de" 1414 | }, 1415 | { 1416 | "name": "Adam Harvey", 1417 | "email": "aharvey@php.net" 1418 | } 1419 | ], 1420 | "description": "Provides functionality to recursively process PHP variables", 1421 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1422 | "time": "2016-10-03T07:41:43+00:00" 1423 | }, 1424 | { 1425 | "name": "sebastian/version", 1426 | "version": "1.0.6", 1427 | "source": { 1428 | "type": "git", 1429 | "url": "https://github.com/sebastianbergmann/version.git", 1430 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" 1431 | }, 1432 | "dist": { 1433 | "type": "zip", 1434 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 1435 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 1436 | "shasum": "" 1437 | }, 1438 | "type": "library", 1439 | "autoload": { 1440 | "classmap": [ 1441 | "src/" 1442 | ] 1443 | }, 1444 | "notification-url": "https://packagist.org/downloads/", 1445 | "license": [ 1446 | "BSD-3-Clause" 1447 | ], 1448 | "authors": [ 1449 | { 1450 | "name": "Sebastian Bergmann", 1451 | "email": "sebastian@phpunit.de", 1452 | "role": "lead" 1453 | } 1454 | ], 1455 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 1456 | "homepage": "https://github.com/sebastianbergmann/version", 1457 | "time": "2015-06-21T13:59:46+00:00" 1458 | }, 1459 | { 1460 | "name": "symfony/polyfill-ctype", 1461 | "version": "v1.11.0", 1462 | "source": { 1463 | "type": "git", 1464 | "url": "https://github.com/symfony/polyfill-ctype.git", 1465 | "reference": "82ebae02209c21113908c229e9883c419720738a" 1466 | }, 1467 | "dist": { 1468 | "type": "zip", 1469 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", 1470 | "reference": "82ebae02209c21113908c229e9883c419720738a", 1471 | "shasum": "" 1472 | }, 1473 | "require": { 1474 | "php": ">=5.3.3" 1475 | }, 1476 | "suggest": { 1477 | "ext-ctype": "For best performance" 1478 | }, 1479 | "type": "library", 1480 | "extra": { 1481 | "branch-alias": { 1482 | "dev-master": "1.11-dev" 1483 | } 1484 | }, 1485 | "autoload": { 1486 | "psr-4": { 1487 | "Symfony\\Polyfill\\Ctype\\": "" 1488 | }, 1489 | "files": [ 1490 | "bootstrap.php" 1491 | ] 1492 | }, 1493 | "notification-url": "https://packagist.org/downloads/", 1494 | "license": [ 1495 | "MIT" 1496 | ], 1497 | "authors": [ 1498 | { 1499 | "name": "Symfony Community", 1500 | "homepage": "https://symfony.com/contributors" 1501 | }, 1502 | { 1503 | "name": "Gert de Pagter", 1504 | "email": "BackEndTea@gmail.com" 1505 | } 1506 | ], 1507 | "description": "Symfony polyfill for ctype functions", 1508 | "homepage": "https://symfony.com", 1509 | "keywords": [ 1510 | "compatibility", 1511 | "ctype", 1512 | "polyfill", 1513 | "portable" 1514 | ], 1515 | "time": "2019-02-06T07:57:58+00:00" 1516 | }, 1517 | { 1518 | "name": "symfony/yaml", 1519 | "version": "v3.4.27", 1520 | "source": { 1521 | "type": "git", 1522 | "url": "https://github.com/symfony/yaml.git", 1523 | "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996" 1524 | }, 1525 | "dist": { 1526 | "type": "zip", 1527 | "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996", 1528 | "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996", 1529 | "shasum": "" 1530 | }, 1531 | "require": { 1532 | "php": "^5.5.9|>=7.0.8", 1533 | "symfony/polyfill-ctype": "~1.8" 1534 | }, 1535 | "conflict": { 1536 | "symfony/console": "<3.4" 1537 | }, 1538 | "require-dev": { 1539 | "symfony/console": "~3.4|~4.0" 1540 | }, 1541 | "suggest": { 1542 | "symfony/console": "For validating YAML files using the lint command" 1543 | }, 1544 | "type": "library", 1545 | "extra": { 1546 | "branch-alias": { 1547 | "dev-master": "3.4-dev" 1548 | } 1549 | }, 1550 | "autoload": { 1551 | "psr-4": { 1552 | "Symfony\\Component\\Yaml\\": "" 1553 | }, 1554 | "exclude-from-classmap": [ 1555 | "/Tests/" 1556 | ] 1557 | }, 1558 | "notification-url": "https://packagist.org/downloads/", 1559 | "license": [ 1560 | "MIT" 1561 | ], 1562 | "authors": [ 1563 | { 1564 | "name": "Fabien Potencier", 1565 | "email": "fabien@symfony.com" 1566 | }, 1567 | { 1568 | "name": "Symfony Community", 1569 | "homepage": "https://symfony.com/contributors" 1570 | } 1571 | ], 1572 | "description": "Symfony Yaml Component", 1573 | "homepage": "https://symfony.com", 1574 | "time": "2019-03-25T07:48:46+00:00" 1575 | }, 1576 | { 1577 | "name": "webmozart/assert", 1578 | "version": "1.4.0", 1579 | "source": { 1580 | "type": "git", 1581 | "url": "https://github.com/webmozart/assert.git", 1582 | "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" 1583 | }, 1584 | "dist": { 1585 | "type": "zip", 1586 | "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", 1587 | "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", 1588 | "shasum": "" 1589 | }, 1590 | "require": { 1591 | "php": "^5.3.3 || ^7.0", 1592 | "symfony/polyfill-ctype": "^1.8" 1593 | }, 1594 | "require-dev": { 1595 | "phpunit/phpunit": "^4.6", 1596 | "sebastian/version": "^1.0.1" 1597 | }, 1598 | "type": "library", 1599 | "extra": { 1600 | "branch-alias": { 1601 | "dev-master": "1.3-dev" 1602 | } 1603 | }, 1604 | "autoload": { 1605 | "psr-4": { 1606 | "Webmozart\\Assert\\": "src/" 1607 | } 1608 | }, 1609 | "notification-url": "https://packagist.org/downloads/", 1610 | "license": [ 1611 | "MIT" 1612 | ], 1613 | "authors": [ 1614 | { 1615 | "name": "Bernhard Schussek", 1616 | "email": "bschussek@gmail.com" 1617 | } 1618 | ], 1619 | "description": "Assertions to validate method input/output with nice error messages.", 1620 | "keywords": [ 1621 | "assert", 1622 | "check", 1623 | "validate" 1624 | ], 1625 | "time": "2018-12-25T11:19:39+00:00" 1626 | } 1627 | ], 1628 | "aliases": [], 1629 | "minimum-stability": "stable", 1630 | "stability-flags": [], 1631 | "prefer-stable": false, 1632 | "prefer-lowest": false, 1633 | "platform": { 1634 | "php": ">=5.4.0" 1635 | }, 1636 | "platform-dev": [] 1637 | } 1638 | -------------------------------------------------------------------------------- /src/ActiveForm.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace light\widgets; 13 | 14 | use yii\base\InvalidConfigException; 15 | use yii\helpers\Html; 16 | use yii\helpers\Json; 17 | 18 | /** 19 | * Usage: 20 | * ~~~ 21 | * use light\widgets\ActiveForm; 22 | * use yii\web\JsExpression;. 23 | * 24 | * ActiveForm::begin([ 25 | * 'ajaxSubmitOptions' => [ 26 | * 'success' => new JsExpression('function(response) {//...}'), 27 | * 'complete' => new JsExpression('function(xhr, msg, $form) {//..}'), 28 | * 'beforeSubmit' => new JsExpression('function(arr, $form) {//...}') 29 | * ] 30 | * ]) 31 | * 32 | * ~~~ 33 | * 34 | * @version 1.0.3 35 | * 36 | * @author lichunqiang 37 | */ 38 | class ActiveForm extends \yii\widgets\ActiveForm 39 | { 40 | /** 41 | * @var bool If enable the ajax submit 42 | */ 43 | public $enableAjaxSubmit = true; 44 | /** 45 | * @var array The options passed to jquery.form, Please see the jquery.form document 46 | */ 47 | public $ajaxSubmitOptions = []; 48 | /** 49 | * @var string For `yii\bootstrap\ActiveForm` compatibility. 50 | */ 51 | public $layout; 52 | 53 | /** 54 | * @inheritdoc 55 | */ 56 | public function init() 57 | { 58 | if ($this->layout) { 59 | if (!in_array($this->layout, ['default', 'horizontal', 'inline'])) { 60 | throw new InvalidConfigException('Invalid layout type: ' . $this->layout); 61 | } 62 | if ($this->layout !== 'default') { 63 | Html::addCssClass($this->options, 'form-' . $this->layout); 64 | } 65 | } 66 | 67 | parent::init(); 68 | } 69 | 70 | /** 71 | * {@inheritdoc} 72 | */ 73 | public function run() 74 | { 75 | if ($this->enableAjaxSubmit) { 76 | $id = $this->options['id']; 77 | $view = $this->getView(); 78 | AjaxFormAsset::register($view); 79 | $_options = Json::htmlEncode($this->ajaxSubmitOptions); 80 | $view->registerJs("jQuery('#$id').yiiActiveForm().on('beforeSubmit', function(_event) { jQuery(_event.target).ajaxSubmit($_options); return false;});"); 81 | } 82 | 83 | return parent::run(); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/AjaxFormAsset.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace light\widgets; 13 | 14 | use yii\web\AssetBundle; 15 | 16 | /** 17 | * jquery.form.js asset bundle. 18 | * 19 | * @version 1.0.1 20 | * 21 | * @author lichunqiang 22 | * 23 | * @see https://github.com/malsup/form 24 | */ 25 | class AjaxFormAsset extends AssetBundle 26 | { 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | public $sourcePath = '@bower/jquery-form'; 31 | 32 | /** 33 | * {@inheritdoc} 34 | */ 35 | public $js = ['jquery.form.js']; 36 | } 37 | --------------------------------------------------------------------------------