for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use User\Entity\User as UserModel;
/**
*
* @author Thiago Paes <[email protected]>
*/
class User extends AbstractFixture implements OrderedFixtureInterface
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Loader
* @param ObjectManager $manager
public function load(ObjectManager $manager)
$i = 1;
$user = [
'name' => 'User ' . $i,
'email' => 'user' . $i . '@users.net',
];
$obj = new UserModel();
$obj->setName($user['name']);
$obj->setEmail($user['email']);
$manager->persist($obj);
$manager->flush();
$this->addReference('user_' . $i, $obj);
}
* Load order
* @return int
public function getOrder()
return 1;
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.