Use of drupal_render() is about to deprecate.
Direct call to drupal_render() should be replaced by the 'renderer' service.

urlInfo() is depreciated; hence toUrl() method should be used instead.

As per coding standard documentation at 'https://www.drupal.org/coding-standards/docs#file', @file tag docblock should not be there in the files that contain a namespaced class/interface/trait, whose file name is the class name with a .php extension.

CommentFileSizeAuthor
#3 module_builder-2743283-3.patch6.33 KBneerajsingh

Comments

neerajsingh created an issue. See original summary.

neerajsingh’s picture

Assigned: Unassigned » neerajsingh
Status: Active » Needs work
neerajsingh’s picture

StatusFileSize
new6.33 KB

Attaching the patch here..

neerajsingh’s picture

Assigned: neerajsingh » Unassigned
Status: Needs work » Needs review
joachim’s picture

Status: Needs review » Fixed
Issue tags: -deprecated, -Coding standards

Fixed the @file and the urlInfo().

The drupal_render() is part of test data for the tests, which actually haven't been updated for D8 yet (and might not be, since Drupal Coder Builder has PHPUnit tests.)

Thanks for the patch!

Though please note -- you should file one issue per thing you fix, not one issue that fixes multiple things. And don't use the tags field on issues for keywords.

  • joachim committed 9acbe8b on 8.x-3.x authored by neerajsingh
    Issue #2743283 by neerajsingh: Removed deprecated usage of Entity::...
  • joachim committed a5e04ac on 8.x-3.x authored by neerajsingh
    Issue #2743283 by neerajsingh: Removed deprecated usage of @file tag...
neerajsingh’s picture

Thanks joachim, for you advice, I will consider these guidance from my next contribution on wards.. :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.