@@ -27,11 +27,11 @@ interface CategoryManagerInterface
     public function getRootCategory($context);
 
     /**
-     * @param bool|true $loadChildren
+     * @param bool $loadChildren
      *
      * @return CategoryInterface[]
      */
-    public function getRootCategories($loadChildren);
+    public function getRootCategories($loadChildren = true);
 
     /**
      * @param int $categoryId
<?php

/*
 * This file is part of the Sonata Project package.
 *
 * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\MediaBundle\Model;

use Sonata\ClassificationBundle\Model\CategoryInterface;

/**
 * @author Joao Albuquerque <albuquerque.joao.filipe@gmail.com>
 * @author Christian Gripp <mail@core23.de>
 */
interface CategoryManagerInterface
{
    /**
     * @param string $context
     *
     * @return CategoryInterface
     */
    public function getRootCategory($context);

    /**
     * @param bool|true $loadChildren
     *
     * @return CategoryInterface[]
     */
    public function getRootCategories($loadChildren);

    /**
     * @param int $categoryId
     *
     * @return CategoryInterface[]
     */
    public function find($categoryId);

    /**
     * @param array $criteria
     *
     * @return CategoryInterface[]
     */
    public function findBy(array $criteria);

    /**
     * Create an empty category instance.
     *
     * @return CategoryInterface
     */
    public function create();

    /**
     * Save a category.
     *
     * @param CategoryInterface $category The category to save
     */
    public function save($category);
}

this is a BC break, we should add an UPGRADE note