Quo is still in beta and should not be used in production environments. But with the help of a config file (see CLI) you can easily disable Quo on production environments.
Quo is a free, open-source, client-side debugger and can be found here.
This specific package is a companion package for Quo for PHP.
Using a framework? No problem.
Quo is framework-agnostic and can run on any PHP (see requirements) project using composer.
You can help by contributing to the code or donating using the button below! Both are highly appreciated and contribute directly to keeping open-source free and sustainable!
Requirement | Version |
---|---|
PHP | ^7.1, ^8.1 |
ext-json | * |
ext-iconv | * |
ext-curl | * |
composer require protoqol/quo-php
Quo has a function called quo()
which you can call anywhere, every variable passed to it will appear in your Quo
Client.
quo($var, ...$moreVars);
Note that for the beta version of Quo a custom hostname and port can not be used yet, this will always default to 127.0.0.1:7312. However, when your PHP application does not run on the top level of your OS it might be required to change the hostname and port. The config hostname should always point to your top level localhost address.
Quo for PHP has an .ini file located at meta/quo-config.ini. This file stores the configuration Quo uses. It is recommended to use a custom configuration for this, more about this in the CLI section (see "Publish Quo config").
[general]
# Should Quo be enabled in this environment
ENABLED = 1
[exception]
# Should Quo throw an exception when no connection is made to the client?
# If you're trying to get Quo to work this might come in useful, if not, keep it off.
NO_CONNECTION = 0
[http]
# Where Quo sends its payload to
HOSTNAME = 127.0.0.1
PORT = 7312
[encryption]
# Encrypt all data sent?
ENABLED = 0
# If ENABLED = 1 you should supply the public key retrieved from the Quo client here.
PUBLIC_KEY = <key>
You can edit the configuration via the CLI with the following commands.
php ./vendor/bin/quo [hostname] [port]
Publish Quo config (quo-config.ini) to your project root directory, this overwrites the internal configuration.
php ./vendor/bin/quo publish-config
php ./vendor/bin/quo -vb (or --virtualbox) # Changes it to `10.0.2.2:7312`
php ./vendor/bin/quo -d (or --docker) # Changes it to `host.docker.internal:7312`
php ./vendor/bin/quo -l (or --local) # Changes it to `127.0.0.1:7312`
And you're all set!
Issues, bugs and feature requests can be reported here!
See Contributing to see how you can contribute to Quo for PHP!
Quo for PHP is licensed under the MIT License. Please see License File for more information.