src/PHPDish/Bundle/CoreBundle/DataFixtures/ORM/UserFixtures.php
public function load(ObjectManager $manager)
    {
        $user1 = $this->getUserManipulator()->create('优雅的风', '123456', 'user1@phpdish.com', true, false);
        $user2 = $this->getUserManipulator()->create('风中的少年', '123456', 'user2@phpdish.com', true, false);

        $avatarGenerator = $this->getAvatarGenerator();
        $user1->setAvatar($avatarGenerator->generate('优雅的风')->getKey());
        $user2->setAvatar($avatarGenerator->generate('风中的少年')->getKey());

        $userManager = $this->getUserManager();
        $userManager->updateUser($user1);
        $userManager->updateUser($user2);
        $this->addReference('general-user', $user1);
    }
public function load(ObjectManager $manager)
    {
        $user1 = $this->getUserManipulator()->create('优雅的风', '123456', 'user1@phpdish.com', true, false);
        $user2 = $this->getUserManipulator()->create('风中的少年', '123456', 'user2@phpdish.com', true, false);

        $avatarGenerator = $this->getAvatarGenerator();
        $user1->setAvatar($avatarGenerator->generate('优雅的风')->getKey());
        $user2->setAvatar($avatarGenerator->generate('风中的少年')->getKey());

        $userManager = $this->getUserManager();
        $userManager->updateUser($user1);
        $userManager->updateUser($user2);
        $this->addReference('general-user', $user1);
    }
{@inheritdoc}