aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/InstallCommand.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-08-08 15:19:53 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-08-08 16:03:20 +0200
commit1576905e0357ef96cd852ea3c1ff4216af195c34 (patch)
treeb4d89e082942e4711b0e0aa1b02102ae3af21a3b /src/Wallabag/CoreBundle/Command/InstallCommand.php
parent97c678a0b26d748f9829d732910d5c402c609dc2 (diff)
downloadwallabag-1576905e0357ef96cd852ea3c1ff4216af195c34.tar.gz
wallabag-1576905e0357ef96cd852ea3c1ff4216af195c34.tar.zst
wallabag-1576905e0357ef96cd852ea3c1ff4216af195c34.zip
Rename internal settings table
In fact it's not _just_ a rename. We are now able to use our own entity with the CraueConfigBundle which allow us to enforce a custom length on string field and avoid error with utf8mb4 on MySQL. To fix that issue before we were in need to fork CraueConfigBundle to hard apply these length changes. The recent 2.3.0 release fix that issue. That's why we are in need to rename the table (getting rid of the bundle name from it) Also updating deps: - Updating symfony/polyfill-mbstring (v1.11.0 => v1.12.0) - Updating symfony/polyfill-ctype (v1.11.0 => v1.12.0) - Updating symfony/polyfill-php70 (v1.11.0 => v1.12.0) - Updating symfony/polyfill-util (v1.11.0 => v1.12.0) - Updating symfony/polyfill-php56 (v1.11.0 => v1.12.0) - Updating symfony/polyfill-intl-icu (v1.11.0 => v1.12.0) - Updating symfony/polyfill-apcu (v1.11.0 => v1.12.0) - Updating j0k3r/graby-site-config (1.0.88 => 1.0.89) - Updating php-http/message (1.7.2 => 1.8.0) - Updating symfony/polyfill-php73 (v1.11.0 => v1.12.0) - Updating symfony/http-client (v4.3.2 => v4.3.3) - Updating symfony/polyfill-php72 (v1.11.0 => v1.12.0) - Updating symfony/polyfill-intl-idn (v1.11.0 => v1.12.0) - Updating symfony/mime (v4.3.2 => v4.3.3) - Updating craue/config-bundle (dev-utf8mb4 46cfd37 => 2.3.0) - Updating masterminds/html5 (2.6.0 => 2.7.0) - Updating nette/di (v3.0.0 => v3.0.1) - Updating symfony/polyfill-iconv (v1.11.0 => v1.12.0) - Updating wallabag/php-mobi (1.0.1 => 1.1.0)
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/InstallCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 50e19f0c..f73e0696 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Command; 3namespace Wallabag\CoreBundle\Command;
4 4
5use Craue\ConfigBundle\Entity\Setting;
6use FOS\UserBundle\Event\UserEvent; 5use FOS\UserBundle\Event\UserEvent;
7use FOS\UserBundle\FOSUserEvents; 6use FOS\UserBundle\FOSUserEvents;
8use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; 7use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
@@ -13,6 +12,7 @@ use Symfony\Component\Console\Output\BufferedOutput;
13use Symfony\Component\Console\Output\OutputInterface; 12use Symfony\Component\Console\Output\OutputInterface;
14use Symfony\Component\Console\Question\Question; 13use Symfony\Component\Console\Question\Question;
15use Symfony\Component\Console\Style\SymfonyStyle; 14use Symfony\Component\Console\Style\SymfonyStyle;
15use Wallabag\CoreBundle\Entity\InternalSetting;
16 16
17class InstallCommand extends ContainerAwareCommand 17class InstallCommand extends ContainerAwareCommand
18{ 18{
@@ -276,10 +276,10 @@ class InstallCommand extends ContainerAwareCommand
276 $em = $this->getContainer()->get('doctrine.orm.entity_manager'); 276 $em = $this->getContainer()->get('doctrine.orm.entity_manager');
277 277
278 // cleanup before insert new stuff 278 // cleanup before insert new stuff
279 $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute(); 279 $em->createQuery('DELETE FROM WallabagCoreBundle:InternalSetting')->execute();
280 280
281 foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) { 281 foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) {
282 $newSetting = new Setting(); 282 $newSetting = new InternalSetting();
283 $newSetting->setName($setting['name']); 283 $newSetting->setName($setting['name']);
284 $newSetting->setValue($setting['value']); 284 $newSetting->setValue($setting['value']);
285 $newSetting->setSection($setting['section']); 285 $newSetting->setSection($setting['section']);