plan

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseExtensions

func ParseExtensions(raw string) (include, exclude []string, reset bool)

ParseExtensions parses shivammathur/setup-php@v2's extensions syntax. Recognized tokens:

  • bare name (e.g. "redis") → include
  • ":name" → exclude
  • "none" → reset both include and exclude to empty; subsequent tokens process normally

Both include and exclude are sorted, deduplicated, and lower-cased.

func ParsePHPVersionFile

func ParsePHPVersionFile(path string) (string, error)

Types

type CoverageDriver

type CoverageDriver string
const (
	CoverageNone   CoverageDriver = "none"
	CoverageXdebug CoverageDriver = "xdebug"
	CoveragePCOV   CoverageDriver = "pcov"
)

type IniValue

type IniValue struct {
	Key   string
	Value string
}

func ParseIniValues

func ParseIniValues(raw string) ([]IniValue, error)

type Plan

type Plan struct {
	PHPVersion        string
	Extensions        []string
	ExtensionsExclude []string
	ExtensionsReset   bool
	IniValues         []IniValue
	// ExtraIni is populated by ApplyCoverage; designed to be merged into conf.d overlay
	// after DefaultIniValues, before user IniValues (wired into compose in
	// Task 7–8 of the compat-closeout slice).
	ExtraIni     map[string]string
	Coverage     CoverageDriver
	Tools        []string
	ThreadSafety string
	OS           string
	Arch         string
	FailFast     bool
	Update       bool
	IniFile      string
	Debug        bool
	Verbose      bool
}

func FromEnv

func FromEnv() (*Plan, error)

func (*Plan) ApplyCoverage added in v1.1.0

func (p *Plan) ApplyCoverage()

ApplyCoverage applies v2's `coverage:` input side-effects (compat-matrix §5.6–5.8):

  • coverage: xdebug → add xdebug, exclude pcov
  • coverage: pcov → add pcov, exclude xdebug, set pcov.enabled=1 in ExtraIni
  • coverage: none → exclude both xdebug and pcov (no-op if neither was requested)

Exclusion is additive: a user's explicit `extensions: xdebug` followed by `coverage: pcov` will disable xdebug (matches v2, whose disable_extension runs last). Idempotent — calling twice is safe.

func (*Plan) Hash

func (p *Plan) Hash() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL