interface AvailableVersionParserInterface (View source)

Interface for parsing available version information from PhpDoc and attributes.

Implementations should merge version data from both PhpDoc tags (@since/@removed) and attributes (PhpStormStubsElementAvailable), applying consistent precedence rules.

Methods

array
parseAvailableVersion(ParsedPhpDoc $phpDoc, array $attributes, array $imports = [])

Parse available version information from PhpDoc and attributes.

Details

array parseAvailableVersion(ParsedPhpDoc $phpDoc, array $attributes, array $imports = [])

Parse available version information from PhpDoc and attributes.

Precedence: Attributes (PhpStormStubsElementAvailable) override PhpDoc tags.

Parameters

ParsedPhpDoc $phpDoc

Already-parsed PhpDoc data containing @since/@removed

array $attributes

Array of AttributeNode objects to check for PhpStormStubsElementAvailable

array $imports

Map of import aliases to fully qualified names for resolving attribute names

Return Value

array

Array with keys 'sinceVersion' and 'removedVersion', values are ?string