diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index 656d4295..a4caf730 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -306,7 +306,6 @@ class Student extends BaseController ]) ->find(); - if($stuinfo){ return json([ 'msg' => '此身份证号与 ' . $stuinfo->stuSchool->jiancheng . ':' . $stuinfo->xingming . ' 重复。' diff --git a/app/renshi/model/Student.php b/app/renshi/model/Student.php index 17263b18..f28d387e 100644 --- a/app/renshi/model/Student.php +++ b/app/renshi/model/Student.php @@ -157,7 +157,7 @@ class Student extends BaseModel } - // 整理表格上传数据并保存 + // 同步表格数据 public function tongBu($stuinfo, $school_id) { // 整理数据 diff --git a/composer.lock b/composer.lock index 54e288cc..54995b86 100644 --- a/composer.lock +++ b/composer.lock @@ -507,16 +507,16 @@ }, { "name": "overtrue/pinyin", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/overtrue/pinyin.git", - "reference": "94fdb3ea6eca5677afd9548111d95bedcd5a4086" + "reference": "9836dae1783bcf5934508a2abe32eca9ea5ee15d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/pinyin/zipball/94fdb3ea6eca5677afd9548111d95bedcd5a4086", - "reference": "94fdb3ea6eca5677afd9548111d95bedcd5a4086", + "url": "https://api.github.com/repos/overtrue/pinyin/zipball/9836dae1783bcf5934508a2abe32eca9ea5ee15d", + "reference": "9836dae1783bcf5934508a2abe32eca9ea5ee15d", "shasum": "", "mirrors": [ { @@ -526,12 +526,26 @@ ] }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5" + "brainmaestro/composer-git-hooks": "^2.7", + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "~8.0" }, "type": "library", + "extra": { + "hooks": { + "pre-commit": [ + "composer test", + "composer fix-style" + ], + "pre-push": [ + "composer test", + "composer check-style" + ] + } + }, "autoload": { "psr-4": { "Overtrue\\Pinyin\\": "src/" @@ -546,7 +560,8 @@ ], "authors": [ { - "name": "Carlos", + "name": "overtrue", + "email": "anzhengchao@gmail.com", "homepage": "http://github.com/overtrue" } ], @@ -557,7 +572,7 @@ "Pinyin", "cn2pinyin" ], - "time": "2019-09-20T12:43:45+00:00" + "time": "2020-04-13T08:53:30+00:00" }, { "name": "phpoffice/phpspreadsheet", @@ -997,16 +1012,16 @@ }, { "name": "topthink/think-helper", - "version": "v3.1.3", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/top-think/think-helper.git", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4" + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10", + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10", "shasum": "", "mirrors": [ { @@ -1038,7 +1053,7 @@ } ], "description": "The ThinkPHP6 Helper Package", - "time": "2019-09-30T02:36:48+00:00" + "time": "2019-11-08T08:01:10+00:00" }, { "name": "topthink/think-migration", @@ -1337,16 +1352,16 @@ "packages-dev": [ { "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "", "mirrors": [ { @@ -1364,7 +1379,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1398,20 +1413,20 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "time": "2020-03-09T19:04:49+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + "reference": "37b0976c78b94856543260ce09b460a7bc852747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", "shasum": "", "mirrors": [ { @@ -1426,7 +1441,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -1459,20 +1474,20 @@ "portable", "shim" ], - "time": "2020-01-13T11:15:53+00:00" + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.5", + "version": "v4.4.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2572839911702b0405479410ea7a1334bfab0b96" + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2572839911702b0405479410ea7a1334bfab0b96", - "reference": "2572839911702b0405479410ea7a1334bfab0b96", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", "shasum": "", "mirrors": [ { @@ -1541,7 +1556,7 @@ "debug", "dump" ], - "time": "2020-02-24T13:10:00+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "topthink/think-trace", diff --git a/database/migrations/20181102003411_student.php b/database/migrations/20181102003411_student.php index 3b2a2067..1d10d5ba 100644 --- a/database/migrations/20181102003411_student.php +++ b/database/migrations/20181102003411_student.php @@ -39,6 +39,8 @@ class Student extends Migrator ->addColumn('shenfenzhenghao','string',['limit'=>18,'default'=>'N1539158918','null'=>false,'comment'=>'身份证号']) ->addColumn('banji_id','integer',['limit'=>11,'default'=>1,'null'=>false,'comment'=>'班级']) ->addColumn('kaoshi','boolean',['limit'=>1,'default'=>1,'null'=>false,'comment'=>'是否参加考试']) + ->addColumn('quanpin','string',['limit'=>30,'default'=>'a','null'=>false,'comment'=>'全拼']) + ->addColumn('shoupin','string',['limit'=>5,'default'=>'a','null'=>false,'comment'=>'简拼']) ->addColumn('create_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'创建时间']) ->addColumn('update_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'更新时间']) ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7402fcfe..73696975 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -514,17 +514,17 @@ }, { "name": "overtrue/pinyin", - "version": "4.0.5", - "version_normalized": "4.0.5.0", + "version": "4.0.6", + "version_normalized": "4.0.6.0", "source": { "type": "git", "url": "https://github.com/overtrue/pinyin.git", - "reference": "94fdb3ea6eca5677afd9548111d95bedcd5a4086" + "reference": "9836dae1783bcf5934508a2abe32eca9ea5ee15d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/pinyin/zipball/94fdb3ea6eca5677afd9548111d95bedcd5a4086", - "reference": "94fdb3ea6eca5677afd9548111d95bedcd5a4086", + "url": "https://api.github.com/repos/overtrue/pinyin/zipball/9836dae1783bcf5934508a2abe32eca9ea5ee15d", + "reference": "9836dae1783bcf5934508a2abe32eca9ea5ee15d", "shasum": "", "mirrors": [ { @@ -534,13 +534,27 @@ ] }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5" + "brainmaestro/composer-git-hooks": "^2.7", + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "~8.0" }, - "time": "2019-09-20T12:43:45+00:00", + "time": "2020-04-13T08:53:30+00:00", "type": "library", + "extra": { + "hooks": { + "pre-commit": [ + "composer test", + "composer fix-style" + ], + "pre-push": [ + "composer test", + "composer check-style" + ] + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -556,7 +570,8 @@ ], "authors": [ { - "name": "Carlos", + "name": "overtrue", + "email": "anzhengchao@gmail.com", "homepage": "http://github.com/overtrue" } ], @@ -893,17 +908,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.14.0", - "version_normalized": "1.14.0.0", + "version": "v1.15.0", + "version_normalized": "1.15.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", - "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", "shasum": "", "mirrors": [ { @@ -918,11 +933,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2020-01-13T11:15:53+00:00", + "time": "2020-03-09T19:04:49+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "installation-source": "dist", @@ -960,17 +975,17 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.14.0", - "version_normalized": "1.14.0.0", + "version": "v1.15.0", + "version_normalized": "1.15.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + "reference": "37b0976c78b94856543260ce09b460a7bc852747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", - "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", "shasum": "", "mirrors": [ { @@ -982,11 +997,11 @@ "require": { "php": ">=5.3.3" }, - "time": "2020-01-13T11:15:53+00:00", + "time": "2020-02-27T09:26:54+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "installation-source": "dist", @@ -1023,17 +1038,17 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.5", - "version_normalized": "4.4.5.0", + "version": "v4.4.7", + "version_normalized": "4.4.7.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2572839911702b0405479410ea7a1334bfab0b96" + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2572839911702b0405479410ea7a1334bfab0b96", - "reference": "2572839911702b0405479410ea7a1334bfab0b96", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", + "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", "shasum": "", "mirrors": [ { @@ -1062,7 +1077,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2020-02-24T13:10:00+00:00", + "time": "2020-03-27T16:54:36+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -1234,17 +1249,17 @@ }, { "name": "topthink/think-helper", - "version": "v3.1.3", - "version_normalized": "3.1.3.0", + "version": "v3.1.4", + "version_normalized": "3.1.4.0", "source": { "type": "git", "url": "https://github.com/top-think/think-helper.git", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4" + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", - "reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10", + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10", "shasum": "", "mirrors": [ { @@ -1256,7 +1271,7 @@ "require": { "php": ">=7.1.0" }, - "time": "2019-09-30T02:36:48+00:00", + "time": "2019-11-08T08:01:10+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/overtrue/pinyin/README.md b/vendor/overtrue/pinyin/README.md index 61ce9c19..69d82237 100644 --- a/vendor/overtrue/pinyin/README.md +++ b/vendor/overtrue/pinyin/README.md @@ -49,9 +49,9 @@ use Overtrue\Pinyin\Pinyin; // 小内存型 $pinyin = new Pinyin(); // 默认 // 内存型 -// $pinyin = new Pinyin('Overtrue\Pinyin\MemoryFileDictLoader'); +// $pinyin = new Pinyin('\\Overtrue\\Pinyin\\MemoryFileDictLoader'); // I/O型 -// $pinyin = new Pinyin('Overtrue\Pinyin\GeneratorFileDictLoader'); +// $pinyin = new Pinyin('\\Overtrue\\Pinyin\\GeneratorFileDictLoader'); $pinyin->convert('带着希望去旅行,比到达终点更美好'); // ["dai", "zhe", "xi", "wang", "qu", "lyu", "xing", "bi", "dao", "da", "zhong", "dian", "geng", "mei", "hao"] diff --git a/vendor/overtrue/pinyin/composer.json b/vendor/overtrue/pinyin/composer.json index 91786e16..46849f2c 100644 --- a/vendor/overtrue/pinyin/composer.json +++ b/vendor/overtrue/pinyin/composer.json @@ -10,8 +10,9 @@ "license": "MIT", "authors": [ { - "name": "Carlos", - "homepage": "http://github.com/overtrue" + "name": "overtrue", + "homepage": "http://github.com/overtrue", + "email": "anzhengchao@gmail.com" } ], "autoload": { @@ -26,9 +27,42 @@ } }, "require": { - "php":">=5.5" + "php":">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5" + "phpunit/phpunit": "~8.0", + "brainmaestro/composer-git-hooks": "^2.7", + "friendsofphp/php-cs-fixer": "^2.16" + }, + "extra": { + "hooks": { + "pre-commit": [ + "composer test", + "composer fix-style" + ], + "pre-push": [ + "composer test", + "composer check-style" + ] + } + }, + "scripts": { + "post-update-cmd": [ + "cghooks update" + ], + "post-merge": "composer install", + "post-install-cmd": [ + "cghooks add --ignore-lock", + "cghooks update" + ], + "cghooks": "vendor/bin/cghooks", + "check-style": "php-cs-fixer fix --using-cache=no --diff --config=.php_cs --dry-run --ansi", + "fix-style": "php-cs-fixer fix --using-cache=no --config=.php_cs --ansi", + "test": "vendor/bin/phpunit --colors=always" + }, + "scripts-descriptions": { + "test": "Run all tests.", + "check-style": "Run style checks (only dry run - no fixing!).", + "fix-style": "Run style checks and fix violations." } } diff --git a/vendor/overtrue/pinyin/src/Pinyin.php b/vendor/overtrue/pinyin/src/Pinyin.php index 8f6f2aa1..537c8c6d 100644 --- a/vendor/overtrue/pinyin/src/Pinyin.php +++ b/vendor/overtrue/pinyin/src/Pinyin.php @@ -303,7 +303,7 @@ class Pinyin $regex = array('\p{Han}', '\p{Z}', '\p{M}', "\t"); if ($this->hasOption($option, \PINYIN_KEEP_NUMBER)) { - \array_push($regex, '\p{N}'); + \array_push($regex, '0-9'); } if ($this->hasOption($option, \PINYIN_KEEP_ENGLISH)) { diff --git a/vendor/services.php b/vendor/services.php index 593cc4eb..65fa597a 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\captcha\\CaptchaService', diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md index 342e8286..4efb599d 100644 --- a/vendor/symfony/polyfill-mbstring/README.md +++ b/vendor/symfony/polyfill-mbstring/README.md @@ -2,7 +2,7 @@ Symfony Polyfill / Mbstring =========================== This component provides a partial, native PHP implementation for the -[Mbstring](http://php.net/mbstring) extension. +[Mbstring](https://php.net/mbstring) extension. More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php index 204a41ba..8c8225c5 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -11,11 +11,13 @@ use Symfony\Polyfill\Mbstring as p; -if (!function_exists('mb_strlen')) { +if (!defined('MB_CASE_UPPER')) { define('MB_CASE_UPPER', 0); define('MB_CASE_LOWER', 1); define('MB_CASE_TITLE', 2); +} +if (!function_exists('mb_strlen')) { function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index 1a8bec5c..02b8896f 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } } } diff --git a/vendor/symfony/polyfill-php72/README.md b/vendor/symfony/polyfill-php72/README.md index 82c45f7a..8ac181e4 100644 --- a/vendor/symfony/polyfill-php72/README.md +++ b/vendor/symfony/polyfill-php72/README.md @@ -16,7 +16,7 @@ Moved to core since 7.2 (was in the optional XML extension earlier): - [`utf8_decode`](https://php.net/utf8_decode) Also, it provides a constant added to PHP 7.2: -- [`PHP_OS_FAMILY`](http://php.net/manual/en/reserved.constants.php#constant.php-os-family) +- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json index d2f84641..27901f2a 100644 --- a/vendor/symfony/polyfill-php72/composer.json +++ b/vendor/symfony/polyfill-php72/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } } } diff --git a/vendor/symfony/var-dumper/.gitattributes b/vendor/symfony/var-dumper/.gitattributes deleted file mode 100644 index ebb92870..00000000 --- a/vendor/symfony/var-dumper/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/Tests export-ignore -/phpunit.xml.dist export-ignore -/.gitignore export-ignore diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php index 7e148bf4..8461de94 100644 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ b/vendor/symfony/var-dumper/Cloner/Data.php @@ -122,7 +122,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate public function getIterator() { if (!\is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value))); + throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, \gettype($value))); } yield from $value; @@ -396,7 +396,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate break; default: - throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); + throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); } } elseif ('array' === $type) { $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); diff --git a/vendor/symfony/var-dumper/Cloner/VarCloner.php b/vendor/symfony/var-dumper/Cloner/VarCloner.php index f6403381..75829d74 100644 --- a/vendor/symfony/var-dumper/Cloner/VarCloner.php +++ b/vendor/symfony/var-dumper/Cloner/VarCloner.php @@ -46,7 +46,7 @@ class VarCloner extends AbstractCloner // or null if the original value is used directly if (!$gid = self::$gid) { - $gid = self::$gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable + $gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable } $arrayStub = new Stub(); $arrayStub->type = Stub::TYPE_ARRAY; diff --git a/vendor/topthink/think-helper/src/Collection.php b/vendor/topthink/think-helper/src/Collection.php index fe676977..905f3f86 100644 --- a/vendor/topthink/think-helper/src/Collection.php +++ b/vendor/topthink/think-helper/src/Collection.php @@ -353,7 +353,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria return $this->filter(function ($data) use ($field, $operator, $value) { if (strpos($field, '.')) { - list($field, $relation) = explode('.', $field); + [$field, $relation] = explode('.', $field); $result = $data[$field][$relation] ?? null; } else { @@ -385,10 +385,10 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria case 'not in': return is_scalar($result) && !in_array($result, $value, true); case 'between': - list($min, $max) = is_string($value) ? explode(',', $value) : $value; + [$min, $max] = is_string($value) ? explode(',', $value) : $value; return is_scalar($result) && $result >= $min && $result <= $max; case 'not between': - list($min, $max) = is_string($value) ? explode(',', $value) : $value; + [$min, $max] = is_string($value) ? explode(',', $value) : $value; return is_scalar($result) && $result > $max || $result < $min; case '==': case '=': @@ -473,11 +473,11 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria /** * 返回数据中指定的一列 * @access public - * @param string $columnKey 键名 - * @param string $indexKey 作为索引值的列 + * @param string|null $columnKey 键名 + * @param string|null $indexKey 作为索引值的列 * @return array */ - public function column(string $columnKey, string $indexKey = null) + public function column(?string $columnKey, string $indexKey = null) { return array_column($this->items, $columnKey, $indexKey); } @@ -509,13 +509,13 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria * @param string $order 排序 * @return $this */ - public function order(string $field, string $order = null) + public function order(string $field, string $order = 'asc') { return $this->sort(function ($a, $b) use ($field, $order) { - $fieldA = (string)$a[$field] ?? null; - $fieldB = (string)$b[$field] ?? null; + $fieldA = $a[$field] ?? null; + $fieldB = $b[$field] ?? null; - return 'desc' == strtolower($order) ? strcmp($fieldB, $fieldA) : strcmp($fieldA, $fieldB); + return 'desc' == strtolower($order) ? $fieldB > $fieldA : $fieldA > $fieldB; }); } @@ -535,7 +535,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria } /** - * 获取最后一个单元数据 + * 获取最第一个单元数据 * * @access public * @param callable|null $callback @@ -548,7 +548,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria } /** - * 获取第一个单元数据 + * 获取最后一个单元数据 * * @access public * @param callable|null $callback