Skip to content

Commit

Permalink
Deprecate navigation view helpers for removal in 3.0
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Nov 22, 2024
1 parent ddc9207 commit 9c58204
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/book/v2/migration/preparing-for-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ The impact of this future removal will affect templates that use a regular short
The following view helpers are deprecated and will be removed in version 3.0 of `laminas-view`.

- The [Json View Helper](../helpers/json.md)
- The Navigation View Helper and all associated helpers, `Links`, `Menu`, `Sitemap`, `Breadcrumbs` along with its dedicated plugin manager will be removed in 3.0. These view helpers have been copied to the `laminas-navigation` component, and you can prepare for their removal by altering the namespace in your code from, for example `Laminas\View\Helper\Navigation\Menu` to `Laminas\Navigation\View\Helper\Menu`
2 changes: 2 additions & 0 deletions src/Helper/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
/**
* Proxy helper for retrieving navigational helpers and forwarding calls
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*
* @method Navigation\Breadcrumbs breadcrumbs($container = null)
* @method Navigation\Links links($container = null)
* @method Navigation\Menu menu($container = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
* Base class for navigational helpers.
*
* Duck-types against Laminas\I18n\Translator\TranslatorAwareInterface.
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements
EventManagerAwareInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Helper for printing breadcrumbs.
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
class Breadcrumbs extends AbstractHelper
{
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/HelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Interface for navigational helpers
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
interface HelperInterface extends BaseHelperInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

/**
* Helper for printing <link> elements
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
class Links extends AbstractHelper
{
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/Listener/AclListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Default Access Control Listener
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
class AclListener
{
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

/**
* Helper for rendering menus from navigation containers.
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*/
class Menu extends AbstractHelper
{
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Navigation\HelperInterface. Additionally, it registers a number of default
* helpers.
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*
* @template InstanceType of HelperInterface|AbstractHelper
* @psalm-import-type ServiceManagerConfiguration from ServiceManager
* @extends HelperPluginManager<InstanceType>
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Navigation/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/**
* Helper for printing sitemaps
*
* @deprecated This class has been moved to the `Laminas\Navigation` component and will be removed in 3.0
*
* @link http://www.sitemaps.org/protocol.php
*/
class Sitemap extends AbstractHelper
Expand Down

0 comments on commit 9c58204

Please sign in to comment.