Download the PHP package loilo/contao-exec-bundle without Composer
On this page you can find all versions of the php package loilo/contao-exec-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loilo/contao-exec-bundle
More information about loilo/contao-exec-bundle
Files in loilo/contao-exec-bundle
Package contao-exec-bundle
Short Description Execute Contao-related PHP code directly from the console
License MIT
Informations about the package contao-exec-bundle
Contao Exec
This package allows to execute PHP code in the context of a Contao application, directly from the command line.
It provides two ways to do so:
-
A PsySH-based REPL for tinkering around or getting some quick insight into the state of your Contao project.
- An
eval
command to get results of a program in a certain data exchange format — useful for getting access to data from outside of Contao.
Installation
Usage
REPL
You can open up the REPL with the debug:repl
command:
This will throw you into a nice REPL with the Contao framework loaded, all models, DCAs etc. available.
Also, the db()
helper will be loaded into the namespace automatically if you have it installed, so you can do some quick fiddling right away:
As usual, all options are available via
Eval
The contao:eval
command takes some PHP code, passes it to the REPL and outputs the result.
If you're using the terminal manually, you probably want to use debug:repl
instead. However, contao:eval
can be a great tool to access Contao data from other processes (e.g. Node.js) etc.
Therefore, it does not only have the default dump
output formatting for human-readable data but also some others, including json
:
Again, use vendor/bin/contao-console help contao:eval
to see what's possible with different options.
All versions of contao-exec-bundle with dependencies
psy/psysh Version 0.7.*|0.8.*|0.9.*|0.10.*
contao/core-bundle Version ^4.3
loilo/lowlight Version ^2.0