Update fixtures

This commit is contained in:
Jeremy Benoist 2018-11-26 20:00:01 +01:00
parent 9394e8098a
commit db9b6d8d0d
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
9 changed files with 64 additions and 72 deletions

View file

@ -22,17 +22,17 @@ services:
- "%kernel.cache_dir%/doctrine/metadata"
# fixtures
Wallabag\AnnotationBundle\DataFixtures\ORM\:
resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/ORM/*'
Wallabag\UserBundle\DataFixtures\:
resource: '../../src/Wallabag/UserBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm']
autowire: true
Wallabag\CoreBundle\DataFixtures\ORM\:
resource: '../../src/Wallabag/CoreBundle/DataFixtures/ORM/*'
Wallabag\CoreBundle\DataFixtures\:
resource: '../../src/Wallabag/CoreBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm']
autowire: true
Wallabag\UserBundle\DataFixtures\ORM\:
resource: '../../src/Wallabag/UserBundle/DataFixtures/ORM/*'
Wallabag\AnnotationBundle\DataFixtures\:
resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm']
autowire: true

View file

@ -1,13 +1,15 @@
<?php
namespace Wallabag\AnnotationBundle\DataFixtures\ORM;
namespace Wallabag\AnnotationBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\AnnotationBundle\Entity\Annotation;
use Wallabag\CoreBundle\DataFixtures\EntryFixtures;
use Wallabag\UserBundle\DataFixtures\UserFixtures;
class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterface
class AnnotationFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
@ -38,8 +40,11 @@ class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterf
/**
* {@inheritdoc}
*/
public function getOrder()
public function getDependencies()
{
return 35;
return [
EntryFixtures::class,
UserFixtures::class,
];
}
}

View file

@ -1,13 +1,14 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\UserBundle\DataFixtures\UserFixtures;
class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
class ConfigFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
@ -60,8 +61,10 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
/**
* {@inheritdoc}
*/
public function getOrder()
public function getDependencies()
{
return 20;
return [
UserFixtures::class,
];
}
}

View file

@ -1,13 +1,14 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\DataFixtures\UserFixtures;
class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
class EntryFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
@ -112,8 +113,11 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
/**
* {@inheritdoc}
*/
public function getOrder()
public function getDependencies()
{
return 30;
return [
UserFixtures::class,
TagFixtures::class,
];
}
}

View file

@ -1,15 +1,15 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Craue\ConfigBundle\Entity\Setting;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface
class SettingFixtures extends Fixture implements ContainerAwareInterface
{
/**
* @var ContainerInterface
@ -36,12 +36,4 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getOrder()
{
return 29;
}
}

View file

@ -1,13 +1,14 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\SiteCredential;
use Wallabag\UserBundle\DataFixtures\UserFixtures;
class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureInterface
class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
@ -27,8 +28,10 @@ class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureIn
/**
* {@inheritdoc}
*/
public function getOrder()
public function getDependencies()
{
return 50;
return [
UserFixtures::class,
];
}
}

View file

@ -1,13 +1,13 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Tag;
class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
class TagFixtures extends Fixture
{
/**
* {@inheritdoc}
@ -44,12 +44,4 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getOrder()
{
return 25;
}
}

View file

@ -1,13 +1,13 @@
<?php
namespace Wallabag\CoreBundle\DataFixtures\ORM;
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\TaggingRule;
class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInterface
class TaggingRuleFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
@ -49,8 +49,10 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter
/**
* {@inheritdoc}
*/
public function getOrder()
public function getDependencies()
{
return 40;
return [
ConfigFixtures::class,
];
}
}

View file

@ -1,13 +1,12 @@
<?php
namespace Wallabag\UserBundle\DataFixtures\ORM;
namespace Wallabag\UserBundle\DataFixtures;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\UserBundle\Entity\User;
class LoadUserData extends AbstractFixture implements OrderedFixtureInterface
class UserFixtures extends Fixture
{
/**
* {@inheritdoc}
@ -50,12 +49,4 @@ class LoadUserData extends AbstractFixture implements OrderedFixtureInterface
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getOrder()
{
return 10;
}
}