php

package
v0.0.0-...-d97b457 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package php is the planner for PHP projects.

Index

Constants

View Source
const ConfigLaravelOctaneServer = "laravel.octane.server"

ConfigLaravelOctaneServer defines what server we should use to run Laravel Octane.

When this config is set, we will use the corresponding server to run the project instead of the original Nginx + PHP-FPM stack.

View Source
const DefaultPHPVersion = "8"

DefaultPHPVersion is the default PHP version.

Variables

This section is empty.

Functions

func DetermineApplication

func DetermineApplication(source afero.Fs) (types.PHPApplication, types.PHPProperty)

DetermineApplication determines what application the project is using. Therefore, we can apply some custom fixes such as the nginx configuration.

func DetermineAptDependencies

func DetermineAptDependencies(source afero.Fs, server string) []string

DetermineAptDependencies determines the required apt dependencies of the project.

We install Nginx server unless server is "swoole".

func DeterminePHPExtensions

func DeterminePHPExtensions(source afero.Fs) []string

DeterminePHPExtensions determines the required PHP extensions from composer.json of the project.

func DetermineProjectFramework

func DetermineProjectFramework(source afero.Fs) types.PHPFramework

DetermineProjectFramework determines the framework of the project.

func GenerateDockerfile

func GenerateDockerfile(meta types.PlanMeta) (string, error)

GenerateDockerfile generates the Dockerfile for PHP projects.

func GetPHPVersion

func GetPHPVersion(source afero.Fs) string

GetPHPVersion gets the php version of the project.

func NewIdentifier

func NewIdentifier() plan.Identifier

NewIdentifier returns a new PHP identifier.

func NewPacker

func NewPacker() packer.Packer

NewPacker returns a new PHP packer.

func PropertyFromString

func PropertyFromString(s string) types.PHPProperty

PropertyFromString deserializes a property. It must be the serialized result from PropertyToString.

func PropertyToString

func PropertyToString(p types.PHPProperty) string

PropertyToString serializes a PHPProperty.

func RetrieveNginxConf

func RetrieveNginxConf(app string) (string, error)

RetrieveNginxConf retrieves the nginx conf for the given app.

The app should be an instance of types.PHPApplication; otherwise, an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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