catalog

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABIMatrix

type ABIMatrix struct {
	PHP  []string `yaml:"php,omitempty"`
	OS   []string `yaml:"os"`
	Arch []string `yaml:"arch"`
	TS   []string `yaml:"ts"`
}

type BuildTarget added in v1.2.0

type BuildTarget struct {
	Version string
	Spec    *PHPVersionSpec
}

BuildTarget pairs a PHP version with its version-specific spec. Only versions with Sources set produce BuildTargets.

type Catalog

type Catalog struct {
	PHP        *PHPSpec
	Extensions map[string]*ExtensionSpec
}

func LoadCatalog

func LoadCatalog(dir string) (*Catalog, error)

func (*Catalog) IsBundled

func (c *Catalog) IsBundled(phpVersion, extName string) bool

IsBundled reports whether extName is bundled with the given PHP version in this catalog. Returns false if the version is unknown or the catalog has no entry for it. Matching is exact against the per-version bundled_extensions list — callers should pass the normalized (lowercase) identifier.

func (*Catalog) RequiresSeparateBundle

func (c *Catalog) RequiresSeparateBundle(extName string) bool

type ConfigureFlags

type ConfigureFlags struct {
	Common string `yaml:"common"`
	Linux  string `yaml:"linux,omitempty"`
	MacOS  string `yaml:"macos,omitempty"`
}

type ExcludeRule

type ExcludeRule struct {
	OS   string `yaml:"os,omitempty"`
	Arch string `yaml:"arch,omitempty"`
	PHP  string `yaml:"php,omitempty"`
}

type ExtensionKind

type ExtensionKind string
const (
	ExtensionKindPECL    ExtensionKind = "pecl"
	ExtensionKindBundled ExtensionKind = "bundled"
	ExtensionKindGit     ExtensionKind = "git"
)

type ExtensionSource

type ExtensionSource struct {
	PECLPackage string `yaml:"pecl_package,omitempty"`
	GitURL      string `yaml:"git_url,omitempty"`
}

type ExtensionSpec

type ExtensionSpec struct {
	Name        string              `yaml:"name"`
	Kind        ExtensionKind       `yaml:"kind"`
	Note        string              `yaml:"note,omitempty"`
	Source      ExtensionSource     `yaml:"source,omitempty"`
	Versions    []string            `yaml:"versions,omitempty"`
	ABIMatrix   ABIMatrix           `yaml:"abi_matrix,omitempty"`
	Exclude     []ExcludeRule       `yaml:"exclude,omitempty"`
	RuntimeDeps map[string][]string `yaml:"runtime_deps,omitempty"`
	Ini         []string            `yaml:"ini,omitempty"`
	Smoke       []string            `yaml:"smoke,omitempty"`
}

func LoadExtensionSpec

func LoadExtensionSpec(path string) (*ExtensionSpec, error)

func (*ExtensionSpec) Validate

func (s *ExtensionSpec) Validate() error

type PHPSource

type PHPSource struct {
	URL string `yaml:"url"`
	Sig string `yaml:"sig"`
}

type PHPSpec

type PHPSpec struct {
	Name     string                     `yaml:"name"`
	Versions map[string]*PHPVersionSpec `yaml:"versions"`
	Smoke    []string                   `yaml:"smoke,omitempty"`
}

PHPSpec describes the PHP catalog entry. It holds per-version metadata under Versions; only versions with Sources set are built by the pipeline, the rest encode compat intent (e.g. bundled extension lists) used for cross-validation against internal/compat.

func LoadPHPSpec

func LoadPHPSpec(path string) (*PHPSpec, error)

func (*PHPSpec) BuildTargets added in v1.2.0

func (s *PHPSpec) BuildTargets() []BuildTarget

BuildTargets returns the subset of Versions that have Sources set, sorted by version string for deterministic ordering. Callers iterating the build matrix should use this rather than Versions directly.

func (*PHPSpec) Validate

func (s *PHPSpec) Validate() error

type PHPVersionSpec added in v1.2.0

type PHPVersionSpec struct {
	BundledExtensions []string       `yaml:"bundled_extensions"`
	Sources           *PHPSource     `yaml:"sources,omitempty"`
	ABIMatrix         ABIMatrix      `yaml:"abi_matrix,omitempty"`
	ConfigureFlags    ConfigureFlags `yaml:"configure_flags,omitempty"`
	Smoke             []string       `yaml:"smoke,omitempty"`
}

PHPVersionSpec is the per-version subtree of PHPSpec. Sources, ABIMatrix, and ConfigureFlags are only required for versions that should actually be built by the pipeline; compat-only versions may omit them.

Jump to

Keyboard shortcuts

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