composer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Dependency         = "composer"
	PackagesDependency = "php-composer-packages"
	CacheDependency    = "php-composer-cache"
	ComposerLock       = "composer.lock"
	ComposerJSON       = "composer.json"
	ComposerPHAR       = "composer.phar"
	GithubOAUTHKey     = "github-oauth.github.com"
)

Variables

This section is empty.

Functions

func FindComposer

func FindComposer(appRoot string, composerJSONPath string) (string, error)

FindComposer locates the composer JSON and composer lock files

func WarnComposerBuildpackYAML added in v0.3.0

func WarnComposerBuildpackYAML(logger logger.Logger, version, appRoot string) error

Types

type BuildpackYAML

type BuildpackYAML struct {
	Composer ComposerConfig `yaml:"composer"`
}

func LoadComposerBuildpackYAML

func LoadComposerBuildpackYAML(appRoot string) (BuildpackYAML, error)

LoadComposerBuildpackYAML loads the buildpack YAML from disk

type Composer

type Composer struct {
	Logger logger.Logger
	Runner runner.Runner
	// contains filtered or unexported fields
}

Composer runner

func NewComposer

func NewComposer(composerJsonPath, composerPharPath string, logger logger.Logger) Composer

NewComposer creates a new Composer runner

func (Composer) CheckPlatformReqs

func (c Composer) CheckPlatformReqs() ([]string, error)

CheckPlatformReqs looks for required extension

func (Composer) Config

func (c Composer) Config(key, value string, global bool) error

Config runs `composer config`

func (Composer) Global

func (c Composer) Global(args ...string) error

Global runs `composer global`

func (Composer) Install

func (c Composer) Install(args ...string) error

Install runs `composer install`

func (Composer) Version

func (c Composer) Version() error

Version runs `composer version`

type ComposerConfig

type ComposerConfig struct {
	Version         string   `yaml:"version"`
	InstallOptions  []string `yaml:"install_options"`
	VendorDirectory string   `yaml:"vendor_directory"`
	JsonPath        string   `yaml:"json_path"`
	InstallGlobal   []string `yaml:"install_global"`
}

type Contributor

type Contributor struct {
	ComposerLayer layers.DependencyLayer
	PhpLayer      layers.Layer
	// contains filtered or unexported fields
}

func NewContributor

func NewContributor(builder build.Build) (Contributor, bool, error)

func (Contributor) Contribute

func (n Contributor) Contribute() error

Jump to

Keyboard shortcuts

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