2017 © Pedro Peláez
 

library silex-service-provider

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

image

php-console/silex-service-provider

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

  • Thursday, February 27, 2014
  • by barbushin
  • Repository
  • 2 Watchers
  • 6 Stars
  • 7,344 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

PHP Console service provider

PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using Google Chrome extension PHP Console and PhpConsole server library., (*1)

This packages integrates PHP Console server library with Silex as configurable service provider., (*2)

Installation

  1. Install Google Chrome extension PHP Console.
  2. Add "php-console/silex-service-provider": "1.*" package in Silex project composer.json and run composer update.

Configuration

To handle errors occurred on Silex initialization PhpConsole service provider should be initialized right after Silex\Application:, (*3)

$app = new Silex\Application();

// All settings are optional, so you can remove any key in this array
$app['php-console.settings'] = array(
  'sourcesBasePath' => dirname(__DIR__),
  'serverEncoding' => null,
  'headersLimit' => null,
  'password' => null,
  'enableSslOnlyMode' => false,
  'ipMasks' => array(),
  'isEvalEnabled' => false,
  'dumperLevelLimit' => 5,
  'dumperItemsCountLimit' => 100,
  'dumperItemSizeLimit' => 5000,
  'dumperDumpSizeLimit' => 500000,
  'dumperDetectCallbacks' => true,
  'detectDumpTraceAndSource' => false,
);

$app->register(new PhpConsole\Silex\ServiceProvider($app,
new \PhpConsole\Storage\File(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'php-console.data') // any writable path
));

See PhpConsole\Silex\ServiceProvider for detailed settings description., (*4)

Usage

When PhpConsole service provider is registered all errors and exceptions will be handled automatically., (*5)

Now you can debug vars using PhpConsole global helper class PC:, (*6)

PC::debug($var, 'tags');

Also you can extended Silex\Application class with use PhpConsole\Silex\ApplicationHelperTrait and debug using:, (*7)

$app->pc($var, 'tags');

The Versions

27/02 2014

dev-master

9999999-dev https://github.com/barbushin/php-console-silex

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

  Sources   Download

BSD 3-Clause

The Requires

 

debug logger php silex errors chrome service provider php-console

04/02 2014

1.0.1

1.0.1.0 https://github.com/barbushin/php-console-silex

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

  Sources   Download

BSD 3-Clause

The Requires

 

debug logger php silex errors chrome service provider php-console

04/02 2014

1.0

1.0.0.0 https://github.com/barbushin/php-console-silex

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

  Sources   Download

BSD 3-Clause

The Requires

 

debug logger php silex errors chrome service provider php-console