compose

package
v1.2.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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compose

func Compose(layout *Layout, extensions []ExtensionComposition) error

func SymlinkExtension

func SymlinkExtension(soPath, extensionDir, name string) error

func WriteDisableExtension added in v1.2.0

func WriteDisableExtension(confDir, extName string) error

WriteDisableExtension writes a conf.d fragment that documents and enforces non-loading of the named extension. The "00-" filename prefix makes it sort before extension-loading fragments (this codebase writes them as plain "<name>.ini"; see WriteIniFragment).

Because our composed PHP only loads what conf.d explicitly declares, the primary mechanism for disabling is simply the absence of the load directive; this file provides a durable audit trail and defence-in-depth.

func WriteIniFragment

func WriteIniFragment(confDir, extName string, lines []string) error

func WriteIniValuesWithDefaults added in v1.2.0

func WriteIniValuesWithDefaults(confDir string, defaults map[string]string, user []plan.IniValue) error

WriteIniValuesWithDefaults writes compat default ini values first, then user values on top — later writes win because PHP processes the file top-to-bottom. Default keys are written in deterministic (sorted) order. User values are written in their supplied order, matching how shivammathur/setup-php@v2 appends user-specified ini-values on top of the base ini.

If both maps are empty, no file is written and nil is returned.

Types

type ExtensionComposition

type ExtensionComposition struct {
	Name     string
	SOPath   string
	IniLines []string
}

type Layout

type Layout struct {
	RootDir      string
	BinDir       string
	ExtensionDir string
	ConfDir      string
	IncludeDir   string
}

Jump to

Keyboard shortcuts

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