From 46b9919ab53090bfd2ba26d4a2b204ad980745fc Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 10 Jan 2014 16:46:57 +0100 Subject: [PATCH 1/4] update thelia version for next beta version --- CHANGELOG.md | 2 +- install/insert.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f93028f66..c5450a331 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - Coupon effect inputs are now more customisable (input text, select, ajax, etc.. are usable) and unlimited amount of input for coupon effect are now possible too - when a category is deleted, all subcategories are deleted - delete products when categories are removed. Works only when the category is the default one for this product -- Manager update exists now. Rune php Thelia thelia:update +- Manager update exists now. Run php Thelia thelia:update - Coupon works now - Improved tax rule configuration diff --git a/install/insert.sql b/install/insert.sql index 86b26259b..3e7cac7ae 100755 --- a/install/insert.sql +++ b/install/insert.sql @@ -37,11 +37,11 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('store_name','', 0, 1, NOW(), NOW()), ('store_email','', 0, 1, NOW(), NOW()), ('one_domain_foreach_lang','0', 1, 1, NOW(), NOW()), -('thelia_version','2.0.0-beta2', 1, 1, NOW(), NOW()), +('thelia_version','2.0.0-beta3', 1, 1, NOW(), NOW()), ('thelia_major_version','2', 1, 1, NOW(), NOW()), ('thelia_minus_version','0', 1, 1, NOW(), NOW()), ('thelia_release_version','0', 1, 1, NOW(), NOW()), -('thelia_extra_version','beta2', 1, 1, NOW(), NOW()); +('thelia_extra_version','beta3', 1, 1, NOW(), NOW()); INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES (1, 'en_US', 'Class name of the session handler', NULL, NULL, NULL), From 7aad8b23f01f70ed8f859717c5d76312e532f638 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 13 Jan 2014 10:00:20 +0100 Subject: [PATCH 2/4] hide passord on admin creation using CLI --- CHANGELOG.md | 2 +- core/lib/Thelia/Command/CreateAdminUser.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5450a331..c5cf8d36f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - Coupon effect inputs are now more customisable (input text, select, ajax, etc.. are usable) and unlimited amount of input for coupon effect are now possible too - when a category is deleted, all subcategories are deleted - delete products when categories are removed. Works only when the category is the default one for this product -- Manager update exists now. Run php Thelia thelia:update +- Manager update exists now. Run ```php Thelia thelia:update``` - Coupon works now - Improved tax rule configuration diff --git a/core/lib/Thelia/Command/CreateAdminUser.php b/core/lib/Thelia/Command/CreateAdminUser.php index 988122e7a..026cf42ca 100644 --- a/core/lib/Thelia/Command/CreateAdminUser.php +++ b/core/lib/Thelia/Command/CreateAdminUser.php @@ -88,9 +88,10 @@ class CreateAdminUser extends ContainerAwareCommand )); } - protected function enterData($dialog, $output, $label, $error_message) + protected function enterData($dialog, $output, $label, $error_message, $hidden = false) { - return $dialog->askAndValidate( + $command = $hidden ? 'askHiddenResponse' : 'askAndValidate'; + return $dialog->$command( $output, $this->decorateInfo($label), function ($answer) { @@ -122,8 +123,8 @@ class CreateAdminUser extends ContainerAwareCommand $admin->setLastname($input->getOption("last_name") ?: $this->enterData($dialog, $output, "User last name : ", "Please enter user last name.")); do { - $password = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password : ", "Please enter a password."); - $password_again = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password (again): ", "Please enter the password again."); + $password = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password : ", "Please enter a password.", true); + $password_again = $input->getOption("password") ?: $this->enterData($dialog, $output, "Password (again): ", "Please enter the password again.", true); if (! empty($password) && $password == $password_again) { From 882bfeb80cc3f78c122907570351254fde381d5f Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 13 Jan 2014 10:12:08 +0100 Subject: [PATCH 3/4] import missing namespaces in Proruct controller --- core/lib/Thelia/Controller/Admin/ProductController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php index 7b727f206..549ee6609 100644 --- a/core/lib/Thelia/Controller/Admin/ProductController.php +++ b/core/lib/Thelia/Controller/Admin/ProductController.php @@ -26,6 +26,8 @@ namespace Thelia\Controller\Admin; use Symfony\Component\HttpFoundation\JsonResponse; use Propel\Runtime\ActiveQuery\Criteria; +use Thelia\Core\Event\FeatureProduct\FeatureProductDeleteEvent; +use Thelia\Core\Event\FeatureProduct\FeatureProductUpdateEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\Product\ProductUpdateEvent; use Thelia\Core\Event\Product\ProductCreateEvent; @@ -49,6 +51,8 @@ use Thelia\Core\Security\AccessManager; use Thelia\Model\AccessoryQuery; use Thelia\Model\CategoryQuery; +use Thelia\Model\FeatureQuery; +use Thelia\Model\FeatureTemplateQuery; use Thelia\Model\FolderQuery; use Thelia\Model\ContentQuery; use Thelia\Model\AttributeQuery; From 6f972d8cf856e11e74feabe54c0a0e9e6d096e6c Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 13 Jan 2014 10:42:52 +0100 Subject: [PATCH 4/4] create update file --- UPDATE.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 UPDATE.md diff --git a/UPDATE.md b/UPDATE.md new file mode 100644 index 000000000..b98385791 --- /dev/null +++ b/UPDATE.md @@ -0,0 +1,8 @@ +#How to update your Thelia + +- copy all files from the thelia new version (local/modules/* files too) +- clear all caches running ```php Thelia cache:clear``` +- run ```php Thelia thelia:update``` +- again clear all caches in all environment : + - ```php Thelia cache:clear``` + - ```php Thelia cache:clear --env=prod``` \ No newline at end of file