Replace deprecated usage of url() with Url::fromRoute

reference: https://www.drupal.org/node/2346779

Comments

xaiwant created an issue. See original summary.

xaiwant’s picture

Assigned: xaiwant » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.05 KB

replaced deprecated url and applied latest patch

saurabh.tripathi.cs’s picture

Hi we are currently busy with other projects we will review this soon.
Thanks for the patch.

saurabh.tripathi.cs’s picture

Status: Needs review » Needs work
StatusFileSize
new24.7 KB

@xaiwant ,
after applying this patch the url pointing to module UI stops working.Please check the snapshot.
Thanks.

nikhilesh gupta’s picture

StatusFileSize
new3.07 KB

@saurabh.tripathi.cs

Try this patch

nikhilesh gupta’s picture

Status: Needs work » Needs review
heykarthikwithu’s picture

@saurabh.tripathi.cs, #2 works fine.
Since Url::fromRoute('password_reset_tabs.provide_tabs')->toString() will return a GeneratedUrl/string which is similar in case of \Drupal::url('password_reset_tabs.provide_tabs')

And @Nikhilesh Gupta Url::fromRoute('password_reset_tabs.provide_tabs') is returning a Url object which is not a string.

nikhilesh gupta’s picture

With #2 links are not working it seems. I have seen one patch similar to this Deprecated Methods

saurabh.tripathi.cs’s picture

Status: Needs review » Needs work

Please Provide a valid patch in this as #2 is not working.

saurabh.tripathi.cs’s picture

Status: Needs work » Fixed
saurabh.tripathi.cs’s picture

Status: Fixed » Closed (fixed)