*
- * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\IgnoreOriginUserRule", mappedBy="config", cascade={"remove"})
+ * @ORM\OneToMany(targetEntity="Wallabag\Entity\IgnoreOriginUserRule", mappedBy="config", cascade={"remove"})
* @ORM\OrderBy({"id" = "ASC"})
*/
private $ignoreOriginRules;
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Entity/Entry.php
similarity index 97%
rename from src/Wallabag/CoreBundle/Entity/Entry.php
rename to src/Entity/Entry.php
index a14166e3e..71722b61c 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Entity/Entry.php
@@ -1,6 +1,6 @@
+ * @var ArrayCollection&iterable<\Wallabag\Entity\SiteCredential>
*
- * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\SiteCredential", mappedBy="user", cascade={"remove"})
+ * @ORM\OneToMany(targetEntity="Wallabag\Entity\SiteCredential", mappedBy="user", cascade={"remove"})
*/
protected $siteCredentials;
/**
- * @var ArrayCollection&iterable<\Wallabag\CoreBundle\Entity\Api\Client>
+ * @var ArrayCollection&iterable<\Wallabag\Entity\Api\Client>
*
- * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Api\Client", mappedBy="user", cascade={"remove"})
+ * @ORM\OneToMany(targetEntity="Wallabag\Entity\Api\Client", mappedBy="user", cascade={"remove"})
*/
protected $clients;
diff --git a/src/Wallabag/CoreBundle/Event/ConfigUpdatedEvent.php b/src/Event/ConfigUpdatedEvent.php
similarity index 84%
rename from src/Wallabag/CoreBundle/Event/ConfigUpdatedEvent.php
rename to src/Event/ConfigUpdatedEvent.php
index 2b28c6302..d1806a57f 100644
--- a/src/Wallabag/CoreBundle/Event/ConfigUpdatedEvent.php
+++ b/src/Event/ConfigUpdatedEvent.php
@@ -1,9 +1,9 @@
findTaggedServiceIds(
- 'wallabag_core.import'
+ 'wallabag.import'
);
foreach ($taggedServices as $id => $tagAttributes) {
foreach ($tagAttributes as $attributes) {
diff --git a/src/Wallabag/CoreBundle/Import/ImportInterface.php b/src/Import/ImportInterface.php
similarity index 95%
rename from src/Wallabag/CoreBundle/Import/ImportInterface.php
rename to src/Import/ImportInterface.php
index 86df25b7e..b243f5245 100644
--- a/src/Wallabag/CoreBundle/Import/ImportInterface.php
+++ b/src/Import/ImportInterface.php
@@ -1,6 +1,6 @@
registry->getManagerForClass($configuration->getClass());
// Check, if class name is what we need
- if (null !== $em && 'Wallabag\CoreBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
+ if (null !== $em && 'Wallabag\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
return false;
}
diff --git a/src/Wallabag/CoreBundle/Redis/Producer.php b/src/Redis/Producer.php
similarity index 96%
rename from src/Wallabag/CoreBundle/Redis/Producer.php
rename to src/Redis/Producer.php
index fbab0265a..9cc64aae3 100644
--- a/src/Wallabag/CoreBundle/Redis/Producer.php
+++ b/src/Redis/Producer.php
@@ -1,6 +1,6 @@
getEntityManager()
- ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Annotation a WHERE a.user = :userId')
+ ->createQuery('DELETE FROM Wallabag\Entity\Annotation a WHERE a.user = :userId')
->setParameter('userId', $userId)
->execute();
}
diff --git a/src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php b/src/Repository/Api/ClientRepository.php
similarity index 89%
rename from src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php
rename to src/Repository/Api/ClientRepository.php
index a12b40b91..28ed7389c 100644
--- a/src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php
+++ b/src/Repository/Api/ClientRepository.php
@@ -1,10 +1,10 @@
getEntityManager()
- ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId')
+ ->createQuery('DELETE FROM Wallabag\Entity\Entry e WHERE e.user = :userId')
->setParameter('userId', $userId)
->execute();
}
@@ -609,7 +609,7 @@ class EntryRepository extends ServiceEntityRepository
public function removeArchivedByUserId($userId)
{
$this->getEntityManager()
- ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId AND e.isArchived = TRUE')
+ ->createQuery('DELETE FROM Wallabag\Entity\Entry e WHERE e.user = :userId AND e.isArchived = TRUE')
->setParameter('userId', $userId)
->execute();
}
diff --git a/src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php b/src/Repository/IgnoreOriginInstanceRuleRepository.php
similarity index 77%
rename from src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php
rename to src/Repository/IgnoreOriginInstanceRuleRepository.php
index ccf321174..da28934a8 100644
--- a/src/Wallabag/CoreBundle/Repository/IgnoreOriginInstanceRuleRepository.php
+++ b/src/Repository/IgnoreOriginInstanceRuleRepository.php
@@ -1,10 +1,10 @@
getRootNode();
-
- $rootNode
- ->children()
- ->arrayNode('languages')
- ->prototype('scalar')->end()
- ->end()
- ->integerNode('items_on_page')
- ->defaultValue(12)
- ->end()
- ->scalarNode('language')
- ->defaultValue('en')
- ->end()
- ->integerNode('rss_limit')
- ->defaultValue(50)
- ->end()
- ->integerNode('reading_speed')
- ->defaultValue(200)
- ->end()
- ->scalarNode('version')
- ->end()
- ->scalarNode('paypal_url')
- ->end()
- ->integerNode('cache_lifetime')
- ->defaultValue(10)
- ->end()
- ->scalarNode('fetching_error_message')
- ->end()
- ->scalarNode('fetching_error_message_title')
- ->end()
- ->scalarNode('action_mark_as_read')
- ->defaultValue(1)
- ->end()
- ->scalarNode('list_mode')
- ->defaultValue(1)
- ->end()
- ->scalarNode('display_thumbnails')
- ->defaultValue(1)
- ->end()
- ->scalarNode('api_limit_mass_actions')
- ->defaultValue(10)
- ->end()
- ->arrayNode('default_internal_settings')
- ->prototype('array')
- ->children()
- ->scalarNode('name')->end()
- ->scalarNode('value')->end()
- ->enumNode('section')
- ->values(['entry', 'misc', 'api', 'analytics', 'export', 'import'])
- ->end()
- ->end()
- ->end()
- ->end()
- ->scalarNode('encryption_key_path')
- ->end()
- ->arrayNode('default_ignore_origin_instance_rules')
- ->prototype('array')
- ->children()
- ->scalarNode('rule')->end()
- ->end()
- ->end()
- ->end()
- ->arrayNode('fonts')
- ->prototype('scalar')->end()
- ->end()
- ->arrayNode('allow_mimetypes')
- ->prototype('scalar')->end()
- ->end()
- ->scalarNode('resource_dir')
- ->end()
- ->end()
- ;
-
- return $treeBuilder;
- }
-}
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
deleted file mode 100644
index 754931681..000000000
--- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
+++ /dev/null
@@ -1,41 +0,0 @@
-processConfiguration($configuration, $configs);
-
- $container->setParameter('wallabag_core.languages', $config['languages']);
- $container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
- $container->setParameter('wallabag_core.language', $config['language']);
- $container->setParameter('wallabag_core.feed_limit', $config['rss_limit']);
- $container->setParameter('wallabag_core.reading_speed', $config['reading_speed']);
- $container->setParameter('wallabag_core.version', $config['version']);
- $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
- $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']);
- $container->setParameter('wallabag_core.action_mark_as_read', $config['action_mark_as_read']);
- $container->setParameter('wallabag_core.list_mode', $config['list_mode']);
- $container->setParameter('wallabag_core.display_thumbnails', $config['display_thumbnails']);
- $container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']);
- $container->setParameter('wallabag_core.fetching_error_message_title', $config['fetching_error_message_title']);
- $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']);
- $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']);
- $container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']);
- $container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']);
- $container->setParameter('wallabag_core.fonts', $config['fonts']);
- $container->setParameter('wallabag_core.allow_mimetypes', $config['allow_mimetypes']);
- $container->setParameter('wallabag_core.resource_dir', $config['resource_dir']);
- }
-
- public function getAlias()
- {
- return 'wallabag_core';
- }
-}
diff --git a/src/Wallabag/CoreBundle/Entity/RuleInterface.php b/src/Wallabag/CoreBundle/Entity/RuleInterface.php
deleted file mode 100644
index 8e9b5c454..000000000
--- a/src/Wallabag/CoreBundle/Entity/RuleInterface.php
+++ /dev/null
@@ -1,7 +0,0 @@
-addCompilerPass(new ImportCompilerPass());
- }
-}
diff --git a/templates/Entry/entry.html.twig b/templates/Entry/entry.html.twig
index 1bae4b8f7..2a53016cb 100644
--- a/templates/Entry/entry.html.twig
+++ b/templates/Entry/entry.html.twig
@@ -286,7 +286,7 @@
- {{ render(controller('Wallabag\\CoreBundle\\Controller\\TagController::addTagFormAction', {'id': entry.id})) }}
+ {{ render(controller('Wallabag\\Controller\\TagController::addTagFormAction', {'id': entry.id})) }}
diff --git a/templates/Import/index.html.twig b/templates/Import/index.html.twig
index bd28f2340..5816c297b 100644
--- a/templates/Import/index.html.twig
+++ b/templates/Import/index.html.twig
@@ -3,7 +3,7 @@
{% block title %}{{ 'import.page_title'|trans }}{% endblock %}
{% block messages %}
- {{ render(controller('Wallabag\\CoreBundle\\Controller\\Import\\ImportController::checkQueueAction')) }}
+ {{ render(controller('Wallabag\\Controller\\Import\\ImportController::checkQueueAction')) }}
{{ parent() }}
{% endblock %}
diff --git a/templates/layout.html.twig b/templates/layout.html.twig
index 06f68376e..bf2753049 100644
--- a/templates/layout.html.twig
+++ b/templates/layout.html.twig
@@ -156,8 +156,8 @@
- {{ render(controller('Wallabag\\CoreBundle\\Controller\\EntryController::searchFormAction', {'currentRoute': current_route})) }}
- {{ render(controller('Wallabag\\CoreBundle\\Controller\\EntryController::addEntryFormAction')) }}
+ {{ render(controller('Wallabag\\Controller\\EntryController::searchFormAction', {'currentRoute': current_route})) }}
+ {{ render(controller('Wallabag\\Controller\\EntryController::addEntryFormAction')) }}
{% endblock %}
diff --git a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php b/tests/Command/CleanDuplicatesCommandTest.php
similarity index 92%
rename from tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php
rename to tests/Command/CleanDuplicatesCommandTest.php
index 6bb731e3a..d7d7ba3c5 100644
--- a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php
+++ b/tests/Command/CleanDuplicatesCommandTest.php
@@ -1,13 +1,13 @@
getRepository(Entry::class)->findAllByUrlAndUserId($url, $this->getLoggedInUserId());
$this->assertCount(1, $nbEntries);
- $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
+ $query = $em->createQuery('DELETE FROM Wallabag\Entity\Entry e WHERE e.url = :url');
$query->setParameter('url', $url);
$query->execute();
}
diff --git a/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php b/tests/Command/ExportCommandTest.php
similarity index 95%
rename from tests/Wallabag/CoreBundle/Command/ExportCommandTest.php
rename to tests/Command/ExportCommandTest.php
index abad7cf74..c8d5ef13a 100644
--- a/tests/Wallabag/CoreBundle/Command/ExportCommandTest.php
+++ b/tests/Command/ExportCommandTest.php
@@ -1,11 +1,11 @@
assertSame($entry->getHashedUrl(), hash('sha1', $url));
- $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
+ $query = $em->createQuery('DELETE FROM Wallabag\Entity\Entry e WHERE e.url = :url');
$query->setParameter('url', $url);
$query->execute();
}
diff --git a/tests/Wallabag/CoreBundle/Command/Import/ImportCommandTest.php b/tests/Command/Import/ImportCommandTest.php
similarity index 89%
rename from tests/Wallabag/CoreBundle/Command/Import/ImportCommandTest.php
rename to tests/Command/Import/ImportCommandTest.php
index 44b930e16..3187131f1 100644
--- a/tests/Wallabag/CoreBundle/Command/Import/ImportCommandTest.php
+++ b/tests/Command/Import/ImportCommandTest.php
@@ -1,13 +1,13 @@
execute([
'username' => 'admin',
- 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json',
+ 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/fixtures/Import/wallabag-v2-read.json',
'--importer' => 'v2',
]);
@@ -83,7 +83,7 @@ class ImportCommandTest extends WallabagCoreTestCase
$tester = new CommandTester($command);
$tester->execute([
'username' => $this->getLoggedInUserId(),
- 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json',
+ 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/fixtures/Import/wallabag-v2-read.json',
'--useUserId' => true,
'--importer' => 'v2',
]);
diff --git a/tests/Wallabag/CoreBundle/Command/Import/RedisWorkerCommandTest.php b/tests/Command/Import/RedisWorkerCommandTest.php
similarity index 95%
rename from tests/Wallabag/CoreBundle/Command/Import/RedisWorkerCommandTest.php
rename to tests/Command/Import/RedisWorkerCommandTest.php
index 3c2f0c2e7..b8faeb7cd 100644
--- a/tests/Wallabag/CoreBundle/Command/Import/RedisWorkerCommandTest.php
+++ b/tests/Command/Import/RedisWorkerCommandTest.php
@@ -1,6 +1,6 @@
getTestClient()
->getContainer()
- ->get('wallabag_core.entry_repository.test')
+ ->get('wallabag.entry_repository.test')
->findById([$this->adminEntry->getId(), $this->bobEntry->getId()]);
foreach ($reloadedEntries as $reloadedEntry) {
@@ -107,7 +107,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
'interactive' => false,
]);
- $entryRepository = $this->getTestClient()->getContainer()->get('wallabag_core.entry_repository.test');
+ $entryRepository = $this->getTestClient()->getContainer()->get('wallabag.entry_repository.test');
$reloadedAdminEntry = $entryRepository->find($this->adminEntry->getId());
$this->assertNotEmpty($reloadedAdminEntry->getContent());
@@ -128,7 +128,7 @@ class ReloadEntryCommandTest extends WallabagCoreTestCase
'--only-not-parsed' => true,
]);
- $entryRepository = $this->getTestClient()->getContainer()->get('wallabag_core.entry_repository.test');
+ $entryRepository = $this->getTestClient()->getContainer()->get('wallabag.entry_repository.test');
$reloadedBobParsedEntry = $entryRepository->find($this->bobParsedEntry->getId());
$this->assertEmpty($reloadedBobParsedEntry->getContent());
diff --git a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php b/tests/Command/ShowUserCommandTest.php
similarity index 95%
rename from tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php
rename to tests/Command/ShowUserCommandTest.php
index 1d5a35fa0..24c1e5fcc 100644
--- a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php
+++ b/tests/Command/ShowUserCommandTest.php
@@ -1,13 +1,13 @@
getRepository(Entry::class)->findOneByUrl($url);
$this->assertSame($entry->getPreviewPicture(), $client->getContainer()->getParameter('domain_name') . '/mypicture.jpg');
- $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
+ $query = $em->createQuery('DELETE FROM Wallabag\Entity\Entry e WHERE e.url = :url');
$query->setParameter('url', $url);
$query->execute();
}
diff --git a/tests/Wallabag/CoreBundle/Consumer/AMQPEntryConsumerTest.php b/tests/Consumer/AMQPEntryConsumerTest.php
similarity index 96%
rename from tests/Wallabag/CoreBundle/Consumer/AMQPEntryConsumerTest.php
rename to tests/Consumer/AMQPEntryConsumerTest.php
index 57bd6bfda..b12aa0f6b 100644
--- a/tests/Wallabag/CoreBundle/Consumer/AMQPEntryConsumerTest.php
+++ b/tests/Consumer/AMQPEntryConsumerTest.php
@@ -1,16 +1,16 @@
getResponse()->getContent(), true);
- $this->assertSame($client->getContainer()->getParameter('wallabag_core.version'), $content);
+ $this->assertSame($client->getContainer()->getParameter('wallabag.version'), $content);
}
public function testGetInfo()
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Controller/ConfigControllerTest.php
similarity index 99%
rename from tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
rename to tests/Controller/ConfigControllerTest.php
index c6e4296d3..c1008530b 100644
--- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
+++ b/tests/Controller/ConfigControllerTest.php
@@ -1,19 +1,19 @@
getRepository(Entry::class)
->find($entry->getId());
- $this->assertNotSame($client->getContainer()->getParameter('wallabag_core.fetching_error_message'), $newContent->getContent());
+ $this->assertNotSame($client->getContainer()->getParameter('wallabag.fetching_error_message'), $newContent->getContent());
}
public function testEdit()
diff --git a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php b/tests/Controller/ExportControllerTest.php
similarity index 99%
rename from tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
rename to tests/Controller/ExportControllerTest.php
index 27c5fb9a9..9fecbf491 100644
--- a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
+++ b/tests/Controller/ExportControllerTest.php
@@ -1,10 +1,10 @@
setPrimaryTable(['name' => 'entry']);
$metaClass->mapManyToMany([
'fieldName' => 'tags',
diff --git a/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php b/tests/Form/DataTransformer/StringToListTransformerTest.php
similarity index 91%
rename from tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php
rename to tests/Form/DataTransformer/StringToListTransformerTest.php
index ef058a8c0..1a09c3c1e 100644
--- a/tests/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformerTest.php
+++ b/tests/Form/DataTransformer/StringToListTransformerTest.php
@@ -1,9 +1,9 @@
register('foo')
- ->addTag('wallabag_core.import', ['alias' => 'pocket'])
+ ->addTag('wallabag.import', ['alias' => 'pocket'])
;
$this->process($container);
diff --git a/tests/Wallabag/CoreBundle/Import/InstapaperImportTest.php b/tests/Import/InstapaperImportTest.php
similarity index 95%
rename from tests/Wallabag/CoreBundle/Import/InstapaperImportTest.php
rename to tests/Import/InstapaperImportTest.php
index db05acb52..17a7b4e21 100644
--- a/tests/Wallabag/CoreBundle/Import/InstapaperImportTest.php
+++ b/tests/Import/InstapaperImportTest.php
@@ -1,6 +1,6 @@