/**
 * Class that manages enabled modules in a Drupal installation.
 */
class CachedModuleHandler extends ModuleHandler implements CachedModuleHandlerInterface {
/**
 * Class that manages enabled modules in a Drupal installation.
 */
class ModuleHandler implements ModuleHandlerInterface {

These two classes have identical descriptions. Presumably there is a reason for them being two separate classes, so that should be made clear in the docs.

Comments

jhodgdon’s picture

Plus, neither one of them follows our standards for first-line class docs (should start with verb).

ericmaster’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.08 KB

Here's a patch for this, please review to see if it needs further explanation

jhodgdon’s picture

Status: Needs review » Needs work

Great! The only problem is that the first-line description of a class is supposed to fit in an 80-character line. Maybe it can just say "... installation, using the bootstrap cache."?

Actually, is "bootstrap cache" the right term?

jguille’s picture

Status: Needs work » Needs review
StatusFileSize
new593 bytes

Here an incremental patch which solves the last problem.

Actually, is "bootstrap cache" the right term?

I think it is right term because it is used in the class:

/**
   * Cache backend for storing enabled modules.
   *
   * @var \Drupal\Core\Cache\CacheBackendInterface
   */
  protected $bootstrapCache;
jhodgdon’s picture

I see that $bootstrapCache is the name of the class variable, but I think maybe the comment should just say "using a cache", because this cache variable is passed into the constructor. The way these things work, I don't think it's going to be specifically the "bootstrap cache" that is passed in, but just generically the Drupal cache service. Right?

sun’s picture

I think this issue should be closed, because #2231419: Merge obsolete CachedModuleHandler into ModuleHandler

jhodgdon’s picture

Status: Needs review » Postponed
Related issues: +#2231419: Merge obsolete CachedModuleHandler into ModuleHandler

OK let's at least postpone this one until that other one is decided on.

mgifford’s picture

Status: Postponed » Needs review

Seems decided on.

jhodgdon’s picture

Status: Needs review » Closed (cannot reproduce)

Yes, but that issue made CachedModuleHandler go away, so this issue is no longer needed. There is only one class.