From 299b2740d5f4b562fabb5730b9ec03fcadb347cc Mon Sep 17 00:00:00 2001 From: Dave Reid <dave@davereid.net> Date: Wed, 1 Jul 2020 12:01:32 -0500 Subject: [PATCH] Removing deprecated functions. --- src/XmlSitemapWriter.php | 14 -------- xmlsitemap.module | 69 ---------------------------------------- 2 files changed, 83 deletions(-) diff --git a/src/XmlSitemapWriter.php b/src/XmlSitemapWriter.php index e00c82e5..1eec858a 100644 --- a/src/XmlSitemapWriter.php +++ b/src/XmlSitemapWriter.php @@ -184,20 +184,6 @@ class XmlSitemapWriter extends \XMLWriter { } } - /** - * Writes an full XML sitemap element tag. - * - * @param string $name - * The element name. - * @param array $element - * An array of the elements properties and values. - * - * @deprecated Use \Drupal\xmlsitemap\XmlSitemapWriter::writeElement(). - */ - public function writeSitemapElement($name, array $element) { - $this->writeElement($name, $element); - } - /** * Writes full element tag including support for nested elements. * diff --git a/xmlsitemap.module b/xmlsitemap.module index 1eb15b14..1164a4fa 100644 --- a/xmlsitemap.module +++ b/xmlsitemap.module @@ -966,46 +966,6 @@ function xmlsitemap_link_bundle_delete($entity, $bundle, $delete_links = TRUE) { xmlsitemap_get_link_info(NULL, TRUE); } -/** - * Checks access for a bundle. - * - * @param string $entity - * Entity type id. - * @param string $bundle - * Bundle id. - * - * @return bool - * If TRUE, access is allowed, FALSE otherwise. - * - * @deprecated in xmlsitemap:8.x-1.1 and is removed from xmlsitemap:2.0.0. - * - * @see https://www.drupal.org/project/xmlsitemap/issues/3156088 - */ -function xmlsitemap_link_bundle_access($entity, $bundle = NULL) { - @trigger_error(__FUNCTION__ . ' is deprecated in xmlsitemap:8.x-1.1 and will be removed in xmlsitemap:2.0.0. See https://www.drupal.org/project/xmlsitemap/issues/3156088', E_USER_DEPRECATED); - return FALSE; -} - -/** - * Get path of a bundle. - * - * @param string $entity - * Entity type id. - * @param string $bundle - * Bundle id. - * - * @return mixed - * Path of bundle, or FALSE if it does not exist. - * - * @deprecated in xmlsitemap:8.x-1.1 and is removed from xmlsitemap:2.0.0. - * - * @see https://www.drupal.org/project/xmlsitemap/issues/3156088 - */ -function xmlsitemap_get_bundle_path($entity, $bundle) { - @trigger_error(__FUNCTION__ . ' is deprecated in xmlsitemap:8.x-1.1 and will be removed in xmlsitemap:2.0.0. See https://www.drupal.org/project/xmlsitemap/issues/3156088', E_USER_DEPRECATED); - return FALSE; -} - /** * Implements hook_entity_bundle_rename(). */ @@ -2283,35 +2243,6 @@ function xmlsitemap_get_current_chunk(XmlSitemapInterface $sitemap, Request $req } } -/** - * Creates a response reading the sitemap file and adding content to response. - * - * @param \Symfony\Component\HttpFoundation\Response $response - * Response object. - * @param string $file - * File uri. - * @param array $headers - * Headers of the response. - * - * @return \Symfony\Component\HttpFoundation\BinaryFileResponse - * The sitemap response object. - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * If the sitemap is not found or the sitemap file is not readable. - * - * @deprecated in xmlsitemap:8.x-1.0 and is removed from xmlsitemap:2.0.0. Use - * \Drupal\xmlsitemap\Controller\XmlSitemapController::getSitemapResponse() - * instead. - * - * @see https://www.drupal.org/project/xmlsitemap/issues/2869214 - */ -function xmlsitemap_output_file(Response $response, $file, array $headers = []) { - @trigger_error(__FUNCTION__ . ' is deprecated in xmlsitemap:8.x-1.0 and will be removed in xmlsitemap:2.0.0. Use \Drupal\xmlsitemap\Controller\XmlSitemapController::getSitemapResponse. See https://www.drupal.org/project/xmlsitemap/issues/2869214', E_USER_DEPRECATED); - /** @var \Drupal\xmlsitemap\Controller\XmlSitemapController $controller */ - $controller = \Drupal::classResolver(XmlSitemapController::class); - return $controller->getSitemapResponse($file, \Drupal::request(), $headers + $response->headers->all()); -} - /** * Get Blurb. * -- GitLab