From f06f840c9d5e08b81d56e0588dee8249bd2f19af Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 30 May 2016 14:18:47 +0200 Subject: Move fixtures to the right place --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 5a376453..ebfebfea 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -16,12 +16,6 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface public function load(ObjectManager $manager) { $adminConfig = new Config($this->getReference('admin-user')); - $taggingRule = new TaggingRule(); - - $taggingRule->setConfig($adminConfig); - $taggingRule->setRule('title matches "wallabag"'); - $taggingRule->setTags(['wallabag']); - $manager->persist($taggingRule); $adminConfig->setTheme('material'); $adminConfig->setItemsPerPage(30); -- cgit v1.2.3 From e42b13bcff41161ecdb4322dce1ef98a401482ca Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 30 May 2016 14:34:11 +0200 Subject: Change ManyToMany between entry & tag Following https://gist.github.com/Ocramius/3121916 Be sure to remove the related entity when removing an entity. Let say you have Entry -> EntryTag -> Tag. If you remove the entry: - before that commit, the EntryTag will stay (at least using SQLite). - with that commit, the related entity is removed --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index ebfebfea..03be9667 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -6,7 +6,6 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\Config; -use Wallabag\CoreBundle\Entity\TaggingRule; class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface { -- cgit v1.2.3 From ebe0787e093f4f2934430033015d6ebad1c64dca Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 16 Sep 2016 22:22:25 +0200 Subject: Moved Pocket token to user config --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 03be9667..921c739f 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -20,6 +20,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $adminConfig->setItemsPerPage(30); $adminConfig->setReadingSpeed(1); $adminConfig->setLanguage('en'); + $adminConfig->setPocketConsumerKey('xxxxx'); $manager->persist($adminConfig); @@ -30,6 +31,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $bobConfig->setItemsPerPage(10); $bobConfig->setReadingSpeed(1); $bobConfig->setLanguage('fr'); + $bobConfig->setPocketConsumerKey(null); $manager->persist($bobConfig); @@ -40,6 +42,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $emptyConfig->setItemsPerPage(10); $emptyConfig->setReadingSpeed(1); $emptyConfig->setLanguage('en'); + $emptyConfig->setPocketConsumerKey(null); $manager->persist($emptyConfig); -- cgit v1.2.3