Releases: PhpGt/Installer
"Run" server on other ports and hostnames
The serve
command has always had the ability to bind to a custom port and hostname with the -p|--port
and -b|--bind
arguments, and with this minor release, these two arguments have now been exposed on the run
command.
To run your project on port 8765:
gt run -p 8765
Have fun!
Upgrade to PHP 7.4
PHP 7.4 brings extra functionality implemented in phpgt/daemon - improvements to the way sub processes are executed.
CPU efficiency
Running any long-running WebEngine commands is done within an infinite loop to allow the sub-processes to output their content to the terminal. This was a hog on the CPU, and required a microsleep between loop iterations. Simple fix with no backwards-breaking changes.
Removal of development dependencies
The installer package has been updated to only require stable-released dependencies, which means that when using the gt create
command, projects will have production stability by default.
Simplification and organisation of commands
The way that commands are loaded in Cli applications has been improved and the changes from PHP.Gt/Cli have been implemented here.
Abstract WebEngine commands have been introduced which allow the gt
commands to be called without any repetition of code.
New abstract Command class
To help with readability, all of the behaviours of a Command must now be defined in the return of new get* functions on the base Command class.
This avoids having to remember all of the possible options to perform in the constructor. New functions include:
- getName
- getDescription
- getRequiredNamedParameterList
- getOptionalNamedParameterList
- getOptionalParameterList
- getRequiredParameterList
Pass blueprint as argument
Even though there are only two blueprints so far, the functionality to create a project from a given blueprint has been added to this release.
Usage:
gt create project-name --blueprint blueprint-name
Autoloader improvements
To utilise this project as a standalone dependency, the script will be called as a dependency of the main Composer project on the development system. This release improves the loading of the Composer autoloader, allowing it to be used standalone or as a dependency.
First release
The PHP.Gt Installer is a script intended to be installed globally using composer global require phpgt/installer
. It makes the gt
command available to your command line, in order to perform simple tasks like creating a new PHP.Gt WebEngine application.
In the v1 release, there are only two pieces of functionality:
- To call
composer create-project
to create new WebEngine applications from Blueprints. - To pass through the
gt-*
commands available within WebEngine applications.
In total, the functionality at v1 is as follows:
$ gt
PHP.Gt Installer
Available commands:
• create Create a new WebEngine application
• serve Run a local HTTP server
• build Build the client-side files
• run Start a local server, cron and build runner
• help Display information about available commands