Skip to content

Commit

Permalink
Merge pull request #5 from kmfk/fix-composer
Browse files Browse the repository at this point in the history
Bundle Update
  • Loading branch information
k-k committed Oct 3, 2014
2 parents 1233684 + 35dd07e commit a3da706
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
composer.lock
coverage/
vendor/
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: php

php:
- 5.3

env:
- SYMFONY_VERSION=2.3.*
- SYMFONY_VERSION=2.4.*
- SYMFONY_VERSION=2.5.*

before_script:
- composer self-update
- composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update
- composer install --dev --prefer-source

script: phpunit --coverage-text
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Keen IO Symfony2 Bundle
=======================

[![Build Status](https://travis-ci.org/keenlabs/KeenClient-PHP-SF2.svg)](https://travis-ci.org/keenlabs/KeenClient-PHP-SF2)

###Overview

The Keen IO Symfony2 Bundle allows you to quickly and easily use the [Keen IO PHP Client](https://github.com/keenlabs/KeenClient-PHP) in your Symfony 2 applications.
Expand All @@ -12,8 +14,10 @@ The best method of installation is through the use of composer.
#####Add the bundle to Composer

```json
"require": {
"keen-io/keen-io-bundle": "~1.0",
{
"require": {
"keen-io/keen-io-bundle": "~1.1"
}
}
```

Expand Down Expand Up @@ -59,7 +63,7 @@ public function indexAction()
{
$client = $this->get('keen_io');
$client->addEvent('example_collection', array( 'foo' => 'bar' ));

// ...
}
```
Expand All @@ -71,7 +75,7 @@ Or it can be passed into your services through dependency injection:
# Example Tracking Service
tracking.service:
class: Acme\AcmeBundle\Service\Tracking
class: Acme\Bundle\AcmeBundle\Service\Tracking
arguments:
- @keen_io
```
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
"authors": [
{
"name": "Keith Kirk",
"email": "[email protected]",
"email": "[email protected]",
"role": "developer",
"homepage": "https://github.com/kmfk"
"homepage": "http://kmfk.io"
}
],
"support": {
"email": "[email protected]"
"email": "[email protected]"
},
"require": {
"php": ">=5.3.0",
"keen-io/keen-io": "~2.1"
"php": ">=5.3.0",
"keen-io/keen-io": "~2.1",
"symfony/framework-bundle": "~2.3"
},
"require-dev": {
"symfony/symfony": "dev-master"
"phpunit/phpunit": "~3.7"
},
"autoload": {
"psr-0": {
"KeenIO\\Bundle\\KeenIOBundle": ""
"psr-4": {
"KeenIO\\Bundle\\KeenIOBundle\\": "src/"
}
},
"target-dir": "KeenIO/Bundle/KeenIOBundle"
}
}
30 changes: 30 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

<php>
</php>
<testsuites>
<testsuite name="KeenIOBundle Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-text" target="php://stdout" />
<log type="coverage-html" target="coverage/" />
</logging>
</phpunit>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions tests/DependencyInjection/KeenIOExtensionTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace KeenIO\Bundle\KeenIOBundle\Tests\DependencyInjection;

use KeenIO\Bundle\KeenIOBundle\DependencyInjection\KeenIOExtension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class KeenIOExtensionTest extends \PHPUnit_Framework_TestCase
{
/**
* QPush Extension
*
* @var KeenIOExtension
*/
private $extension;

/**
* Container
*
* @var ContainerBuilder
*/
private $container;

public function setUp()
{
$this->extension = new KeenIOExtension();
$this->container = new ContainerBuilder();

$this->container->registerExtension($this->extension);
}

public function testConfiguration()
{
$loader = new YamlFileLoader($this->container, new FileLocator(__DIR__.'/../Fixtures/'));
$loader->load('config_test.yml');

$this->container->compile();

$this->assertTrue($this->container->has('keen_io'));
}
}
File renamed without changes.
11 changes: 11 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

error_reporting(-1);

if (!file_exists(dirname(__DIR__) . '/composer.lock')) {
die("Dependencies must be installed using composer:\n\nphp composer.phar install\n\n"
."See http://getcomposer.org for help with installing composer\n");
}

$loader = require dirname(__DIR__) . '/vendor/autoload.php';
$loader->addPsr4('KeenIO\\Bundle\\KeenIOBundle\\Tests\\', __DIR__);

0 comments on commit a3da706

Please sign in to comment.