我正在尝试使用web安装程序将fixture加载到我的Sylius安装中。如果我不勾选装载固定装置框,它会很好,但如果勾选了,我会进入这个页面:
http://localhost/app_dev.php/installer/flow/sylius_installer/setup/forward
并得到一个错误。我已经用两个不同版本的fzaninotto/faker
尝试过了
使用composer.json中的"fzaninotto/faker": "1.1.*",
,我得到:
Unknown formatter "randomFloat"
使用composer.json中的"fzaninotto/faker": "dev-master",
,我得到:
Warning: array_keys() expects parameter 1 to be array, object given in {webroot}'vendor'fzaninotto'faker'src'Faker'Provider'Base.php line 127
我也尝试过在命令提示符下运行安装程序,但我得到了一个不同的错误:
php app/console sylius:install --fixtures
[RuntimeException]
The "--fixtures" option does not exist.
我可能有错误的命令,但这就是我在几个地方看到的。
如有任何建议,我们将不胜感激。
您可以运行:
php app/console sylius:install
安装人员会问你是否想装载固定装置。
关于错误,您是否安装了供应商或更新?可能是新版的faker出现了BC断裂。
这个小数组为我抛出了固定的东西,因为我认为它正在传递ArrayObject或"ArrayCollection"
$keys = array_keys((array)$array);
也许不是正确的解决方案,但是。。。