diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 5a3cd1c..a6a0b9f 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1037,10 +1037,13 @@ function menu_get_object($type = 'node', $position = 1, $path = NULL) { } // Attempt to inspect the route object. - $path = \Drupal::request()->attributes->get(RouteObjectInterface::ROUTE_OBJECT)->getPath(); - $parts = explode('/', ltrim($path, '/')); - if (isset($parts[$position]) && $parts[$position] == '{' . $type . '}') { - return $router_item['map'][$position]; + $request = \Drupal::request(); + if ($request->attributes->has(RouteObjectInterface::ROUTE_OBJECT)) { + $path = $request->attributes->get(RouteObjectInterface::ROUTE_OBJECT)->getPath(); + $parts = explode('/', ltrim($path, '/')); + if (isset($parts[$position]) && $parts[$position] == '{' . $type . '}') { + return $router_item['map'][$position]; + } } } diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc index 57e2b5c..cd938e7 100644 --- a/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -114,6 +114,8 @@ function template_preprocess_aggregator_item(&$variables) { * An OPML formatted string. * * @see aggregator_menu() + * + * @deprecated Use \Drupal\aggregator\Controller\AggregatorController::opmlPage() */ function aggregator_page_opml($cid = NULL) { if ($cid) { diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php index 371a069..1e6826b 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php @@ -347,7 +347,7 @@ public function sources() { } /** - * @see aggregator_opml(). + * @todo Remove aggregator_opml(). */ public function opmlPage($cid = NULL) { module_load_include('pages.inc', 'aggregator'); diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index 0f6ea1e..86c59a8 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -12,6 +12,8 @@ * Page callback: Attaches CSS for the block region demo. * * @see block_menu() + * + * @deprecated Use \Drupal\block\Controller\BlockController::demo() */ function block_admin_demo($theme = NULL) { return array( diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockAdminController.php b/core/modules/block/lib/Drupal/block/Controller/BlockAdminController.php index ce41915..41fd587 100644 --- a/core/modules/block/lib/Drupal/block/Controller/BlockAdminController.php +++ b/core/modules/block/lib/Drupal/block/Controller/BlockAdminController.php @@ -16,7 +16,7 @@ class BlockAdminController extends ControllerBase { /** - * @see block_admin_demo() + * @todo Remove block_admin_demo(). */ public function demo($theme) { module_load_include('admin.inc', 'block'); diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc index f732a57..6502873 100644 --- a/core/modules/comment/comment.admin.inc +++ b/core/modules/comment/comment.admin.inc @@ -16,6 +16,8 @@ * * @see comment_menu() * @see comment_multiple_delete_confirm() + * + * @deprecated Use \Drupal\comment\Controller\CommentController::adminPage() */ function comment_admin($type = 'new') { $request = \Drupal::request(); diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php index 7edf82c..137def5 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -272,7 +272,7 @@ public function renderNewCommentsNodeLinks(Request $request) { } /** - * @see comment_admin() + * @todo Remove comment_admin(). */ public function adminPage($type) { module_load_include('admin.inc', 'comment'); diff --git a/core/modules/contact/contact.pages.inc b/core/modules/contact/contact.pages.inc index 5a8cea3..491bb30 100644 --- a/core/modules/contact/contact.pages.inc +++ b/core/modules/contact/contact.pages.inc @@ -21,6 +21,8 @@ * @see contact_menu() * @see contact_site_form_submit() * @ingroup forms + * + * @deprecated Use \Drupal\contact\Controller\ContactController::contactSitePage() */ function contact_site_page(Category $category = NULL) { // Check if flood control has been activated for sending e-mails. @@ -66,6 +68,8 @@ function contact_site_page(Category $category = NULL) { * @see contact_personal_form_submit() * * @ingroup forms + * + * @deprecated Use \Drupal\contact\Controller\ContactController::contactPersonalPage() */ function contact_personal_page($recipient) { global $user; diff --git a/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php b/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php index fc12d7b..0bdb407 100644 --- a/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php +++ b/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php @@ -16,7 +16,7 @@ class ContactPageController { /** - * @see contact_site_page() + * @todo Remove contact_site_page(). */ public function contactSitePage(CategoryInterface $contact_category = NULL) { module_load_include('pages.inc', 'contact'); @@ -24,7 +24,7 @@ public function contactSitePage(CategoryInterface $contact_category = NULL) { } /** - * @see contact_personal_page() + * @todo Remove contact_personal_page(). */ public function contactPersonalPage(UserInterface $user) { module_load_include('pages.inc', 'contact'); diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index ec0e5e9..9a5ef3b 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -18,6 +18,10 @@ * A build array in the format expected by drupal_render(). * * @see dblog_menu() + * + * @deprecated Use \Drupal\dblog\Controller\DblogController::pageNotFound(), + * \Drupal\dblog\Controller\DblogController::accessDenied(), or + * \Drupal\dblog\Controller\DblogController::search() */ function dblog_top($type) { diff --git a/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php b/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php index ee07fd6..795f689 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php +++ b/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php @@ -320,7 +320,7 @@ protected function buildFilterQuery() { } /** - * @see dblog_top() + * @todo Remove dblog_top(). */ public function pageNotFound() { module_load_include('admin.inc', 'dblog'); @@ -328,7 +328,7 @@ public function pageNotFound() { } /** - * @see dblog_top() + * @todo Remove dblog_top(). */ public function accessDenied() { module_load_include('admin.inc', 'dblog'); @@ -336,7 +336,7 @@ public function accessDenied() { } /** - * @see dblog_top() + * @todo Remove dblog_top(). */ public function search() { module_load_include('admin.inc', 'dblog'); diff --git a/core/modules/language/language.admin.inc b/core/modules/language/language.admin.inc index 562580b..c3f669c 100644 --- a/core/modules/language/language.admin.inc +++ b/core/modules/language/language.admin.inc @@ -336,6 +336,8 @@ function theme_language_negotiation_configure_browser_form_table($variables) { /** * Returns the content language settings form. + * + * @deprecated Use \Drupal\language\Controller\LanguageController::contentSettings() */ function language_content_settings_page() { return drupal_get_form('language_content_settings_form', language_entity_supported()); diff --git a/core/modules/language/lib/Drupal/language/Controller/LanguageController.php b/core/modules/language/lib/Drupal/language/Controller/LanguageController.php index 3fdd2a2..0724471 100644 --- a/core/modules/language/lib/Drupal/language/Controller/LanguageController.php +++ b/core/modules/language/lib/Drupal/language/Controller/LanguageController.php @@ -13,7 +13,7 @@ class LanguageController { /** - * @see language_content_settings_page() + * @todo Remove language_content_settings_page(). */ public function contentSettings() { module_load_include('admin.inc', 'language'); diff --git a/core/modules/node/lib/Drupal/node/Controller/NodeController.php b/core/modules/node/lib/Drupal/node/Controller/NodeController.php index 6ced20b..5b4d286 100644 --- a/core/modules/node/lib/Drupal/node/Controller/NodeController.php +++ b/core/modules/node/lib/Drupal/node/Controller/NodeController.php @@ -18,7 +18,7 @@ class NodeController extends ControllerBase { /** - * @see node_add_page() + * @todo Remove node_add_page(). */ public function addPage() { module_load_include('pages.inc', 'node'); @@ -26,7 +26,7 @@ public function addPage() { } /** - * @see node_add() + * @todo Remove node_add(). */ public function add(EntityInterface $node_type) { module_load_include('pages.inc', 'node'); @@ -34,14 +34,14 @@ public function add(EntityInterface $node_type) { } /** - * @see node_page_view() + * @todo Remove node_page_view(). */ public function viewPage(NodeInterface $node) { return node_page_view($node); } /** - * @see node_show() + * @todo Remove node_show(). */ public function revisionShow($node_revision) { $node_revision = entity_revision_load('node', $node_revision); @@ -49,7 +49,7 @@ public function revisionShow($node_revision) { } /** - * @see node_revision_overview() + * @todo Remove node_revision_overview(). */ public function revisionOverview(NodeInterface $node) { module_load_include('pages.inc', 'node'); diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 07602b6..cb75476 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -576,6 +576,8 @@ function node_revision_delete($revision_id) { * A $page element suitable for use by drupal_render(). * * @see node_menu() + * + * @deprecated Use \Drupal\node\Controller\NodeController::revisionShow() */ function node_show(EntityInterface $node, $message = FALSE) { // For markup consistency with other pages, use node_view_multiple() rather than node_view(). @@ -1481,6 +1483,8 @@ function node_view_multiple($nodes, $view_mode = 'teaser', $langcode = NULL) { * A page array suitable for use by drupal_render(). * * @see node_menu() + * + * @deprecated Use \Drupal\node\Controller\NodeController::viewPage() */ function node_page_view(EntityInterface $node) { foreach ($node->uriRelationships() as $rel) { diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index 1b6a1e5..8518383 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -24,6 +24,8 @@ * to the node add page for that one node type and does not return at all. * * @see node_menu() + * + * @deprecated Use \Drupal\node\Controller\NodeController::addPage() */ function node_add_page() { $content = array(); @@ -80,6 +82,8 @@ function theme_node_add_list($variables) { * A node submission form. * * @see node_menu() + * + * @deprecated Use \Drupal\node\Controller\NodeController::add() */ function node_add($node_type) { global $user; @@ -175,6 +179,8 @@ function theme_node_preview($variables) { * An array as expected by drupal_render(). * * @see node_menu() + * + * @deprecated Use \Drupal\node\Controller\NodeController::revisionOverview() */ function node_revision_overview($node) { drupal_set_title(t('Revisions for %title', array('%title' => $node->label())), PASS_THROUGH); diff --git a/core/modules/path/lib/Drupal/path/Controller/PathController.php b/core/modules/path/lib/Drupal/path/Controller/PathController.php index bc984f5d..a8fae4a 100644 --- a/core/modules/path/lib/Drupal/path/Controller/PathController.php +++ b/core/modules/path/lib/Drupal/path/Controller/PathController.php @@ -13,7 +13,7 @@ class PathController { /** - * @see path_admin_overview() + * @todo Remove path_admin_overview(). */ public function adminOverview($keys = NULL) { module_load_include('admin.inc', 'path'); @@ -21,7 +21,7 @@ public function adminOverview($keys = NULL) { } /** - * @see path_admin_edit() + * @todo Remove path_admin_edit(). */ public function adminEdit($path) { $path = path_load($path); @@ -30,7 +30,7 @@ public function adminEdit($path) { } /** - * @see path_admin_edit() + * @todo Remove path_admin_edit(). */ public function adminAdd() { module_load_include('admin.inc', 'path'); diff --git a/core/modules/path/path.admin.inc b/core/modules/path/path.admin.inc index 200dbed..4c5b3f4 100644 --- a/core/modules/path/path.admin.inc +++ b/core/modules/path/path.admin.inc @@ -12,6 +12,8 @@ * * When filter key passed, perform a standard search on the given key, * and return the list of matching URL aliases. + * + * @deprecated Use \Drupal\path\Controller\PathController::adminOverview() */ function path_admin_overview($keys = NULL) { // Add the filter form above the overview table. @@ -105,6 +107,9 @@ function path_admin_overview($keys = NULL) { * A form for adding or editing a URL alias. * * @see path_menu() + * + * @deprecated Use \Drupal\path\Controller\PathController::adminEdit() or + * \Drupal\path\Controller\PathController::adminEdit() */ function path_admin_edit($path = array()) { if ($path) { diff --git a/core/modules/search/lib/Drupal/search/Controller/SearchController.php b/core/modules/search/lib/Drupal/search/Controller/SearchController.php index 20658a1..88cb96b 100644 --- a/core/modules/search/lib/Drupal/search/Controller/SearchController.php +++ b/core/modules/search/lib/Drupal/search/Controller/SearchController.php @@ -13,7 +13,7 @@ class SearchController { /** - * @see search_view() + * @todo Remove search_view(). */ public function searchView($plugin_id) { module_load_include('pages.inc', 'search'); @@ -21,7 +21,7 @@ public function searchView($plugin_id) { } /** - * @see search_view() + * @todo Remove search_view(). */ public function searchViewPlugin($plugin_id, $keys) { module_load_include('pages.inc', 'search'); diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc index b9e06ab..32ad921 100644 --- a/core/modules/search/search.pages.inc +++ b/core/modules/search/search.pages.inc @@ -15,6 +15,9 @@ * Search plugin_id to use for the search. * @param $keys * Keywords to use for the search. + * + * @deprecated Use \Drupal\search\Controller\SearchController::searchView() or + * \Drupal\search\Controller\SearchController::searchView() */ function search_view($plugin_id = NULL, $keys = '') { $info = FALSE; diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemController.php b/core/modules/system/lib/Drupal/system/Controller/SystemController.php index c759bbc..eaaa8a0 100644 --- a/core/modules/system/lib/Drupal/system/Controller/SystemController.php +++ b/core/modules/system/lib/Drupal/system/Controller/SystemController.php @@ -146,7 +146,7 @@ public function systemAdminMenuBlockPage() { } /** - * @see system_themes_page() + * @todo Remove system_themes_page(). */ public function themesPage() { module_load_include('admin.inc', 'system'); @@ -154,7 +154,7 @@ public function themesPage() { } /** - * @see system_theme_default() + * @todo Remove system_theme_default(). */ public function themeSetDefault() { module_load_include('admin.inc', 'system'); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 866b553..cab80f7 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -12,6 +12,8 @@ /** * Menu callback; displays a listing of all themes. + * + * @deprecated Use \Drupal\system\Controller\SystemController::themesPage() */ function system_themes_page() { // Get current list of themes. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php index 79c17c3..eb57cc5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Controller/TaxonomyController.php @@ -35,7 +35,7 @@ public function addForm(VocabularyInterface $taxonomy_vocabulary) { } /** - * @see taxonomy_term_page() + * @todo Remove taxonomy_term_page(). */ public function termPage(TermInterface $taxonomy_term) { module_load_include('pages.inc', 'taxonomy'); @@ -43,7 +43,7 @@ public function termPage(TermInterface $taxonomy_term) { } /** - * @see taxonomy_term_feed() + * @todo Remove taxonomy_term_feed(). */ public function termFeed(TermInterface $taxonomy_term) { module_load_include('pages.inc', 'taxonomy'); diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc index a2fc467..956bc71 100644 --- a/core/modules/taxonomy/taxonomy.pages.inc +++ b/core/modules/taxonomy/taxonomy.pages.inc @@ -12,6 +12,8 @@ * * @param Drupal\taxonomy\Entity\Term $term * The taxonomy term entity. + * + * @deprecated Use \Drupal\taxonomy\Controller\TaxonomyController::termPage() */ function taxonomy_term_page(Term $term) { // Assign the term name as the page title. @@ -65,6 +67,8 @@ function taxonomy_term_page(Term $term) { * * @param Drupal\taxonomy\Entity\Term $term * The taxonomy term entity. + * + * @deprecated Use \Drupal\taxonomy\Controller\TaxonomyController::termFeed() */ function taxonomy_term_feed(Term $term) { $channel['link'] = url('taxonomy/term/' . $term->id(), array('absolute' => TRUE)); diff --git a/core/modules/update/lib/Drupal/update/Controller/UpdateController.php b/core/modules/update/lib/Drupal/update/Controller/UpdateController.php index f1a8b83..6816466 100644 --- a/core/modules/update/lib/Drupal/update/Controller/UpdateController.php +++ b/core/modules/update/lib/Drupal/update/Controller/UpdateController.php @@ -63,7 +63,7 @@ public function updateStatus() { } /** - * @see update_manual_status() + * @todo Remove update_manual_status(). */ public function updateStatusManually() { module_load_include('fetch.inc', 'update'); diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc index 6cb7cb7..ac3c1b5 100644 --- a/core/modules/update/update.fetch.inc +++ b/core/modules/update/update.fetch.inc @@ -14,6 +14,8 @@ * Manually checks the update status without the use of cron. * * @see update_menu() + * + * @deprecated Use \Drupal\update\Controller\UpdateController::updateStatusManually() */ function update_manual_status() { _update_refresh(); diff --git a/core/modules/user/lib/Drupal/user/Controller/UserController.php b/core/modules/user/lib/Drupal/user/Controller/UserController.php index 5c454d9..2ddf843 100644 --- a/core/modules/user/lib/Drupal/user/Controller/UserController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserController.php @@ -57,7 +57,7 @@ public function logout(Request $request) { } /** - * @see user_cancel_confirm() + * @todo Remove user_cancel_confirm(). */ public function confirmCancel(UserInterface $user, $timestamp = 0, $hashed_pass = '') { module_load_include('pages.inc', 'user'); diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc index 6e4f999..6d59e6c 100644 --- a/core/modules/user/user.pages.inc +++ b/core/modules/user/user.pages.inc @@ -123,6 +123,8 @@ function template_preprocess_user(&$variables) { * * @see user_cancel_confirm_form() * @see user_cancel_url() + * + * @deprecated Use \Drupal\user\Controller\UserController::confirmCancel() */ function user_cancel_confirm($account, $timestamp = 0, $hashed_pass = '') { // Time out in seconds until cancel URL expires; 24 hours = 86400 seconds. diff --git a/core/modules/xmlrpc/lib/Drupal/xmlrpc/Controller/XmlrpcController.php b/core/modules/xmlrpc/lib/Drupal/xmlrpc/Controller/XmlrpcController.php index 19173bf..4abbf3d 100644 --- a/core/modules/xmlrpc/lib/Drupal/xmlrpc/Controller/XmlrpcController.php +++ b/core/modules/xmlrpc/lib/Drupal/xmlrpc/Controller/XmlrpcController.php @@ -13,7 +13,7 @@ class XmlrpcController { /** - * @see xmlrpc_server_page() + * @todo Remove xmlrpc_server_page(). */ public function php() { module_load_include('server.inc', 'xmlrpc'); diff --git a/core/modules/xmlrpc/xmlrpc.server.inc b/core/modules/xmlrpc/xmlrpc.server.inc index 8f171a5..1d210e5 100644 --- a/core/modules/xmlrpc/xmlrpc.server.inc +++ b/core/modules/xmlrpc/xmlrpc.server.inc @@ -13,6 +13,8 @@ * * @return \Symfony\Component\HttpFoundation\Response * A Response object. + * + * @deprecated Use \Drupal\xmlrpc\Controller\XmlrpcController::php() */ function xmlrpc_server_page() { module_load_include('inc', 'xmlrpc'); diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md b/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md index c15ab7d..f0c616d 100644 --- a/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md @@ -18,7 +18,7 @@ CHANGELOG ``` article_edit: - path: /article/{id} + pattern: /article/{id} requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml index 132efbf..4ada883 100644 --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml @@ -9,7 +9,7 @@ blog_show: compiler_class: RouteCompiler blog_show_legacy: - path: /blog/{slug} + pattern: /blog/{slug} defaults: { _controller: "MyBundle:Blog:show" } host: "{locale}.example.com" requirements: { '_method': 'GET|POST|put|OpTiOnS', _scheme: https, 'locale': '\w+' }