From 09777c88c8a5ba8a3a23af2bde381dc68cf3eba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Tue, 13 Oct 2020 19:48:20 +0800 Subject: [PATCH] 0 --- app/chengji/controller/Index.php | 6 +- app/chengji/model/Tongji.php | 6 +- app/tools/model/OneStudentChengji.php | 7 +- composer.lock | 145 +++++++++--------- .../migrations/20200929084131_fen_gong.php | 2 +- .../migrations/20200930024810_class_room.php | 46 ------ database/seeds/Rule.php | 45 ------ vendor/composer/autoload_files.php | 2 +- vendor/composer/autoload_static.php | 2 +- vendor/composer/installed.json | 13 +- vendor/services.php | 2 +- vendor/topthink/framework/README.md | 2 +- vendor/topthink/framework/composer.json | 1 + vendor/topthink/framework/src/think/App.php | 2 +- .../topthink/framework/src/think/Config.php | 4 - .../topthink/framework/src/think/Console.php | 83 ++-------- .../framework/src/think/Container.php | 9 +- vendor/topthink/framework/src/think/Http.php | 12 +- vendor/topthink/framework/src/think/Lang.php | 12 -- vendor/topthink/framework/src/think/Route.php | 18 +-- .../topthink/framework/src/think/Validate.php | 3 +- .../src/think/cache/driver/Redis.php | 2 +- .../console/command/make/stubs/command.stub | 6 +- .../console/command/make/stubs/listener.stub | 2 +- .../console/command/make/stubs/service.stub | 4 +- .../console/command/make/stubs/validate.stub | 12 +- .../think/console/command/optimize/Route.php | 7 +- .../src/think/console/input/Option.php | 33 +--- .../think/middleware/CheckRequestCache.php | 40 ++--- .../framework/src/think/route/Rule.php | 78 +++++----- .../framework/src/think/route/RuleGroup.php | 18 ++- .../framework/src/think/route/RuleItem.php | 16 +- .../framework/src/think/route/RuleName.php | 24 +-- .../framework/src/think/route/Url.php | 6 +- .../src/think/session/driver/File.php | 2 +- .../framework/tests/ContainerTest.php | 1 - vendor/topthink/framework/tests/HttpTest.php | 1 - 37 files changed, 216 insertions(+), 458 deletions(-) delete mode 100644 database/migrations/20200930024810_class_room.php diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index fe035311..39e55293 100644 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -558,9 +558,9 @@ class Index extends AdminBase $sheet->setCellValue('D' . ($row + $k), $val['title']); $sheet->setCellValue('E' . ($row + $k), $value[$val['lieming']]); # 得分 $sheet->setCellValue('F' . ($row + $k), $njtj['cj'][$val['lieming']]['avg']); - $sheet->setCellValue('G' . ($row + $k), $njtj['cj'][$val['lieming']]['max']); - $sheet->setCellValue('H' . ($row + $k), $njtj['cj'][$val['lieming']]['youxiu']); - $sheet->setCellValue('I' . ($row + $k), $njtj['cj'][$val['lieming']]['jige']); + $sheet->setCellValue('G' . ($row + $k), $njtj['cj'][$val['lieming']]['youxiu']); + $sheet->setCellValue('H' . ($row + $k), $njtj['cj'][$val['lieming']]['jige']); + $sheet->setCellValue('I' . ($row + $k), $njtj['cj'][$val['lieming']]['max']); $sheet->setCellValue('J' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][0]); $sheet->setCellValue('K' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][1]); $sheet->setCellValue('L' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][2]); diff --git a/app/chengji/model/Tongji.php b/app/chengji/model/Tongji.php index 52430861..a1d6c18e 100644 --- a/app/chengji/model/Tongji.php +++ b/app/chengji/model/Tongji.php @@ -246,15 +246,15 @@ class Tongji extends BaseModel $zws = 0; $cnt = count($arr); - if ($cnt === 1) { + if ($cnt = 1) { $zws = $arr[0]; }elseif ($cnt > 1) { $mod = $cnt % 2; if ($mod == 0) { $i = $cnt / 2; - $zws = ($arr[$i - 1] + $arr[$i]) / 2; + $zws = ($arr[$i] + $arr[$i + 1]) / 2; }else{ - $i = ($cnt - 1) / 2; + $i = ($cnt + 1) / 2; $zws = $arr[$i]; } }else{ diff --git a/app/tools/model/OneStudentChengji.php b/app/tools/model/OneStudentChengji.php index c16918bb..5dbb5d5e 100644 --- a/app/tools/model/OneStudentChengji.php +++ b/app/tools/model/OneStudentChengji.php @@ -1010,12 +1010,17 @@ class OneStudentChengji extends BaseModel { if(strlen($fu) > 0) { - $py = $py . $ling . ',' . $fu . '。'; + $py = $py . $ling . ',' . $fu; }else{ $py = $py . $ling . '。'; } } + if(strlen($fu) > 0) + { + $py = $py . $fu . '。'; + } + return $py; } diff --git a/composer.lock b/composer.lock index a3628497..69a54d5f 100644 --- a/composer.lock +++ b/composer.lock @@ -438,6 +438,73 @@ ], "time": "2019-10-06T11:29:25+00:00" }, + { + "name": "opis/closure", + "version": "3.5.1", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", + "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "time": "2019-11-29T22:36:02+00:00" + }, { "name": "overtrue/pinyin", "version": "4.0.6", @@ -822,16 +889,16 @@ }, { "name": "topthink/framework", - "version": "v6.0.4", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "4b252d78562d4a51a501651f837c26cb9d91624f" + "reference": "b4046fb21e6163ba23a792b694162693dbe71b4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/4b252d78562d4a51a501651f837c26cb9d91624f", - "reference": "4b252d78562d4a51a501651f837c26cb9d91624f", + "url": "https://api.github.com/repos/top-think/framework/zipball/b4046fb21e6163ba23a792b694162693dbe71b4b", + "reference": "b4046fb21e6163ba23a792b694162693dbe71b4b", "shasum": "", "mirrors": [ { @@ -845,6 +912,7 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", + "opis/closure": "^3.1", "php": ">=7.1.0", "psr/container": "~1.0", "psr/log": "~1.0", @@ -885,7 +953,7 @@ "orm", "thinkphp" ], - "time": "2020-09-29T02:19:59+00:00" + "time": "2020-06-26T16:03:10+00:00" }, { "name": "topthink/think-captcha", @@ -1329,73 +1397,6 @@ } ], "packages-dev": [ - { - "name": "opis/closure", - "version": "3.5.1", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "time": "2019-11-29T22:36:02+00:00" - }, { "name": "symfony/polyfill-mbstring", "version": "v1.15.0", diff --git a/database/migrations/20200929084131_fen_gong.php b/database/migrations/20200929084131_fen_gong.php index 6fbdd37c..12b43b97 100644 --- a/database/migrations/20200929084131_fen_gong.php +++ b/database/migrations/20200929084131_fen_gong.php @@ -29,7 +29,7 @@ class FenGong extends Migrator public function change() { // 定义数据表名称 - $table = $this->table('fen_gong'); + $table = $this->table('ke_cheng_biao_temp'); // 添加当前表字段 $table diff --git a/database/migrations/20200930024810_class_room.php b/database/migrations/20200930024810_class_room.php deleted file mode 100644 index dbc1bd1e..00000000 --- a/database/migrations/20200930024810_class_room.php +++ /dev/null @@ -1,46 +0,0 @@ -table('class_room'); - - // 添加当前表字段 - $table - ->addColumn('title','string',['limit'=>80,'null'=>true,'comment'=>'标题']) - ->addColumn('dizhi','string',['limit'=>80,'null'=>true,'comment'=>'地址']) - ->addColumn('classmax','integer',['limit'=>11,'default'=>'1','null'=>false,'comment'=>'最大能容纳多少个班级']) - ->addColumn('teacher_id','integer',['limit'=>11,'null'=>true,'comment'=>'教师ID']) - ->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'=>'删除时间']) - ->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注']) - ->create(); - } -} diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index 0b9e0f95..2e7ef1e5 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -852,51 +852,6 @@ class Rule extends Seeder ,'paixu' => 8 ,'pid' => 503 ], - ['id' => 504 - ,'title' => '教室列表' - ,'name' => 'teach/classroom/index' - ,'paixu' => 4 - ,'ismenu' => 1 - ,'pid' => 5 - ,'url' => '/teach/classroom' - ], - // 学科列表权限 - ['id' => 50401 - ,'title' => '添加' - ,'name' => 'teach/classroom/create' - ,'paixu' => 1 - ,'pid' => 504 - ], - ['id' => 50402 - ,'title' => '保存' - ,'name' => 'teach/classroom/save' - ,'paixu' => 2 - ,'pid' => 504 - ], - ['id' => 50403 - ,'title' => '删除' - ,'name' => 'teach/classroom/delete' - ,'paixu' => 3 - ,'pid' => 504 - ], - ['id' => 50404 - ,'title' => '编辑' - ,'name' => 'teach/classroom/edit' - ,'paixu' => 4 - ,'pid' => 504 - ], - ['id' => 50405 - ,'title' => '更新' - ,'name' => 'teach/classroom/update' - ,'paixu' => 5 - ,'pid' => 504 - ], - ['id' => 50406 - ,'title' => '状态' - ,'name' => 'teach/classroom/setstatus' - ,'paixu' => 6 - ,'pid' => 504 - ], /*====================================================================== * 考试管理 diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 67efce19..8e419695 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir); return array( '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', + '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', '1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php', @@ -67,7 +68,6 @@ return array( '6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', - '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', 'dc1275c308c5b416beb314b6317daca2' => $vendorDir . '/overtrue/pinyin/src/const.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index adb60e10..712bd612 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,6 +8,7 @@ class ComposerStaticInitb9e4f0134ed78dbdc8a5ce7a1ab58175 { public static $files = array ( '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', + '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', '1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php', @@ -68,7 +69,6 @@ class ComposerStaticInitb9e4f0134ed78dbdc8a5ce7a1ab58175 '6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', - '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', 'dc1275c308c5b416beb314b6317daca2' => __DIR__ . '/..' . '/overtrue/pinyin/src/const.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index f264ac25..4993551c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1122,17 +1122,17 @@ }, { "name": "topthink/framework", - "version": "v6.0.4", - "version_normalized": "6.0.4.0", + "version": "v6.0.3", + "version_normalized": "6.0.3.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "4b252d78562d4a51a501651f837c26cb9d91624f" + "reference": "b4046fb21e6163ba23a792b694162693dbe71b4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/4b252d78562d4a51a501651f837c26cb9d91624f", - "reference": "4b252d78562d4a51a501651f837c26cb9d91624f", + "url": "https://api.github.com/repos/top-think/framework/zipball/b4046fb21e6163ba23a792b694162693dbe71b4b", + "reference": "b4046fb21e6163ba23a792b694162693dbe71b4b", "shasum": "", "mirrors": [ { @@ -1146,6 +1146,7 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", + "opis/closure": "^3.1", "php": ">=7.1.0", "psr/container": "~1.0", "psr/log": "~1.0", @@ -1158,7 +1159,7 @@ "mockery/mockery": "^1.2", "phpunit/phpunit": "^7.0" }, - "time": "2020-09-29T02:19:59+00:00", + "time": "2020-06-26T16:03:10+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/services.php b/vendor/services.php index 84e00418..9787a691 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\captcha\\CaptchaService', diff --git a/vendor/topthink/framework/README.md b/vendor/topthink/framework/README.md index 6bb78e9b..be0bb4e6 100644 --- a/vendor/topthink/framework/README.md +++ b/vendor/topthink/framework/README.md @@ -13,7 +13,7 @@ ThinkPHP 6.0 ThinkPHP6.0底层架构采用PHP7.1改写和进一步优化。 -[官方应用服务市场](https://market.topthink.com) | [`ThinkPHP`开发者扶持计划](https://sites.thinkphp.cn/1782366) +[官方应用服务市场](https://www.thinkphp.cn/service) | [`ThinkPHP`开发者扶持计划](https://sites.thinkphp.cn/1782366) ## 主要新特性 diff --git a/vendor/topthink/framework/composer.json b/vendor/topthink/framework/composer.json index 9afc513a..1405162e 100644 --- a/vendor/topthink/framework/composer.json +++ b/vendor/topthink/framework/composer.json @@ -24,6 +24,7 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", + "opis/closure": "^3.1", "psr/log": "~1.0", "psr/container": "~1.0", "psr/simple-cache": "^1.0", diff --git a/vendor/topthink/framework/src/think/App.php b/vendor/topthink/framework/src/think/App.php index c23a03c8..09433950 100644 --- a/vendor/topthink/framework/src/think/App.php +++ b/vendor/topthink/framework/src/think/App.php @@ -39,7 +39,7 @@ use think\initializer\RegisterService; */ class App extends Container { - const VERSION = '6.0.4'; + const VERSION = '6.0.3'; /** * 应用调试模式 diff --git a/vendor/topthink/framework/src/think/Config.php b/vendor/topthink/framework/src/think/Config.php index 3a157555..78933adc 100644 --- a/vendor/topthink/framework/src/think/Config.php +++ b/vendor/topthink/framework/src/think/Config.php @@ -116,10 +116,6 @@ class Config */ public function has(string $name): bool { - if (false === strpos($name, '.') && !isset($this->config[strtolower($name)])) { - return false; - } - return !is_null($this->get($name)); } diff --git a/vendor/topthink/framework/src/think/Console.php b/vendor/topthink/framework/src/think/Console.php index 389d104d..a1398d5d 100644 --- a/vendor/topthink/framework/src/think/Console.php +++ b/vendor/topthink/framework/src/think/Console.php @@ -57,7 +57,7 @@ class Console protected $catchExceptions = true; protected $autoExit = true; protected $definition; - protected $defaultCommand = 'list'; + protected $defaultCommand = 'list'; protected $defaultCommands = [ 'help' => Help::class, @@ -91,7 +91,9 @@ class Console { $this->app = $app; - $this->initialize(); + if (!$this->app->initialized()) { + $this->app->initialize(); + } $this->definition = $this->getDefaultInputDefinition(); @@ -101,63 +103,6 @@ class Console $this->start(); } - /** - * 初始化 - */ - protected function initialize() - { - if (!$this->app->initialized()) { - $this->app->initialize(); - } - $this->makeRequest(); - } - - /** - * 构造request - */ - protected function makeRequest() - { - $uri = $this->app->config->get('app.url', 'http://localhost'); - - $components = parse_url($uri); - - $server = $_SERVER; - - if (isset($components['path'])) { - $server = array_merge($server, [ - 'SCRIPT_FILENAME' => $components['path'], - 'SCRIPT_NAME' => $components['path'], - ]); - } - - if (isset($components['host'])) { - $server['SERVER_NAME'] = $components['host']; - $server['HTTP_HOST'] = $components['host']; - } - - if (isset($components['scheme'])) { - if ('https' === $components['scheme']) { - $server['HTTPS'] = 'on'; - $server['SERVER_PORT'] = 443; - } else { - unset($server['HTTPS']); - $server['SERVER_PORT'] = 80; - } - } - - if (isset($components['port'])) { - $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] .= ':' . $components['port']; - } - - $server['REQUEST_URI'] = $uri; - - /** @var Request $request */ - $request = $this->app->make('request'); - - $request->withServer($server); - } - /** * 添加初始化器 * @param Closure $callback @@ -216,7 +161,7 @@ class Console /** * @access public * @param string $command - * @param array $parameters + * @param array $parameters * @param string $driver * @return Output|Buffer */ @@ -281,7 +226,7 @@ class Console /** * 执行指令 * @access public - * @param Input $input + * @param Input $input * @param Output $output * @return int */ @@ -399,7 +344,7 @@ class Console * 添加一个指令 * @access public * @param string|Command $command 指令对象或者指令类名 - * @param string $name 指令名 留空则自动获取 + * @param string $name 指令名 留空则自动获取 * @return Command|void */ public function addCommand($command, string $name = '') @@ -517,7 +462,7 @@ class Console $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]) . '[^:]*'; }, $namespace); - $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); + $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); if (empty($namespaces)) { $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); @@ -615,7 +560,7 @@ class Console /** * 配置基于用户的参数和选项的输入和输出实例。 * @access protected - * @param Input $input 输入实例 + * @param Input $input 输入实例 * @param Output $output 输出实例 */ protected function configureIO(Input $input, Output $output): void @@ -645,8 +590,8 @@ class Console * 执行指令 * @access protected * @param Command $command 指令实例 - * @param Input $input 输入实例 - * @param Output $output 输出实例 + * @param Input $input 输入实例 + * @param Output $output 输出实例 * @return int * @throws \Exception */ @@ -699,8 +644,8 @@ class Console /** * 返回命名空间部分 * @access public - * @param string $name 指令 - * @param int $limit 部分的命名空间的最大数量 + * @param string $name 指令 + * @param int $limit 部分的命名空间的最大数量 * @return string */ public function extractNamespace(string $name, int $limit = 0): string @@ -714,7 +659,7 @@ class Console /** * 查找可替代的建议 * @access private - * @param string $name + * @param string $name * @param array|\Traversable $collection * @return array */ diff --git a/vendor/topthink/framework/src/think/Container.php b/vendor/topthink/framework/src/think/Container.php index 7910bb3d..215524f1 100644 --- a/vendor/topthink/framework/src/think/Container.php +++ b/vendor/topthink/framework/src/think/Container.php @@ -152,9 +152,8 @@ class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, C $this->instance($abstract, $concrete); } else { $abstract = $this->getAlias($abstract); - if ($abstract != $concrete) { - $this->bind[$abstract] = $concrete; - } + + $this->bind[$abstract] = $concrete; } return $this; @@ -446,9 +445,9 @@ class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, C $args[] = $this->getObjectParam($class->getName(), $vars); } elseif (1 == $type && !empty($vars)) { $args[] = array_shift($vars); - } elseif (0 == $type && array_key_exists($name, $vars)) { + } elseif (0 == $type && isset($vars[$name])) { $args[] = $vars[$name]; - } elseif (0 == $type && array_key_exists($lowerName, $vars)) { + } elseif (0 == $type && isset($vars[$lowerName])) { $args[] = $vars[$lowerName]; } elseif ($param->isDefaultValueAvailable()) { $args[] = $param->getDefaultValue(); diff --git a/vendor/topthink/framework/src/think/Http.php b/vendor/topthink/framework/src/think/Http.php index 4bc632c4..6de30b59 100644 --- a/vendor/topthink/framework/src/think/Http.php +++ b/vendor/topthink/framework/src/think/Http.php @@ -42,12 +42,6 @@ class Http */ protected $path; - /** - * 路由路径 - * @var string - */ - protected $routePath; - /** * 是否绑定应用 * @var bool @@ -123,6 +117,7 @@ class Http * 设置路由目录 * @access public * @param string $path 路由定义目录 + * @return string */ public function setRoutePath(string $path): void { @@ -159,9 +154,6 @@ class Http */ public function run(Request $request = null): Response { - //初始化 - $this->initialize(); - //自动创建request对象 $request = $request ?? $this->app->make('request', [], true); $this->app->instance('request', $request); @@ -194,6 +186,8 @@ class Http */ protected function runWithRequest(Request $request) { + $this->initialize(); + // 加载全局中间件 $this->loadMiddleware(); diff --git a/vendor/topthink/framework/src/think/Lang.php b/vendor/topthink/framework/src/think/Lang.php index d811ea71..be27f5e7 100644 --- a/vendor/topthink/framework/src/think/Lang.php +++ b/vendor/topthink/framework/src/think/Lang.php @@ -153,18 +153,6 @@ class Lang if (function_exists('yaml_parse_file')) { $result = yaml_parse_file($file); } - break; - case 'json': - $data = file_get_contents($file); - - if($data !== false) { - $data = json_decode($data, true); - - if(json_last_error() === JSON_ERROR_NONE) { - $result = $data; - } - } - break; } diff --git a/vendor/topthink/framework/src/think/Route.php b/vendor/topthink/framework/src/think/Route.php index a8b9718d..e3be55da 100644 --- a/vendor/topthink/framework/src/think/Route.php +++ b/vendor/topthink/framework/src/think/Route.php @@ -165,12 +165,12 @@ class Route // 读取路由映射文件 $this->import(include $this->app->getRuntimePath() . 'route.php'); } - - $this->config = array_merge($this->config, $this->app->config->get('route')); } protected function init() { + $this->config = array_merge($this->config, $this->app->config->get('route')); + if (!empty($this->config['middleware'])) { $this->app->middleware->import($this->config['middleware'], 'route'); } @@ -423,7 +423,7 @@ class Route * @param string $name 路由标识 * @param string $domain 域名 * @param string $method 请求类型 - * @return array + * @return RuleItem[] */ public function getName(string $name = null, string $domain = null, string $method = '*'): array { @@ -681,18 +681,6 @@ class Route public function redirect(string $rule, string $route = '', int $status = 301): RuleItem { return $this->rule($rule, function () use ($status, $route) { - $search = $replace = []; - $matches = $this->request->rule()->getVars(); - - foreach ($matches as $key => $value) { - $search[] = '<' . $key . '>'; - $replace[] = $value; - - $search[] = ':' . $key; - $replace[] = $value; - } - - $route = str_replace($search, $replace, $route); return Response::create($route, 'redirect')->code($status); }, '*'); } diff --git a/vendor/topthink/framework/src/think/Validate.php b/vendor/topthink/framework/src/think/Validate.php index 801a69af..42e64e38 100644 --- a/vendor/topthink/framework/src/think/Validate.php +++ b/vendor/topthink/framework/src/think/Validate.php @@ -605,7 +605,6 @@ class Validate if (isset($this->append[$field])) { // 追加额外的验证规则 $rules = array_unique(array_merge($rules, $this->append[$field]), SORT_REGULAR); - unset($this->append[$field]); } if (empty($rules)) { @@ -664,7 +663,7 @@ class Validate $i++; } - return $result ?? true; + return $result; } /** diff --git a/vendor/topthink/framework/src/think/cache/driver/Redis.php b/vendor/topthink/framework/src/think/cache/driver/Redis.php index 151b37c6..487f66ba 100644 --- a/vendor/topthink/framework/src/think/cache/driver/Redis.php +++ b/vendor/topthink/framework/src/think/cache/driver/Redis.php @@ -87,7 +87,7 @@ class Redis extends Driver } if (0 != $this->options['select']) { - $this->handler->select( (int) $this->options['select']); + $this->handler->select($this->options['select']); } } diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub index 3ee2b1cf..e9121cdd 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub @@ -15,12 +15,12 @@ class {%className%} extends Command { // 指令配置 $this->setName('{%commandName%}') - ->setDescription('the {%commandName%} command'); + ->setDescription('the {%commandName%} command'); } protected function execute(Input $input, Output $output) { - // 指令输出 - $output->writeln('{%commandName%}'); + // 指令输出 + $output->writeln('{%commandName%}'); } } diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub index 03724380..d55e7c4e 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub @@ -13,5 +13,5 @@ class {%className%} public function handle($event) { // - } + } } diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub index 5d74d15c..6ec93fe8 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub @@ -3,8 +3,9 @@ declare (strict_types = 1); namespace {%namespace%}; -class {%className%} extends \think\Service +class {%className%} extends \think\Service { + /** * 注册服务 * @@ -15,6 +16,7 @@ class {%className%} extends \think\Service // } + /** * 执行服务 * diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub index d1fedd8d..b5969797 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub @@ -9,17 +9,17 @@ class {%className%} extends Validate { /** * 定义验证规则 - * 格式:'字段名' => ['规则1','规则2'...] + * 格式:'字段名' => ['规则1','规则2'...] * * @var array - */ - protected $rule = []; - + */ + protected $rule = []; + /** * 定义错误信息 - * 格式:'字段名.规则名' => '错误信息' + * 格式:'字段名.规则名' => '错误信息' * * @var array - */ + */ protected $message = []; } diff --git a/vendor/topthink/framework/src/think/console/command/optimize/Route.php b/vendor/topthink/framework/src/think/console/command/optimize/Route.php index 56f7f5a9..bd4f79c1 100644 --- a/vendor/topthink/framework/src/think/console/command/optimize/Route.php +++ b/vendor/topthink/framework/src/think/console/command/optimize/Route.php @@ -46,7 +46,7 @@ class Route extends Command $this->app->route->lazy(false); // 路由检测 - $path = $this->app->getRootPath() . ($dir ? 'app' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR : '') . 'route' . DIRECTORY_SEPARATOR; + $path = $this->app->getRootPath() . ($dir ? 'app' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR : '') . 'route' . DIRECTORY_SEPARATOR ; $files = is_dir($path) ? scandir($path) : []; @@ -58,9 +58,10 @@ class Route extends Command //触发路由载入完成事件 $this->app->event->trigger(RouteLoaded::class); - $rules = $this->app->route->getName(); - return 'app->route->getName()) . '\');'; + return $content; } } diff --git a/vendor/topthink/framework/src/think/console/input/Option.php b/vendor/topthink/framework/src/think/console/input/Option.php index 19c7e1e8..e5707c9a 100644 --- a/vendor/topthink/framework/src/think/console/input/Option.php +++ b/vendor/topthink/framework/src/think/console/input/Option.php @@ -11,49 +11,18 @@ namespace think\console\input; -/** - * 命令行选项 - * @package think\console\input - */ class Option { - // 无需传值 + const VALUE_NONE = 1; - // 必须传值 const VALUE_REQUIRED = 2; - // 可选传值 const VALUE_OPTIONAL = 4; - // 传数组值 const VALUE_IS_ARRAY = 8; - /** - * 选项名 - * @var string - */ private $name; - - /** - * 选项短名称 - * @var string - */ private $shortcut; - - /** - * 选项类型 - * @var int - */ private $mode; - - /** - * 选项默认值 - * @var mixed - */ private $default; - - /** - * 选项描述 - * @var string - */ private $description; /** diff --git a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php b/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php index 6e220562..f2d8a62d 100644 --- a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php +++ b/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php @@ -61,24 +61,17 @@ class CheckRequestCache public function handle($request, Closure $next, $cache = null) { if ($request->isGet() && false !== $cache) { - if (false === $this->config['request_cache_key']) { - // 关闭当前缓存 - $cache = false; - } - - $cache = $cache ?? $this->getRequestCache($request); + $cache = $cache ?: $this->getRequestCache($request); if ($cache) { if (is_array($cache)) { - [$key, $expire, $tag] = array_pad($cache, 3, null); + [$key, $expire, $tag] = $cache; } else { - $key = md5($request->url(true)); + $key = str_replace('|', '/', $request->url()); $expire = $cache; $tag = null; } - $key = $this->parseCacheKey($request, $key); - if (strtotime($request->server('HTTP_IF_MODIFIED_SINCE', '')) + $expire > $request->server('REQUEST_TIME')) { // 读取缓存 return Response::create()->code(304); @@ -118,24 +111,6 @@ class CheckRequestCache $except = $this->config['request_cache_except']; $tag = $this->config['request_cache_tag']; - foreach ($except as $rule) { - if (0 === stripos($request->url(), $rule)) { - return; - } - } - - return [$key, $expire, $tag]; - } - - /** - * 读取当前地址的请求缓存信息 - * @access protected - * @param Request $request - * @param mixed $key - * @return null|string - */ - protected function parseCacheKey($request, $key) - { if ($key instanceof \Closure) { $key = call_user_func($key, $request); } @@ -145,6 +120,12 @@ class CheckRequestCache return; } + foreach ($except as $rule) { + if (0 === stripos($request->url(), $rule)) { + return; + } + } + if (true === $key) { // 自动缓存功能 $key = '__URL__'; @@ -159,7 +140,6 @@ class CheckRequestCache if (false !== strpos($key, ':')) { $param = $request->param(); - foreach ($param as $item => $val) { if (is_string($val) && false !== strpos($key, ':' . $item)) { $key = str_replace(':' . $item, $val, $key); @@ -178,6 +158,6 @@ class CheckRequestCache $key = $fun($key); } - return $key; + return [$key, $expire, $tag]; } } diff --git a/vendor/topthink/framework/src/think/route/Rule.php b/vendor/topthink/framework/src/think/route/Rule.php index df99fe9d..05213934 100644 --- a/vendor/topthink/framework/src/think/route/Rule.php +++ b/vendor/topthink/framework/src/think/route/Rule.php @@ -237,17 +237,11 @@ abstract class Rule */ public function getPattern(string $name = '') { - $pattern = $this->pattern; - - if ($this->parent) { - $pattern = array_merge($this->parent->getPattern(), $pattern); - } - if ('' === $name) { - return $pattern; + return $this->pattern; } - return $pattern[$name] ?? null; + return $this->pattern[$name] ?? null; } /** @@ -259,26 +253,11 @@ abstract class Rule */ public function getOption(string $name = '', $default = null) { - $option = $this->option; - - if ($this->parent) { - $parentOption = $this->parent->getOption(); - - // 合并分组参数 - foreach ($this->mergeOptions as $item) { - if (isset($parentOption[$item]) && isset($option[$item])) { - $option[$item] = array_merge($parentOption[$item], $option[$item]); - } - } - - $option = array_merge($parentOption, $option); - } - if ('' === $name) { - return $option; + return $this->option; } - return $option[$name] ?? $default; + return $this->option[$name] ?? $default; } /** @@ -572,6 +551,26 @@ abstract class Rule return $this; } + /** + * 合并分组参数 + * @access public + * @return array + */ + public function mergeGroupOptions(): array + { + $parentOption = $this->parent->getOption(); + // 合并分组参数 + foreach ($this->mergeOptions as $item) { + if (isset($parentOption[$item]) && isset($this->option[$item])) { + $this->option[$item] = array_merge($parentOption[$item], $this->option[$item]); + } + } + + $this->option = array_merge($parentOption, $this->option); + + return $this->option; + } + /** * 解析匹配到的规则路由 * @access public @@ -591,31 +590,24 @@ abstract class Rule } // 替换路由地址中的变量 - $extraParams = true; - $search = $replace = []; - $depr = $this->router->config('pathinfo_depr'); - foreach ($matches as $key => $value) { - $search[] = '<' . $key . '>'; - $replace[] = $value; + if (is_string($route) && !empty($matches)) { + $search = $replace = []; - $search[] = ':' . $key; - $replace[] = $value; + foreach ($matches as $key => $value) { + $search[] = '<' . $key . '>'; + $replace[] = $value; - if (strpos($value, $depr)) { - $extraParams = false; + $search[] = ':' . $key; + $replace[] = $value; } - } - if (is_string($route)) { $route = str_replace($search, $replace, $route); } // 解析额外参数 - if ($extraParams) { - $count = substr_count($rule, '/'); - $url = array_slice(explode('|', $url), $count + 1); - $this->parseUrlParams(implode('|', $url), $matches); - } + $count = substr_count($rule, '/'); + $url = array_slice(explode('|', $url), $count + 1); + $this->parseUrlParams(implode('|', $url), $matches); $this->vars = $matches; @@ -638,7 +630,7 @@ abstract class Rule } elseif ($route instanceof Closure) { // 执行闭包 $result = new CallbackDispatch($request, $this, $route, $this->vars); - } elseif (false !== strpos($route, '@') || false !== strpos($route, '::') || false !== strpos($route, '\\')) { + } elseif (false !== strpos($route, '@') || false !== strpos($route, '::')) { // 路由到类的方法 $route = str_replace('::', '@', $route); $result = $this->dispatchMethod($request, $route); diff --git a/vendor/topthink/framework/src/think/route/RuleGroup.php b/vendor/topthink/framework/src/think/route/RuleGroup.php index 94bf2b98..3d5e9bc8 100644 --- a/vendor/topthink/framework/src/think/route/RuleGroup.php +++ b/vendor/topthink/framework/src/think/route/RuleGroup.php @@ -147,13 +147,19 @@ class RuleGroup extends Rule // 获取当前路由规则 $method = strtolower($request->method()); $rules = $this->getRules($method); - $option = $this->getOption(); - if (isset($option['complete_match'])) { - $completeMatch = $option['complete_match']; + if ($this->parent) { + // 合并分组参数 + $this->mergeGroupOptions(); + // 合并分组变量规则 + $this->pattern = array_merge($this->parent->getPattern(), $this->pattern); } - if (!empty($option['merge_rule_regex'])) { + if (isset($this->option['complete_match'])) { + $completeMatch = $this->option['complete_match']; + } + + if (!empty($this->option['merge_rule_regex'])) { // 合并路由正则规则进行路由匹配检查 $result = $this->checkMergeRuleRegex($request, $rules, $url, $completeMatch); @@ -173,7 +179,7 @@ class RuleGroup extends Rule if ($this->miss && in_array($this->miss->getMethod(), ['*', $method])) { // 未匹配所有路由的路由规则处理 - $result = $this->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->getOption()); + $result = $this->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->mergeGroupOptions()); } else { $result = false; } @@ -489,7 +495,7 @@ class RuleGroup extends Rule } return array_filter($this->rules, function ($item) use ($method) { - return $method == $item[0] || '*' == $item[0]; + return $method == $item[0] || $item[0] == '*'; }); } diff --git a/vendor/topthink/framework/src/think/route/RuleItem.php b/vendor/topthink/framework/src/think/route/RuleItem.php index 3ca4885e..f7f72ba1 100644 --- a/vendor/topthink/framework/src/think/route/RuleItem.php +++ b/vendor/topthink/framework/src/think/route/RuleItem.php @@ -191,12 +191,12 @@ class RuleItem extends Rule } // 合并分组参数 - $option = $this->getOption(); - $pattern = $this->getPattern(); - $url = $this->urlSuffixCheck($request, $url, $option); + $option = $this->mergeGroupOptions(); + + $url = $this->urlSuffixCheck($request, $url, $option); if (is_null($match)) { - $match = $this->match($url, $option, $pattern, $completeMatch); + $match = $this->match($url, $option, $completeMatch); } if (false !== $match) { @@ -248,17 +248,17 @@ class RuleItem extends Rule * @access private * @param string $url URL地址 * @param array $option 路由参数 - * @param array $pattern 变量规则 - * @param bool $completeMatch 是否完全匹配 + * @param bool $completeMatch 路由是否完全匹配 * @return array|false */ - private function match(string $url, array $option, array $pattern, bool $completeMatch) + private function match(string $url, array $option, bool $completeMatch) { if (isset($option['complete_match'])) { $completeMatch = $option['complete_match']; } - $depr = $this->router->config('pathinfo_depr'); + $depr = $this->router->config('pathinfo_depr'); + $pattern = array_merge($this->parent->getPattern(), $this->pattern); // 检查完整规则定义 if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^' . $pattern['__url__'] . ($completeMatch ? '$' : '') . '/', str_replace('|', $depr, $url))) { diff --git a/vendor/topthink/framework/src/think/route/RuleName.php b/vendor/topthink/framework/src/think/route/RuleName.php index 5ddc7a7b..9b1088ae 100644 --- a/vendor/topthink/framework/src/think/route/RuleName.php +++ b/vendor/topthink/framework/src/think/route/RuleName.php @@ -46,11 +46,10 @@ class RuleName public function setName(string $name, RuleItem $ruleItem, bool $first = false): void { $name = strtolower($name); - $item = $this->getRuleItemInfo($ruleItem); if ($first && isset($this->item[$name])) { - array_unshift($this->item[$name], $item); + array_unshift($this->item[$name], $ruleItem); } else { - $this->item[$name][] = $item; + $this->item[$name][] = $ruleItem; } } @@ -180,8 +179,8 @@ class RuleName $result = $this->item[$name]; } else { foreach ($this->item[$name] as $item) { - $itemDomain = $item['domain']; - $itemMethod = $item['method']; + $itemDomain = $item->getDomain(); + $itemMethod = $item->getMethod(); if (($itemDomain == $domain || '-' == $itemDomain) && ('*' == $itemMethod || '*' == $method || $method == $itemMethod)) { $result[] = $item; @@ -193,19 +192,4 @@ class RuleName return $result; } - /** - * 获取路由信息 - * @access protected - * @param RuleItem $item 路由规则 - * @return array - */ - protected function getRuleItemInfo(RuleItem $item): array - { - return [ - 'rule' => $item->getRule(), - 'domain' => $item->getDomain(), - 'method' => $item->getMethod(), - 'suffix' => $item->getSuffix(), - ]; - } } diff --git a/vendor/topthink/framework/src/think/route/Url.php b/vendor/topthink/framework/src/think/route/Url.php index 270439ed..d0d808b2 100644 --- a/vendor/topthink/framework/src/think/route/Url.php +++ b/vendor/topthink/framework/src/think/route/Url.php @@ -302,10 +302,10 @@ class Url $port = $request->port(); foreach ($rule as $item) { - $url = $item['rule']; + $url = $item->getRule(); $pattern = $this->parseVar($url); - $domain = $item['domain']; - $suffix = $item['suffix']; + $domain = $item->getDomain(); + $suffix = $item->getSuffix(); if ('-' == $domain) { $domain = is_string($allowDomain) ? $allowDomain : $request->host(true); diff --git a/vendor/topthink/framework/src/think/session/driver/File.php b/vendor/topthink/framework/src/think/session/driver/File.php index 258458a6..991f2cc9 100644 --- a/vendor/topthink/framework/src/think/session/driver/File.php +++ b/vendor/topthink/framework/src/think/session/driver/File.php @@ -39,7 +39,7 @@ class File implements SessionHandlerInterface $this->config = array_merge($this->config, $config); if (empty($this->config['path'])) { - $this->config['path'] = $app->getRuntimePath() . 'session' . DIRECTORY_SEPARATOR; + $this->config['path'] = $app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'session' . DIRECTORY_SEPARATOR; } elseif (substr($this->config['path'], -1) != DIRECTORY_SEPARATOR) { $this->config['path'] .= DIRECTORY_SEPARATOR; } diff --git a/vendor/topthink/framework/tests/ContainerTest.php b/vendor/topthink/framework/tests/ContainerTest.php index e27deb08..72ff1d07 100644 --- a/vendor/topthink/framework/tests/ContainerTest.php +++ b/vendor/topthink/framework/tests/ContainerTest.php @@ -149,7 +149,6 @@ class ContainerTest extends TestCase $container->bind('name2', $object); - $container->bind('name3', Taylor::class); $container->bind('name3', Taylor::class); $container->name4 = $object; diff --git a/vendor/topthink/framework/tests/HttpTest.php b/vendor/topthink/framework/tests/HttpTest.php index c3e0abd3..8b6f28fd 100644 --- a/vendor/topthink/framework/tests/HttpTest.php +++ b/vendor/topthink/framework/tests/HttpTest.php @@ -123,7 +123,6 @@ class HttpTest extends TestCase $response = m::mock(Response::class); $this->app->shouldReceive('instance')->once()->with('request', $request); - $this->app->shouldReceive('initialize')->once(); $exception = new Exception();