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

finalize

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(f *Finalizer) error

Run executes the PHP buildpack finalize phase

Types

type Command

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

Command interface abstracts command execution

type Finalizer

type Finalizer struct {
	Manifest Manifest
	Stager   Stager
	Command  Command
	Log      *libbuildpack.Logger
	Logfile  *os.File
	Registry *extensions.Registry
}

Finalizer contains the buildpack finalize phase logic

func (*Finalizer) CreatePHPEnvironmentScript

func (f *Finalizer) CreatePHPEnvironmentScript() error

CreatePHPEnvironmentScript creates a .profile.d script to set up PHP environment

func (*Finalizer) CreatePHPRuntimeDirectories

func (f *Finalizer) CreatePHPRuntimeDirectories() error

CreatePHPRuntimeDirectories creates directories needed by PHP-FPM at runtime

func (*Finalizer) CreatePreprocessScript

func (f *Finalizer) CreatePreprocessScript(opts *options.Options) error

CreatePreprocessScript creates a .profile.d script to run ADDITIONAL_PREPROCESS_CMDS This matches v4.x behavior where preprocess commands run via .profile.d with $HOME=/home/vcap (not /home/vcap/app as in the start script)

SECURITY NOTE: ADDITIONAL_PREPROCESS_CMDS executes arbitrary shell commands provided by the application. This is intentional for v4.x compatibility (e.g., running database migrations, sourcing bootstrap scripts).

func (*Finalizer) CreateStartScript

func (f *Finalizer) CreateStartScript() error

CreateStartScript creates the start script for the application

func (*Finalizer) ProcessConfigs

func (f *Finalizer) ProcessConfigs(opts *options.Options) error

ProcessConfigs replaces build-time placeholders in all config files

func (*Finalizer) SetupProcessTypes

func (f *Finalizer) SetupProcessTypes() error

SetupProcessTypes creates the process types for the application

type Manifest

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

Manifest interface abstracts buildpack manifest operations

type Stager

type Stager interface {
	BuildDir() string
	DepDir() string
	DepsIdx() string
	WriteProfileD(scriptName, scriptContents string) error
	SetLaunchEnvironment() error
}

Stager interface abstracts buildpack staging operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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