]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Update fixtures
authorJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 26 Nov 2018 19:00:01 +0000 (20:00 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 28 Nov 2018 21:04:54 +0000 (22:04 +0100)
app/config/services_test.yml
src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php [moved from src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php with 67% similarity]
src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php with 81% similarity]
src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php with 90% similarity]
src/Wallabag/CoreBundle/DataFixtures/SettingFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php with 71% similarity]
src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php with 58% similarity]
src/Wallabag/CoreBundle/DataFixtures/TagFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php with 70% similarity]
src/Wallabag/CoreBundle/DataFixtures/TaggingRuleFixtures.php [moved from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php with 77% similarity]
src/Wallabag/UserBundle/DataFixtures/UserFixtures.php [moved from src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php with 79% similarity]

index a300f75de19f26d24952c12d0c7c85a96e7fcbd3..1b3aff63ec3285d232b2e1f475de6e1745a90f47 100644 (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
similarity index 67%
rename from src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
rename to src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php
index 20e07fa31fe87d2e8aeb2d23478dc099ac55e80f..ed46cea9bd13a197e717b792c0106d020cb7fdff 100644 (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,
+        ];
     }
 }
similarity index 81%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
rename to src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php
index 3d4d5def9aa2c6c02d97652bc62b8f764046159f..c54e9f2c3fa1b9391fd97079728df4eda639c437 100644 (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,
+        ];
     }
 }
similarity index 90%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
rename to src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php
index 62fb5fa68b9a630a0f1a8ec9acdd9595438059c1..0bd58487c4e3459cd07f65cb26d9b6732ea35816 100644 (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,
+        ];
     }
 }
similarity index 71%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
rename to src/Wallabag/CoreBundle/DataFixtures/SettingFixtures.php
index 3fe88e7fda0978c7bdca0241a9d5b98c565d9aa9..fd12982989a3bcbf6dc7568c3cbecd96366bda86 100644 (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;
-    }
 }
similarity index 58%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php
rename to src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php
index 866f55a403d40bf8bf5b9a753006c5dec8693dba..c73173e8db808643bbe77f0d8f44491f1031b09b 100644 (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,
+        ];
     }
 }
similarity index 70%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
rename to src/Wallabag/CoreBundle/DataFixtures/TagFixtures.php
index 0ecfd18b55ddab8c00f1616586f78a9f576af5c3..803ad7789ea0fec565e2f96ddcfe77cda971b859 100644 (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;
-    }
 }
similarity index 77%
rename from src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php
rename to src/Wallabag/CoreBundle/DataFixtures/TaggingRuleFixtures.php
index 55abd63cda9a3d26562521eef55470ecd51f3376..78ff314a884f00e5ec7c453d68fd521c3fc57c4a 100644 (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,
+        ];
     }
 }
similarity index 79%
rename from src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php
rename to src/Wallabag/UserBundle/DataFixtures/UserFixtures.php
index 26dbda3b2d02df4c0927fa8809d24b887f085d27..1e375e09ef2ffb899dd7846f50797cfbd4e70e29 100644 (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;
-    }
 }