From 818ea8c6c0d91ce4189da8d0ff1d430de5ec0199 Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:33:31 +0200 Subject: [PATCH 1/2] Adding a migration for 3.0 --- config/sets/sulu/sulu-30.php | 21 +++++++++++++++++++++ src/Set/SuluSetList.php | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 config/sets/sulu/sulu-30.php diff --git a/config/sets/sulu/sulu-30.php b/config/sets/sulu/sulu-30.php new file mode 100644 index 0000000..5209a05 --- /dev/null +++ b/config/sets/sulu/sulu-30.php @@ -0,0 +1,21 @@ +ruleWithConfiguration( + RenameMethodRector::class, + [ + new MethodCallRename( + 'Sulu\Bundle\CategoryBundle\Entity\CategoryRepository', + 'findByCategoryIds', + 'findByCategoriesIds', + ), + ], + ); +}; + diff --git a/src/Set/SuluSetList.php b/src/Set/SuluSetList.php index 0da02e5..702a9c0 100644 --- a/src/Set/SuluSetList.php +++ b/src/Set/SuluSetList.php @@ -22,4 +22,9 @@ final class SuluSetList implements SetListInterface * @var string */ final public const SULU_26 = __DIR__ . '/../../config/sets/sulu/sulu-26.php'; + + /** + * @var string + */ + final public const SULU_30 = __DIR__ . '/../../config/sets/sulu/sulu-30.php'; } From 88644e4da3d8178e178cc48fd37963097552b1a3 Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:54:32 +0200 Subject: [PATCH 2/2] More methods --- config/sets/sulu/sulu-30.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/sets/sulu/sulu-30.php b/config/sets/sulu/sulu-30.php index 5209a05..5fc8259 100644 --- a/config/sets/sulu/sulu-30.php +++ b/config/sets/sulu/sulu-30.php @@ -15,6 +15,9 @@ 'findByCategoryIds', 'findByCategoriesIds', ), + new MethodCallRename( 'Sulu\Bundle\CategoryBundle\Entity\Category', 'addChildren', 'addChild'), + new MethodCallRename( 'Sulu\Bundle\CategoryBundle\Entity\Category', 'removeChildren', 'removeChild'), + new MethodCallRename( 'Sulu\Bundle\AdminBundle\Admin\View\FormOverlayListViewBuilder', 'setRequestParameters', 'addRequestParameters'), ], ); };