You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides standardized console commands for PHP applications.
Requirements
Git version >= 2.0
Bash 4.*
PHP >5.6|>7.0
Installation
Installation requires composer. As there are some dependency conflicts with the
latest drush release it is recommended to install the tool via consolidation/cgr.
To do so, just execute:
assets[0]->browser_download_url);
" > phapp
chmod +x phapp
# Optional: Ensure ~/bin exists and configure it to be available in $PATH.
[ -d ~/bin ] || mkdir ~/bin
echo $PATH | grep -q ~/bin || (echo "export PATH=~/bin:\$PATH" >> ~/.bashrc && export PATH=~/bin:$PATH)
# Make phapp executable from everywhere by moving to a destination available in $PATH.
# If you skipped the optional step above, be sure to move it to a suiting destination.
mv phapp ~/bin/phapp"># Download latest stable release. php -r " ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)'); readfile(json_decode(file_get_contents('https://api.github.com/repos/drunomics/phapp-cli/releases/latest'))->assets[0]->browser_download_url); " > phapp chmod +x phapp
# Optional: Ensure ~/bin exists and configure it to be available in $PATH. [ -d ~/bin ] || mkdir ~/bin echo $PATH | grep -q ~/bin || (echo "export PATH=~/bin:\$PATH" >> ~/.bashrc && export PATH=~/bin:$PATH)
# Make phapp executable from everywhere by moving to a destination available in $PATH. # If you skipped the optional step above, be sure to move it to a suiting destination. mv phapp ~/bin/phapp
Updating
Run
phapp self:update
Usage
Run phapp list to show a list of support commands and use phapp command --help
for more information about a command. The list of currently available commands
is:
build Builds the project with the current code checkout. clone Clones a Phapp project. create Creates a new project base on a given template. help Displays help for a command init Initializes the app. install Installs the application. list Lists commands setup Setups the phapp environment. status Checks for a working and installed application. update Updates the app. build build:branch Builds a given branch. build:clean Cleans all build related files. git git:pull Updates local branches by pull from remote repositories. git:setup-remotes Configures Git remote repositories. init init:manifest Initializes a new phapp.yml for your project. self self:update Updates the installed phar.
phapp.yml
An application provides basic metadata and customizes commands in its
phapp.yml, the phapp manifest. See examples/phapp.yml
for an example.
Phapp environment variables
Commands defined in phapp.yml may make use of the phapp environment
variables.
Dotenv support
Phapp environment variables are either set by the environment; i.e.
the host, or via a .env
file.
In order to help with initializing the environment based upon one or multiple
.env files the environment command may be used. This command is prepended the
other commands (except setup) such that they may rely on the initialized
environment.
Thus, the .env file can be written as part of the setup command and sourced
as part of the environment command.
Available variables
Available environment variables are / must be:
Variable
Description
Example value
PHAPP_ENV
The environment name. E.g., local, test or live
live
PHAPP_ENV_TYPE
The environment type; e.g. an id for the hosting environment or type of server.
acquia
PHAPP_ENV_MODE
The environment mode; valid values are: production, development