2013-06-23 10:22
浏览 74


I'm trying to use the web installer to load fixtures into my Sylius installation. It works fine if I don't check the load fixtures box but if it is checked, I get to this page:


and get an error. I have tried it with 2 different versions of fzaninotto/faker

With "fzaninotto/faker": "1.1.*", in composer.json, I get:

Unknown formatter "randomFloat"

With "fzaninotto/faker": "dev-master", in composer.json, I get:

Warning: array_keys() expects parameter 1 to be array, object given in {webroot}\vendor\fzaninotto\faker\src\Faker\Provider\Base.php line 127

I have also tried running the installer in command prompt but I get a different error:

php app/console sylius:install --fixtures

The "--fixtures" option does not exist.

I probably have that command wrong but that is how I have seen it in a couple of places.

Any suggestions would be appreciated.

图片转代码服务由CSDN问答提供 功能建议

我正在尝试使用Web安装程序将灯具加载到我的Sylius安装中。 如果我没有检查加载夹具框但是如果选中它,它就可以正常工作了,我到达了这个页面:

  http://localhost/app_dev.php/installer  / flow / sylius_installer / setup / forward 

并出现错误。 我已尝试使用2个不同版本的 fzaninotto / faker

使用“fzaninotto / faker”:“1.1。*”, 在composer.json中,我得到:


使用“fzaninotto / faker“:”dev-master“,在composer.json中,我得到:

 警告:array_keys()期望参数1为数组,给定对象 在{webroot} \ vendor \ fzaninotto \ faker \ src \ Faker \ Provider \ Base.php第127行

我也试过在命令提示符下运行安装程序但是 我得到一个不同的错误:

  php app / console sylius:install --fixtures 
“ -  fixtures”选项不存在。\  n   


任何建议都会 不胜感激。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • douzhong5902 2013-06-23 14:37

    You can run:

    php app/console sylius:install

    Installer will kindly ask you if you want to load fixtures.

    Regarding error, did you installed vendors or updates? It may be that new version of faker have BC break.

    点赞 打赏 评论
  • doushi7805 2013-06-28 02:40

    This little array cast fixed things for me, as I think it's passing in an ArrayObject or "ArrayCollection"

    $keys = array_keys((array)$array);

    Maybe not the right solution but ...

    点赞 打赏 评论

相关推荐 更多相似问题