Help us shape the future of Go! Take the 2026 Go Developer Survey

supply

package
v0.0.0-...-3d357ff Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(s *Supplier) error

Run executes the PHP buildpack supply phase

Types

type Command

type Command interface {
	Execute(dir string, stdout io.Writer, stderr io.Writer, program string, args ...string) error
	Output(dir string, program string, args ...string) (string, error)
}

Command interface abstracts command execution

type Installer

type Installer interface {
	InstallDependency(dep libbuildpack.Dependency, outputDir string) error
	InstallOnlyVersion(depName, installDir string) error
}

Installer interface abstracts dependency installation

type Manifest

type Manifest interface {
	AllDependencyVersions(depName string) []string
	DefaultVersion(depName string) (libbuildpack.Dependency, error)
	GetEntry(dep libbuildpack.Dependency) (*libbuildpack.ManifestEntry, error)
	IsCached() bool
}

Manifest interface abstracts buildpack manifest operations

type Stager

type Stager interface {
	BuildDir() string
	CacheDir() string
	DepDir() string
	DepsIdx() string
	LinkDirectoryInDepDir(destDir, destSubDir string) error
	WriteEnvFile(envVar, envVal string) error
	WriteProfileD(scriptName, scriptContents string) error
}

Stager interface abstracts buildpack staging operations

type Supplier

type Supplier struct {
	Manifest  Manifest
	Installer Installer
	Stager    Stager
	Command   Command
	Log       *libbuildpack.Logger
	Logfile   *os.File
	Registry  *extensions.Registry
	Options   *options.Options
	Context   *extensions.Context // Extension context with PHP version and extensions
}

Supplier contains the buildpack supply phase logic

func (*Supplier) CreateDefaultEnv

func (s *Supplier) CreateDefaultEnv() error

CreateDefaultEnv sets up default environment variables

func (*Supplier) InstallPHP

func (s *Supplier) InstallPHP() error

InstallPHP installs the PHP runtime

func (*Supplier) InstallWebServer

func (s *Supplier) InstallWebServer() error

InstallWebServer installs the web server (httpd, nginx, or none) based on configuration

func (*Supplier) ProcessPhpFpmConfForTesting

func (s *Supplier) ProcessPhpFpmConfForTesting(phpFpmConfPath, phpEtcDir string) error

ProcessPhpFpmConfForTesting exposes processPhpFpmConf for testing purposes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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