Documentation ¶
Overview ¶
Package php is the planner for PHP projects.
Index ¶
- Constants
- func DetermineApplication(source afero.Fs) (types.PHPApplication, types.PHPProperty)
- func DetermineAptDependencies(source afero.Fs, server string) []string
- func DeterminePHPExtensions(source afero.Fs) []string
- func DetermineProjectFramework(source afero.Fs) types.PHPFramework
- func GenerateDockerfile(meta types.PlanMeta) (string, error)
- func GetPHPVersion(source afero.Fs) string
- func NewIdentifier() plan.Identifier
- func NewPacker() packer.Packer
- func PropertyFromString(s string) types.PHPProperty
- func PropertyToString(p types.PHPProperty) string
- func RetrieveNginxConf(app string) (string, error)
Constants ¶
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.
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 ¶
DetermineAptDependencies determines the required apt dependencies of the project.
We install Nginx server unless server is "swoole".
func DeterminePHPExtensions ¶
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 ¶
GenerateDockerfile generates the Dockerfile for PHP projects.
func GetPHPVersion ¶
GetPHPVersion gets the php version of the project.
func NewIdentifier ¶
func NewIdentifier() plan.Identifier
NewIdentifier returns a new PHP identifier.
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 ¶
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.