Drupal\Component\Utility\Random already contains all the necessary methods to generate random data and most of the random data generated by devel_generate already uses Random (see DevelGenerateBase::populateFields(), ::generateSampleItems() and ::generateSampleValue()). For consistency and ease of maintenance we should use the methods of this class and remove ::createPara, ::createContent, ::createGreeking, ::generateWord in DevelGenerateBase.

CommentFileSizeAuthor
#1 devel-generate-random-2469319-1.patch12.14 KBwillzyx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willzyx’s picture

Title: Remove DevelGenerateBase ::createPara,::createContent,::createGreeking,::generateWord in favour of Drupal\Component\Utility\Random » Remove DevelGenerateBase ::createPara, ::createContent, ::createGreeking, ::generateWord in favour of Drupal\Component\Utility\Random
FileSize
12.14 KB
willzyx’s picture

Status: Active » Needs review
willzyx’s picture

Assigned: Unassigned » moshe weitzman

assigned to moshe to hear what he thinks about it

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Looks great. Love removing code.

  • willzyx committed fdfb592 on 8.x-1.x
    Issue #2469319 by willzyx: Remove DevelGenerateBase ::createPara, ::...
willzyx’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x

Status: Fixed » Closed (fixed)

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