Skip to content

Commit

Permalink
[AllBundles] Deprecate unused controller actions and document method …
Browse files Browse the repository at this point in the history
…visibility changes (#1883)
  • Loading branch information
acrobat authored and sandergo90 committed Apr 3, 2018
1 parent 8bcf4e7 commit 914ba97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion UPGRADE-5.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@ ArticleBundle
-------------

* Passing the `request_stack` service as the third argument in `Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension` is deprecated and will be removed in 6.0.
* The `getAdminListConfigurator` and `createAdminListConfigurator` method in the `AbstractArticleEntityAdminListController` class will change from `public` to `protected` visibility in 6.0.

ConfigBundle
------------

* Passing the `container` as the sixth argument in `Kunstmaan\ConfigBundle\Controller\ConfigController` is deprecated in and will be removed in 6.0.

MediaBundle
-----------

* The unused `MediaController::moveMedia` action is deprecated and will be removed in 6.0.

NodeBundle
----------

* `CronUpdateNodeCommand::__construct()` now takes an instance of `Doctrine\ORM\EntityManagerInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `InitAclCommand::__construct()` now takes an instance of `Doctrine\ORM\EntityManagerInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `CronUpdateNodeCommand` and `InitAclCommand` have been marked as final.
* `Possibility to change the icon of your page.`: The possibility already exists to change the icon in the sidebar tree of your page. This was already available by yml configuration. I've added a new interface, TreeIconInterface that can be implemented and that will return the icon that should be used.
* `Possibility to change the icon of your page.`: The possibility already exists to change the icon in the sidebar tree of your page. This was already available by yml configuration. I've added a new interface, TreeIconInterface that can be implemented and that will return the icon that should be used.
* The unused `WidgetsController::selectNodesLazySearch` action is deprecated and will be removed in 6.0.

TranslatorBundle
----------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ abstract class AbstractArticleEntityAdminListController extends AdminListControl
protected $aclHelper;

/**
* NEXT_MAJOR: change method visibility from public to protected
*
* @return AdminListConfiguratorInterface
*/
public function getAdminListConfigurator(Request $request)
Expand All @@ -54,6 +56,8 @@ public function getAdminListConfigurator(Request $request)
}

/**
* NEXT_MAJOR: change method visibility from public to protected
*
* @return AbstractArticlePageAdminListConfigurator
*/
abstract public function createAdminListConfigurator();
Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaBundle/Controller/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ public function createModalAction(Request $request, $folderId, $type)
*/
public function moveMedia(Request $request)
{
@trigger_error(sprintf('The "%s" controller action is deprecated in KunstmaanMediaBundle 5.1 and will be removed in KunstmaanMediaBundle 6.0.', __METHOD__), E_USER_DEPRECATED);

$mediaId = $request->request->get('mediaId');
$folderId = $request->request->get('folderId');

Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/NodeBundle/Controller/WidgetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function selectLinkAction(Request $request)
*/
public function selectNodesLazySearch(Request $request)
{
@trigger_error(sprintf('The "%s" controller action is deprecated in KunstmaanNodeBundle 5.1 and will be removed in KunstmaanNodeBundle 6.0.', __METHOD__), E_USER_DEPRECATED);

/* @var EntityManagerInterface $em */
$em = $this->getDoctrine()->getManager();
$locale = $request->getLocale();
Expand Down

0 comments on commit 914ba97

Please sign in to comment.