+ $newTag->setLabel($form->get('label')->getData());
+
+ if ($newTag->getLabel() === $tag->getLabel()) {
+ return $this->redirect($redirectUrl);
+ }
+
+ $tagFromRepo = $this->get('wallabag_core.tag_repository')->findOneByLabel($newTag->getLabel());
+
+ if (null !== $tagFromRepo) {
+ $newTag = $tagFromRepo;
+ }