Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slug Driver Support #2456

Merged
merged 22 commits into from
Dec 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix parameter order
  • Loading branch information
askvortsov1 committed Dec 2, 2020
commit 1db1d11e37f81c5fa8e954ffa450efe43420f186
13 changes: 7 additions & 6 deletions src/Api/Controller/ShowDiscussionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ class ShowDiscussionController extends AbstractShowController
protected $posts;

/**
* {@inheritdoc}
* @var SlugManager
*/
public $serializer = DiscussionSerializer::class;
protected $slugManager;

/**
* @var SlugManager
* {@inheritdoc}
*/
protected $slugManager;
public $serializer = DiscussionSerializer::class;

/**
* {@inheritdoc}
Expand All @@ -67,12 +67,13 @@ class ShowDiscussionController extends AbstractShowController
/**
* @param \Flarum\Discussion\DiscussionRepository $discussions
* @param \Flarum\Post\PostRepository $posts
* @param \Flarum\Http\SlugManager $slugManager
*/
public function __construct(SlugManager $slugManager, DiscussionRepository $discussions, PostRepository $posts)
public function __construct(DiscussionRepository $discussions, PostRepository $posts, SlugManager $slugManager)
{
$this->slugManager = $slugManager;
$this->discussions = $discussions;
$this->posts = $posts;
$this->slugManager = $slugManager;
}

/**
Expand Down