Skip to content

Commit

Permalink
Updated namespace (#1)
Browse files Browse the repository at this point in the history
* Update namespace

* Using namespace Neo4j\Neo4jBundle
  • Loading branch information
Nyholm authored Dec 7, 2016
1 parent f559064 commit f86c124
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion Collector/DebugLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\Collector;
namespace Neo4j\Neo4jBundle\Collector;

use GraphAware\Common\Cypher\StatementInterface;
use GraphAware\Common\Result\Result;
Expand Down
2 changes: 1 addition & 1 deletion Collector/Neo4jDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\Collector;
namespace Neo4j\Neo4jBundle\Collector;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion Collector/Twig/Neo4jResultExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\Collector\Twig;
namespace Neo4j\Neo4jBundle\Collector\Twig;

use GraphAware\Neo4j\Client\Formatter\Type\Node;

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\DependencyInjection;
namespace Neo4j\Neo4jBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
Expand Down Expand Up @@ -40,7 +40,7 @@ public function __construct($debug)
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$root = $treeBuilder->root('community_neo4j');
$root = $treeBuilder->root('neo4j');

$root->children()
->arrayNode('profiling')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\DependencyInjection;
namespace Neo4j\Neo4jBundle\DependencyInjection;

use GraphAware\Neo4j\Client\Connection\Connection;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
Expand All @@ -17,7 +17,7 @@
/**
* @author Tobias Nyholm <[email protected]>
*/
class CommunityNeo4jExtension extends Extension
class Neo4jExtension extends Extension
{
/**
* {@inheritdoc}
Expand Down Expand Up @@ -181,6 +181,6 @@ public function getConfiguration(array $config, ContainerBuilder $container): Co

public function getAlias(): string
{
return 'community_neo4j';
return 'neo4j';
}
}
4 changes: 2 additions & 2 deletions Factory/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

declare(strict_types=1);

namespace Neo4jCommunity\Neo4jBundle\Factory;
namespace Neo4j\Neo4jBundle\Factory;

use GraphAware\Neo4j\Client\ClientBuilder;
use GraphAware\Neo4j\Client\ClientInterface;
use GraphAware\Neo4j\Client\Event\FailureEvent;
use GraphAware\Neo4j\Client\Event\PostRunEvent;
use GraphAware\Neo4j\Client\Event\PreRunEvent;
use GraphAware\Neo4j\Client\Neo4jClientEvents;
use Neo4jCommunity\Neo4jBundle\Collector\DebugLogger;
use Neo4j\Neo4jBundle\Collector\DebugLogger;

/**
* @author Tobias Nyholm <[email protected]>
Expand Down
17 changes: 17 additions & 0 deletions Neo4jBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Neo4j\Neo4jBundle;

use Neo4j\Neo4jBundle\DependencyInjection\Neo4jExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* @author Tobias Nyholm <[email protected]>
*/
class Neo4jBundle extends Bundle
{
public function getContainerExtension()
{
return new Neo4jExtension();
}
}
17 changes: 0 additions & 17 deletions Neo4jCommunityNeo4jBundle.php

This file was deleted.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Neo4j Symfony Bundle

[![Latest Version](https://img.shields.io/github/release/neo4j-community/Neo4jBundle.svg?style=flat-square)](https://github.com/neo4j-community/Neo4jBundle/releases)
[![Build Status](https://img.shields.io/travis/neo4j-community/Neo4jBundle.svg?style=flat-square)](https://travis-ci.org/neo4j-community/Neo4jBundle)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/neo4j-community/Neo4jBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/neo4j-community/Neo4jBundle)
[![Quality Score](https://img.shields.io/scrutinizer/g/neo4j-community/Neo4jBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/neo4j-community/Neo4jBundle)
[![Total Downloads](https://img.shields.io/packagist/dt/neo4j-community/neo4j-bundle.svg?style=flat-square)](https://packagist.org/packages/neo4j-community/neo4j-bundle)
[![Latest Version](https://img.shields.io/github/release/neo4j-contrib/neo4j-symfony.svg?style=flat-square)](https://github.com/neo4j-contrib/neo4j-symfony/releases)
[![Build Status](https://img.shields.io/travis/neo4j-contrib/neo4j-symfony.svg?style=flat-square)](https://travis-ci.org/neo4j-contrib/neo4j-symfony)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/neo4j-contrib/neo4j-symfony.svg?style=flat-square)](https://scrutinizer-ci.com/g/neo4j-contrib/neo4j-symfony)
[![Quality Score](https://img.shields.io/scrutinizer/g/neo4j-contrib/neo4j-symfony.svg?style=flat-square)](https://scrutinizer-ci.com/g/neo4j-contrib/neo4j-symfony)
[![Total Downloads](https://img.shields.io/packagist/dt/neo4j/neo4j-bundle.svg?style=flat-square)](https://packagist.org/packages/neo4j/neo4j-bundle)


## Install

Via Composer

``` bash
$ composer require neo4j-community/neo4j-bundle
$ composer require neo4j/neo4j-bundle
```

At the moment we have a hard dependency on GraphAware OGM. You need to install that as well
Expand All @@ -31,7 +31,7 @@ public function registerBundles()
{
$bundles = array(
// ...
new Neo4jCommunity\Neo4jBundle\Neo4jCommunityNeo4jBundle(),
new Neo4j\Neo4jBundle\Neo4jBundle(),
);
}
```
Expand All @@ -49,7 +49,7 @@ The bundle is a convenient way of registering services. We register `Connections
### Minimal configuration

```yaml
community_neo4j:
neo4j:
connections:
default: ~
```
Expand All @@ -62,7 +62,7 @@ With the minimal configuration we have services named:
### Full configuration
```yaml
community_neo4j:
neo4j:
profiling:
enabled: true
connections:
Expand Down
8 changes: 4 additions & 4 deletions Resources/config/data-collector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="neo4j.collector.debug_collector" class="Neo4jCommunity\Neo4jBundle\Collector\Neo4jDataCollector" public="false">
<service id="neo4j.collector.debug_collector" class="Neo4j\Neo4jBundle\Collector\Neo4jDataCollector" public="false">
<argument type="service" id="neo4j.client_logger"/>

<tag name="data_collector" template="Neo4jCommunityNeo4jBundle::webprofiler.html.twig" priority="200" id="neo4j"/>
<tag name="data_collector" template="Neo4jBundle::webprofiler.html.twig" priority="200" id="neo4j"/>
</service>

<service id="neo4j.client_logger" class="Neo4jCommunity\Neo4jBundle\Collector\DebugLogger" public="false">
<service id="neo4j.client_logger" class="Neo4j\Neo4jBundle\Collector\DebugLogger" public="false">
</service>

<service id="neo4j.collector.twig.result" class="Neo4jCommunity\Neo4jBundle\Collector\Twig\Neo4jResultExtension" public="false">
<service id="neo4j.collector.twig.result" class="Neo4j\Neo4jBundle\Collector\Twig\Neo4jResultExtension" public="false">
<tag name="twig.extension" />
</service>
</services>
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="neo4j.factory.client" class="Neo4jCommunity\Neo4jBundle\Factory\ClientFactory" public="false">
<service id="neo4j.factory.client" class="Neo4j\Neo4jBundle\Factory\ClientFactory" public="false">
<argument>null</argument>
</service>

Expand Down
4 changes: 2 additions & 2 deletions Resources/views/webprofiler.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block toolbar %}
{% if collector.statements > 0 %}
{% set icon %}
{{ include('@Neo4jCommunityNeo4j/Icon/neo4j.svg') }}
{{ include('@Neo4j/Icon/neo4j.svg') }}
<span class="sf-toolbar-value">{{ collector.statements|length }}</span>
<span class="sf-toolbar-label">stmt.</span>
{% endset %}
Expand Down Expand Up @@ -33,7 +33,7 @@
{# This left-hand menu appears when using the full-screen profiler. #}
<span class="label {{ collector.statements|length == 0 ? 'disabled' }}">
<span class="icon">
{{ include('@Neo4jCommunityNeo4j/Icon/neo4j.svg') }}
{{ include('@Neo4j/Icon/neo4j.svg') }}
</span>
<strong>Neo4j</strong>
</span>
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/BaseTestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Functional;
namespace Neo4j\Neo4jBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand All @@ -13,7 +13,7 @@ protected static function getKernelClass()
{
require_once __DIR__.'/app/AppKernel.php';

return 'Neo4jCommunity\Neo4jBundle\Tests\Functional\app\AppKernel';
return 'Neo4j\Neo4jBundle\Tests\Functional\app\AppKernel';
}

protected static function createKernel(array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/BundleInitializationTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Functional;
namespace Neo4j\Neo4jBundle\Tests\Functional;

use GraphAware\Neo4j\Client\ClientInterface;
use GraphAware\Neo4j\Client\Connection\Connection;
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/app/AppKernel.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Functional\app;
namespace Neo4j\Neo4jBundle\Tests\Functional\app;

use Neo4jCommunity\Neo4jBundle\Neo4jCommunityNeo4jBundle;
use Neo4j\Neo4jBundle\Neo4jBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\Kernel;
Expand Down Expand Up @@ -32,7 +32,7 @@ public function registerBundles()
{
return [
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Neo4jCommunityNeo4jBundle(),
new Neo4jBundle(),
];
}

Expand All @@ -43,7 +43,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)

public function getCacheDir()
{
return sys_get_temp_dir().'/Neo4jCommunityNeo4jBundle';
return sys_get_temp_dir().'/Neo4jBundle';
}

public function serialize()
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ imports:
- { resource: framework.yml }
- { resource: services.yml }

community_neo4j:
neo4j:
connections:
default: ~
4 changes: 2 additions & 2 deletions Tests/Unit/Collector/DebugLoggerTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Unit\Collector;
namespace Neo4j\Neo4jBundle\Tests\Unit\Collector;

use GraphAware\Bolt\Result\Result;
use GraphAware\Common\Cypher\Statement;
use GraphAware\Neo4j\Client\Exception\Neo4jException;
use Neo4jCommunity\Neo4jBundle\Collector\DebugLogger;
use Neo4j\Neo4jBundle\Collector\DebugLogger;

/**
* @author Tobias Nyholm <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/Collector/Twig/Neo4jResultExtensionTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Unit\Collector\Twig;
namespace Neo4j\Neo4jBundle\Tests\Unit\Collector\Twig;

use GraphAware\Neo4j\Client\Formatter\Type\Node;
use Neo4jCommunity\Neo4jBundle\Collector\Twig\Neo4jResultExtension;
use Neo4j\Neo4jBundle\Collector\Twig\Neo4jResultExtension;

/**
* @author Tobias Nyholm <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Neo4jCommunity\Neo4jBundle\Tests\Unit\DependencyInjection;
namespace Neo4j\Neo4jBundle\Tests\Unit\DependencyInjection;

use Neo4jCommunity\Neo4jBundle\DependencyInjection\CommunityNeo4jExtension;
use Neo4j\Neo4jBundle\DependencyInjection\Neo4jExtension;
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;

/**
* @author Tobias Nyholm <[email protected]>
*/
class CommunityNeo4jExtensionTest extends AbstractExtensionTestCase
class Neo4jExtensionTest extends AbstractExtensionTestCase
{
protected function getMinimalConfiguration()
{
Expand All @@ -22,7 +22,7 @@ public function testDataCollectorLoaded()
$this->setParameter('kernel.debug', true);
$this->load();

$this->assertContainerBuilderHasService('neo4j.collector.debug_collector', 'Neo4jCommunity\Neo4jBundle\Collector\Neo4jDataCollector');
$this->assertContainerBuilderHasService('neo4j.collector.debug_collector', 'Neo4j\Neo4jBundle\Collector\Neo4jDataCollector');
}

public function testDataCollectorNotLoadedInNonDebug()
Expand All @@ -44,7 +44,7 @@ public function testDataCollectorNotLoadedWhenDisabled()
protected function getContainerExtensions()
{
return [
new CommunityNeo4jExtension(),
new Neo4jExtension(),
];
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "neo4j-community/neo4j-bundle",
"name": "neo4j/neo4j-bundle",
"description": "Symfony integration for Neo4j",
"type": "symfony-bundle",
"keywords": ["neo4j"],
Expand All @@ -23,7 +23,7 @@
},
"autoload": {
"psr-4": {
"Neo4jCommunity\\Neo4jBundle\\": ""
"Neo4j\\Neo4jBundle\\": ""
}
},
"scripts": {
Expand Down

0 comments on commit f86c124

Please sign in to comment.