diff --git a/console/controllers/TestController.php b/console/controllers/TestController.php new file mode 100644 index 0000000..3919bd6 --- /dev/null +++ b/console/controllers/TestController.php @@ -0,0 +1,35 @@ +security->generateRandomString(8); + $security = Yii::createObject("yii\base\Security"); + $n = 0; + for ($i = 1; $i < 100000; $i++) { + //$key = $security->generateRandomString(8); + $key = rand(10000000, 99999999); + /*$key = strtolower($key); + $key = str_replace(['_', '-'], 'a', $key);*/ + $ret[$key] += 1; + } + + $this->stdout("duplicate data:\n", Console::FG_RED); + foreach ($ret as $k => $v) { + if ($v > 1) { + echo "$k $v\n"; + } + } + } +} diff --git a/vendor/blobt/widgets/Select2.php b/vendor/blobt/widgets/Select2.php index 4595806..1637f33 100644 --- a/vendor/blobt/widgets/Select2.php +++ b/vendor/blobt/widgets/Select2.php @@ -58,7 +58,6 @@ class Select2 extends InputWidget { * @throws \yii\base\InvalidConfigException */ public function run() { - d($this->id); $this->registerAsset(); $this->registerSelect2Js(); return $this->renderSelect(); diff --git a/yii b/yii new file mode 100755 index 0000000..b93b5cf --- /dev/null +++ b/yii @@ -0,0 +1,24 @@ +#!/usr/bin/env php +run(); +exit($exitCode);