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" - "%kernel.cache_dir%/doctrine/metadata"
# fixtures # fixtures
Wallabag\AnnotationBundle\DataFixtures\ORM\: Wallabag\UserBundle\DataFixtures\:
resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/ORM/*' resource: '../../src/Wallabag/UserBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm'] tags: ['doctrine.fixture.orm']
autowire: true autowire: true
Wallabag\CoreBundle\DataFixtures\ORM\: Wallabag\CoreBundle\DataFixtures\:
resource: '../../src/Wallabag/CoreBundle/DataFixtures/ORM/*' resource: '../../src/Wallabag/CoreBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm'] tags: ['doctrine.fixture.orm']
autowire: true autowire: true
Wallabag\UserBundle\DataFixtures\ORM\: Wallabag\AnnotationBundle\DataFixtures\:
resource: '../../src/Wallabag/UserBundle/DataFixtures/ORM/*' resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*'
tags: ['doctrine.fixture.orm'] tags: ['doctrine.fixture.orm']
autowire: true autowire: true

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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