\Drupflare\Anachron\Drupal\Extension LegacyInfoParser

Lets an extension that declares an older core run, when the site opts in.

Core marks an extension core_incompatible when its core_version_requirement excludes the running release, and refuses to enable it. With the switch on, the flag is cleared and the declared requirement is kept in anachron_core_requirement, so a report can say how many extensions ran past what they declared. Passing the check says nothing about whether the code works; that is what running it finds out.

Summary

Methods
Properties
Constants
parse
No public properties found
SWITCH
No protected methods found
No protected properties found
No protected constants found
enabled
parseWithRequirement
No private properties found
MISSING

Constant

SWITCH

SWITCH = 'anachron_ignore_core_requirement'

MISSING

MISSING = "'core_version_requirement' key must be present"

Methods

parse()

parse(string  $filename) : array<string,mixed>

Parses an info file, clearing the core incompatibility flag when the site opts in.

Parameters

string $filename

The path to the info file.

Returns

array —

The parsed info.

enabled()

enabled() : bool

Tells whether the site turned the version switch on.

Returns

bool —

parseWithRequirement()

parseWithRequirement(string  $filename) : array<string,mixed>

Parses an info file that lacks a core version requirement.

Parameters

string $filename

The path to the info file.

Returns

array —

The parsed info, read from a copy that declares any core version.