Quantcast
Viewing all articles
Browse latest Browse all 297375

Replace all calls to the deprecated Drupal::url() function in Core

Problem/Motivation

hook_help API example contains a deprecated call to Drupal::url() (ref: #2730625: hook_help API example contains a deprecated call to Drupal::url()

Proposed resolution

create a single patch targeting the 'big-picture' quoted here (from ref above) ...

In terms of "Getting the big picture" we are only talking about a couple lines of code and 164 calls to Drupal::url() per the api.

Remaining tasks

wrt a patch --> plan it, write it, test it, run it

User interface changes

To be determined (TBD)

API changes

As per the "Deprecated" notice on public static function Drupal::url

Drupal::url(...) is deprecated and we should us Url::fromRoute(...)->toString() instead.

this means ...

array(':blocks' => \Drupal::url('block.admin_display'))

should look like this

array(':blocks' => Url::fromRoute('block.admin_display)->toString()))

Data model changes

(TBD)

Original report by [username]

Origins of the issue can be found in #2730625: hook_help API example contains a deprecated call to Drupal::url() and @tduong, commenting on patch by @ifrik #2702561-22: Provide a hook_help text.


Viewing all articles
Browse latest Browse all 297375

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>