Download the PHP package debughub/php-client without Composer

On this page you can find all versions of the php package debughub/php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-client

DebugHub.com PHP client

Debughub helps your development process by logging all requests to your application and showing them in debughub.com application. It helps you find issues in your code faster and find performance issues while still in developemnt.

Installation:

This package is for plain PHP. For Laravel installation go to debughubs laravel repo

  1. add the package to composer.json in require section "debughub/php-client": "0.1.*"

  2. create new config file in config dir with content:

  3. Somewhere in your code init the debughub client: $debughub = new \Debughub\Clients\Php\Debughub('path/to/config'); Be sure to import the composer's autoload as well. From now on debughub client will send request and response info to debughub.com

Available extra methods

You can use these methods to add extra information about your application. You can log queries and logs using debughub. All your request and response information will be sent automatically.

DB Queries

To log query use the $debughub->query(string $query, array $data, string $duration, string $connection) method. For example if you use a class for all your Database querying, you can simply add this method to the method, that calls the query. Or you can just add it after the query you want to log.

$query - query to execute. You can add a ? instead of any query params, you want to replace in the query. For example SELECT * FROM Users where id = ?; and send the user's ID in data variable.

$data - array of data, that should replace the ? in your code. This will not be send if you disable send_query_data in the config.

$duration - seconds it took to execute the query.

$connection - name of the DB connection. Usefull if your application uses multiple connections

Example:

Or you can have debughub calculate the duration as well like this:

Logging

To add a simple log use $debughub->log(string $data, string $type) method Logs work just like queries. You can use log() method to log just one action for example.

$data - data to log. It can be any data type, arrays and objects will be serialized.

$type ('info' by default) - Name of the log. This will change the way log shows up in the debughub.com application. It should be info, error or warning.

By default the log does not have a duration and in debughub's timeline will show up just as a small line. If you want to measure duration of something, for example API call to external API, you can use:

Routes

If you want to add route to your log, you can do it using $debughub->route(string $route) method. For example:


All versions of php-client with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package debughub/php-client contains the following files

Loading the files please wait ....