Skip to content

Commit

Permalink
[!!!][TASK] Drop obsolete MetaService
Browse files Browse the repository at this point in the history
The meta service is obsolete since TYPO3 v9 and is replaced
through the usage of the MetaTag-API from core. To migrate to
the new API you just need to remove all usages of the MetaService.
  • Loading branch information
benjaminkott committed Aug 18, 2019
1 parent 302bc13 commit 7cd241b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 262 deletions.
11 changes: 0 additions & 11 deletions Classes/Controller/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use T3G\AgencyPack\Blog\Domain\Repository\PostRepository;
use T3G\AgencyPack\Blog\Domain\Repository\TagRepository;
use T3G\AgencyPack\Blog\Service\CacheService;
use T3G\AgencyPack\Blog\Service\MetaService;
use T3G\AgencyPack\Blog\Service\MetaTagService;
use T3G\AgencyPack\Blog\Utility\ArchiveUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
Expand Down Expand Up @@ -189,8 +188,6 @@ public function listPostsByDateAction(int $year = null, int $month = null): void
$dateTime->format('F'),
$year,
], LocalizationUtility::translate('meta.title.listPostsByDate', 'blog'));
MetaService::set(MetaService::META_TITLE, $title);
MetaService::set(MetaService::META_DESCRIPTION, LocalizationUtility::translate('meta.description.listPostsByDate', 'blog'));
MetaTagService::set(MetaTagService::META_TITLE, (string) $title);
MetaTagService::set(MetaTagService::META_DESCRIPTION, (string) LocalizationUtility::translate('meta.description.listPostsByDate', 'blog'));
}
Expand Down Expand Up @@ -222,9 +219,6 @@ public function listPostsByCategoryAction(Category $category = null): void
$this->view->assign('type', 'bycategory');
$this->view->assign('posts', $posts);
$this->view->assign('category', $category);
MetaService::set(MetaService::META_TITLE, $category->getTitle());
MetaService::set(MetaService::META_DESCRIPTION, $category->getDescription());
MetaService::set(MetaService::META_CATEGORIES, [$category->getTitle()]);
MetaTagService::set(MetaTagService::META_TITLE, (string) $category->getTitle());
MetaTagService::set(MetaTagService::META_DESCRIPTION, (string) $category->getDescription());
} else {
Expand All @@ -246,8 +240,6 @@ public function listPostsByAuthorAction(Author $author = null): void
$this->view->assign('type', 'byauthor');
$this->view->assign('posts', $posts);
$this->view->assign('author', $author);
MetaService::set(MetaService::META_TITLE, $author->getName());
MetaService::set(MetaService::META_DESCRIPTION, $author->getBio());
MetaTagService::set(MetaTagService::META_TITLE, (string) $author->getName());
MetaTagService::set(MetaTagService::META_DESCRIPTION, (string) $author->getBio());
} else {
Expand All @@ -269,9 +261,6 @@ public function listPostsByTagAction(Tag $tag = null): void
$this->view->assign('type', 'bytag');
$this->view->assign('posts', $posts);
$this->view->assign('tag', $tag);
MetaService::set(MetaService::META_TITLE, $tag->getTitle());
MetaService::set(MetaService::META_DESCRIPTION, $tag->getDescription());
MetaService::set(MetaService::META_TAGS, [$tag->getTitle()]);
MetaTagService::set(MetaTagService::META_TITLE, (string) $tag->getTitle());
MetaTagService::set(MetaTagService::META_DESCRIPTION, (string) $tag->getDescription());
} else {
Expand Down
155 changes: 0 additions & 155 deletions Classes/Service/MetaService.php

This file was deleted.

39 changes: 0 additions & 39 deletions Classes/UserFunc/MetaService.php

This file was deleted.

57 changes: 0 additions & 57 deletions Tests/Unit/Service/MetaServiceTest.php

This file was deleted.

0 comments on commit 7cd241b

Please sign in to comment.