Documentation ¶
Index ¶
- Variables
- func BreaksVersions(message tide.PhpcsFilesMessage) []string
- func ExcludeVersions(versions, exclude []string) []string
- func GetVersionParts(version, lowIn string) (low, high, majorMinor, reported string)
- func MergeVersions(n ...[]string) []string
- func NonBreakingVersions(message tide.PhpcsFilesMessage) []string
- func PhpMajorVersions() []string
- func PreviousVersion(version string) string
- func VersionParts(version string) (int, int, int)
- type Compatibility
- type CompatibilityRange
Constants ¶
This section is empty.
Variables ¶
var (
// PhpLatest represents the latest version of PHP.
PhpLatest = "7.3.8"
)
Functions ¶
func BreaksVersions ¶
func BreaksVersions(message tide.PhpcsFilesMessage) []string
BreaksVersions takes a PHPCompatibility sniff code and returns the versions that break for that code.
func ExcludeVersions ¶
ExcludeVersions removes the excluded versions from the given versions.
func GetVersionParts ¶
GetVersionParts returns a version range (low and high) as well as the majorMinor for the given version and the given version as `reported`.
func MergeVersions ¶
MergeVersions takes slices of versions and returns a slice with unique values.
func NonBreakingVersions ¶
func NonBreakingVersions(message tide.PhpcsFilesMessage) []string
NonBreakingVersions takes a PHPCompatibility sniff code and returns the versions that are warnings.
func PhpMajorVersions ¶
func PhpMajorVersions() []string
PhpMajorVersions returns only the major.minor parts from the `versions` variable as slice of strings.
func PreviousVersion ¶
PreviousVersion returns the immediate previous version given a version.
Types ¶
type Compatibility ¶
type Compatibility struct { Source string `json:"source"` Breaks *CompatibilityRange `json:"breaks,omitempty"` Warns *CompatibilityRange `json:"warns,omitempty"` }
Compatibility describes a compatibility report with breaking and warning ranges.
func Parse ¶
func Parse(e tide.PhpcsFilesMessage) (Compatibility, error)
Parse takes a tide.PhpcsFilesMessage message and returns a Compatibility struct. It parses using the above verbs.