Remove obsolete `Breadcrumbs` methods (#4298)
authorMatthias Schmidt <gravatronics@live.com>
Wed, 16 Jun 2021 12:21:11 +0000 (14:21 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Jun 2021 12:21:11 +0000 (14:21 +0200)
As these methods would result in exceptions for many versions, it is safe to remove them.

wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php

index 781edc9e2b6eea9dff73ef92d4380934a0ff1ee7..60be977cec088a983c5edca1fb0756ea602064ce 100644 (file)
@@ -28,24 +28,6 @@ class Breadcrumbs extends SingletonFactory implements \Countable, \Iterator
      */
     protected $index = 0;
 
-    /**
-     * @inheritDoc
-     */
-    protected function init()
-    {
-    }
-
-    /**
-     * Adds a breadcrumb (insertion order is crucial!).
-     *
-     * @param Breadcrumb $item
-     * @deprecated  3.0
-     */
-    public function add(Breadcrumb $item)
-    {
-        throw new \BadMethodCallException("Breadcrumbs::add() is no longer supported, please use " . PageLocationManager::class . " instead.");
-    }
-
     /**
      * Returns the list of breadcrumbs.
      *
@@ -60,29 +42,6 @@ class Breadcrumbs extends SingletonFactory implements \Countable, \Iterator
         return $this->items;
     }
 
-    /**
-     * Replaces a breadcrumb, returns true if replacement was successful.
-     *
-     * @param Breadcrumb $item
-     * @param int $index
-     * @deprecated  3.0
-     */
-    public function replace(Breadcrumb $item, $index)
-    {
-        throw new \BadMethodCallException("Breadcrumbs::replace() is no longer supported, please use " . PageLocationManager::class . " instead.");
-    }
-
-    /**
-     * Removes a breadcrumb, returns true if deletion was successful.
-     *
-     * @param int $index
-     * @deprecated  3.0
-     */
-    public function remove($index)
-    {
-        throw new \BadMethodCallException("Breadcrumbs::remove() is no longer supported, please use " . PageLocationManager::class . " instead.");
-    }
-
     /**
      * Loads the list of breadcrumbs.
      */