dcat-admin icon indicating copy to clipboard operation
dcat-admin copied to clipboard

执行代码生成出现错误

Open 85636682 opened this issue 3 years ago • 8 comments

  • Laravel Version: 9.0
  • PHP Version: 8.1
  • Dcat Admin Version: 2.2.0.beta

Description:

laravel.test_1  | [Tue Feb 22 02:38:24 2022] PHP Fatal error:  Declaration of Dcat\Admin\Scaffold\MigrationCreator::populateStub($name, $stub, $table) must be compatible with Illuminate\Database\Migrations\MigrationCreator::populateStub($stub, $table) in /var/www/html/vendor/dcat/laravel-admin/src/Scaffold/MigrationCreator.php on line 61
laravel.test_1  | [Tue Feb 22 02:38:24 2022] PHP Fatal error:  Declaration of Dcat\Admin\Scaffold\MigrationCreator::populateStub($name, $stub, $table) must be compatible with Illuminate\Database\Migrations\MigrationCreator::populateStub($stub, $table) in /var/www/html/vendor/dcat/laravel-admin/src/Scaffold/MigrationCreator.php on line 61

Steps To Reproduce:

85636682 avatar Feb 22 '22 02:02 85636682

我也出现了

[Mon Feb 28 16:01:56 2022] 127.0.0.1:64935 Accepted
[Mon Feb 28 16:01:57 2022] PHP Fatal error:  Declaration of Dcat\Admin\Scaffold\MigrationCreator::populateStub($name, $stub, $table) must be compatible with Illuminate\Database\Migrations\MigrationCreator::populateStub($stub, $table) in /Users/xcy/src/try_dcat_admin/vendor/dcat/laravel-admin/src/Scaffold/MigrationCreator.php on line 61
[Mon Feb 28 16:01:57 2022] 127.0.0.1:64935 Closing

代码生成器设置如下:

CleanShot 2022-02-28 at 16 02 40

xuchunyang avatar Feb 28 '22 08:02 xuchunyang

同样出现了问题

baozilala avatar Mar 12 '22 03:03 baozilala

image image

会不会是继承父类的Illuminate\Database\Migrations\MigrationCreator出现的问题。

mengxiao-ac avatar Mar 21 '22 08:03 mengxiao-ac

对laravel9的适配还有问题

MutouLee avatar Mar 29 '22 08:03 MutouLee

https://github.com/jqhph/dcat-admin/blame/56d62aa85f2451bdb7587d23b3710bf68baa610b/src/Scaffold/MigrationCreator.php github已经提交过修改了,可以先手动修复一下试试

baozilala avatar Apr 03 '22 02:04 baozilala

终于看到了Success

baozilala avatar Apr 03 '22 02:04 baozilala

测试了还是报错啊

MutouLee avatar Apr 21 '22 08:04 MutouLee

终于看到了Success

按照提交记录里的修改后,成功了。但是composer包没更新

MutouLee avatar Apr 21 '22 08:04 MutouLee

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 18 '22 14:10 stale[bot]