Try to use
/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", nullable=true)
*/
protected $parent;
But I also recommend you to set onDelete="SET NULL" on the parent column, like this:
/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="SET NULL")
*/
public $parent;
I know it's not part of the question, but you are probably going to need this in the near future. If you want the children column to give you the categories in a order that the user can choose, you may want to add a integer column named order and define children like this:
/**
* @ORM\OneToMany(targetEntity="Category", mappedBy="parent")
* @ORM\OrderBy({"order" = "ASC"})
*/
public $children;