kgilden/weinre-bundle

Symfony Weinre bundle

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.0.0 2014-03-15 20:50 UTC

This package is auto-updated.

Last update: 2024-03-21 19:27:26 UTC


README

Build Status

KGWeinreBundle integrates Weinre with your Symfony2 application to enable mobile debugging.

NB! To make this work with your mobile devices you still need to install Weinre, please consult their docs on how to do that.

Installation

Add KGWeinerBundle to your app with Composer:

$ php composer.phar require kgilden/weinre-bundle:~1.0

Or add it manually to composer.json

{
    "require": {
        "kgilden/weinre-bundle": "~1.0"
    }
}

... and then install our dependencies using:

$ php composer.phar install

Finally enable the bundle in the dev environment:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
    );

    if ('dev' === $this->getEnvironment()) {
        $bundles[] = new KG\WeinreBundle\KGWeinreBundle();
    }
}

?>

Configuration

By default the bundle expects your Weinre server to run on the same machine. For example, if the application runs at 198.51.100.0, the target script is expected to be at "http://198.51.100.0:8080/target/target-script-min.js". You can override this by configuring the bundle (each value is optional):

kg_weinre:
    scheme: https        # defaults to 'http'
    host:   203.0.113.0  # defaults to server address
    port:   8000         # defaults to '8080'
    path:   /foo.js      # defaults to '/target/target-script-min.js'

Requirements

  • PHP >= 5.3.8
  • symfony/http-kernel >= 2.0.0
  • symfony/event-dispatcher >= 2.0.0
  • symfony/dependency-injecton >= 2.0.0
  • symfony/config >= 2.0.0

Contributing

See CONTRIBUTING.md file.

Running the Tests

You can run unit tests by simply executing

phpunit

Credits

Thanks to Inoryy for the project skeleton.

....

License

KGWeinreBundle is released under the MIT License. See the bundled LICENSE file for details.