Temma command
1Presentation
This command manages the Temma framework installation itself. It offers three actions: display version information, update the framework source code, and launch a standalone development web server.
The Temma object name is automatically searched in the \Temma\Cli namespace: the commands below are equivalent to bin/comma '\Temma\Cli\Temma' ...
2Version information
Displays the version of the installed Temma framework (and the version of Smarty, if it is available):
3Update
Updates the framework source code in the current project:
This action is intended for projects which do not use Composer. Its parameters (--version to choose the desired version, --force to overwrite modified files) are detailed in the framework update documentation.
4Development server
Launches a standalone development web server, based on the PHP built-in web server:
Temma development server
URL: http://myproject.localhost:8000/ (environment 'dev')
Development server, do not use in production. Press Ctrl+C to stop.
The server listens on the local host (port 8000 by default) and serves the project like the usual Apache/Nginx configuration would: files that exist under the www/ directory are served as-is, any other request is routed to the www/index.php front controller.
The displayed host name is built from the name of the project's root directory, truncated at the last dot (a project stored in www.mysite.com/ is served as http://www.mysite.localhost:8000/). Every *.localhost name resolves to the local host, and each project gets its own host name, hence its own cookies.
The listening port can be given as parameter. If the port is already in use, an error message is displayed:
The --env parameter defines the platform name, exported in the ENVIRONMENT variable (dev by default), which is used to load the platform-specific configuration file (e.g. etc/temma.dev.php):
The server handles up to eight simultaneous requests (using the PHP_CLI_SERVER_WORKERS mechanism), enough for a page and its assets. Each request is displayed on the standard output. The server is stopped with Ctrl+C.
This server is meant for development only. It doesn't handle TLS and is not designed to face any load. In production (or to expose a project on the local network), use a real web server such as Apache, Nginx or FrankenPHP (see the installation documentation).