Skip to content

Commit

Permalink
Merge pull request PrestaShop#188 from leemyongpakvn/mark-deprecated-…
Browse files Browse the repository at this point in the history
…functions-since-v400n600

Mark deprecated functions since v4.0.0 and v6.0.0
  • Loading branch information
leemyongpakvn authored Oct 4, 2023
2 parents 799da9d + cbe39e0 commit b6c6cda
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ProductComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ public static function deleteUsefulness($id_product_comment)
* Report comment
*
* @return bool
*
* @deprecated 4.0.0 - migrated to controllers/front/ReportComment and src/Entity/ProductCommentReport
*/
public static function reportComment($id_product_comment, $id_customer)
{
Expand All @@ -450,6 +452,8 @@ public static function reportComment($id_product_comment, $id_customer)
* Comment already report
*
* @return bool
*
* @deprecated 4.0.0 - migrated to controllers/front/ReportComment and src/Entity/ProductCommentReport
*/
public static function isAlreadyReport($id_product_comment, $id_customer)
{
Expand All @@ -464,6 +468,8 @@ public static function isAlreadyReport($id_product_comment, $id_customer)
* Set comment usefulness
*
* @return bool
*
* @deprecated 4.0.0 - migrated to controllers/front/UpdateCommentUsefulness and src/Entity/ProductCommentUsefulness
*/
public static function setCommentUsefulness($id_product_comment, $usefulness, $id_customer)
{
Expand All @@ -476,6 +482,8 @@ public static function setCommentUsefulness($id_product_comment, $usefulness, $i
* Usefulness already set
*
* @return bool
*
* @deprecated 4.0.0 - migrated to controllers/front/UpdateCommentUsefulness and src/Entity/ProductCommentUsefulness
*/
public static function isAlreadyUsefulness($id_product_comment, $id_customer)
{
Expand Down
7 changes: 7 additions & 0 deletions ProductCommentCriterion.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class ProductCommentCriterion extends ObjectModel
],
];

/**
* @deprecated 6.0.0 - migrated to src/Repository/ProductCommentCriterionRepository
*/
public function delete()
{
if (!parent::delete()) {
Expand Down Expand Up @@ -96,6 +99,8 @@ public function update($nullValues = false)
* Link a Comment Criterion to a product
*
* @return bool succeed
*
* @deprecated 6.0.0 - migrated to src/Repository/ProductCommentCriterionRepository
*/
public function addProduct($id_product)
{
Expand All @@ -113,6 +118,8 @@ public function addProduct($id_product)
* Link a Comment Criterion to a category
*
* @return bool succeed
*
* @deprecated 6.0.0 - migrated to src/Repository/ProductCommentCriterionRepository
*/
public function addCategory($id_category)
{
Expand Down
2 changes: 1 addition & 1 deletion upgrade/install-6.0.3.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
exit;
}

function upgrade_module_6_0_1($object)
function upgrade_module_6_0_3($object)
{
return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'product_comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
&& Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'product_comment_criterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
Expand Down

0 comments on commit b6c6cda

Please sign in to comment.