<p>There's a Craft 3 port of Category Sources in the <a href="https://github.com/pixelandtonic/CategorySources/tree/v2" rel="nofollow noreferrer"><code>v2</code> branch</a> for the repo. It doesn't appear to be published to <a href="https://packagist.org/" rel="nofollow noreferrer">Packagist</a> and the Plugin Store, which means you'll need to add the URL for the plugin's Git repository to your project's <code>composer.json</code> file in order for Composer to find it.</p>

<p>Add the following to the root of your <code>composer.json</code> file:</p>

<pre><code>"repositories": {
    "craftcms/category-sources": {
        "type": "git",
        "url": "git@github.com:pixelandtonic/CategorySources.git",
        "trunk-path": "v2"
    }
}
</code></pre>

<p>You might also need to add the following to <code>composer.json</code>:</p>

<pre><code>"minimum-stability": "dev",
"prefer-stable": true,
</code></pre>

<p>Then, you can do <code>composer require craftcms/category-sources</code> to actually download the plugin.</p>

<p>Note: I haven't tested this plugin myself, and the fact that it isn't released probably means it's not completely ready for primetime (it might not even work at all, with recent versions of Craft 3). Proceed with caution; you might also want to get in touch with Pixel &amp; Tonic to hear if the plugin is likely to get a proper release anytime soon.</p>

CC BY-SA 4.0
2018-07-22T17:00:07.980Z
Thanks for the help so far. I think I'll check with Pixel & Tonic to be on the safe side!
shandy
CC BY-SA 4.0
2019-01-30T16:30:49.863Z
Has it been abandoned? :/
benface
CC BY-SA 4.0
2018-07-22T16:46:03.053Z
2018-07-22T17:11:55.353Z
2018-07-22T17:11:55.353Z
Mats Mikkel Rummelhoff
<p>I'm updating a site from Craft 2 to Craft 3 and can't find the equivalent of the '<a href="https://github.com/pixelandtonic/CategorySources" rel="nofollow noreferrer">Category Sources</a>' plugin? It's really useful when it comes to restricting the source for related entries by the category the entry belongs to. Does anybody know of an alternative solution?</p>

<p>Thanks.</p>

CC BY-SA 4.0
2018-07-22T15:52:04.467Z
An alternative solution would be to create the plugin in your own but why don't you use the Craft 3 version of the plugin? If it has any bugs you can submit them, I'm sure they'll fix it
Robin Schambach
CC BY-SA 4.0
2018-07-22T16:32:47.447Z
I don't see a Craft 3 version of the plugin anywhere? It would be great if there was!
shandy
CC BY-SA 4.0
2018-07-22T16:34:48.773Z
Click on "Branch" select `v2` and you'll see the Craft 3 version
Robin Schambach
<craft3><plugins>
Category Sources for Craft 3?
# Category Sources for Craft 3?

(Asked by: username_0 on 2018-07-22)

I'm updating a site from Craft 2 to Craft 3 and can't find the equivalent of the '[Category Sources](https://github.com/pixelandtonic/CategorySources)' plugin? It's really useful when it comes to restricting the source for related entries by the category the entry belongs to. Does anybody know of an alternative solution?

Thanks.

**Tags:** craft3, plugins
> **Comments:**
> **username_1**: An alternative solution would be to create the plugin in your own but why don't you use the Craft 3 version of the plugin? If it has any bugs you can submit them, I'm sure they'll fix it  
> **username_0**: I don't see a Craft 3 version of the plugin anywhere? It would be great if there was!  
> **username_1**: Click on "Branch" select `v2` and you'll see the Craft 3 version  

---

## 1 answers

### Answer by username_2 on 2018-07-22. Score: 2

There's a Craft 3 port of Category Sources in the v2 branch for the repo. It doesn't appear to be published to Packagist and the Plugin Store, which means you'll need to add the URL for the plugin's Git repository to your project's composer.json file in order for Composer to find it.
Add the following to the root of your composer.json file:
"repositories": {
    "craftcms/category-sources": {
        "type": "git",
        "url": "git@github.com:pixelandtonic/CategorySources.git",
        "trunk-path": "v2"
    }
}

You might also need to add the following to composer.json:
"minimum-stability": "dev",
"prefer-stable": true,

Then, you can do composer require craftcms/category-sources to actually download the plugin.
Note: I haven't tested this plugin myself, and the fact that it isn't released probably means it's not completely ready for primetime (it might not even work at all, with recent versions of Craft 3). Proceed with caution; you might also want to get in touch with Pixel & Tonic to hear if the plugin is likely to get a proper release anytime soon.

> **Comments:**
> **username_0**: Thanks for the help so far. I think I'll check with Pixel & Tonic to be on the safe side!  
> **username_3**: Has it been abandoned? :/  

---

