Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 4981d8e

Browse files
committed
Merge pull request #18 from dantleech/routing-bundle
Updated to use RoutingBundle
2 parents 34dfd55 + 5729ba9 commit 4981d8e

File tree

15 files changed

+27
-29
lines changed

15 files changed

+27
-29
lines changed

AutoRoute/BuilderContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute;
44

5-
use Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route;
5+
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
66

77
/**
88
* This class might better be called AutoRouteRequest.

AutoRoute/PathActionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute;
44

5-
use Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route;
5+
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
66

77
/**
88
* The job of classes implementing this interface is to add

AutoRoute/PathNotExists/ThrowException.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
*/
1212
class ThrowException implements PathActionInterface
1313
{
14-
protected $routeMaker;
15-
16-
public function __construct()
17-
{
18-
}
19-
2014
public function init(array $options)
2115
{
2216
}

AutoRoute/PathProvider/ContentObjectProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\RouteStack;
99
use Symfony\Cmf\Bundle\CoreBundle\Slugifier\SlugifierInterface;
1010
use Doctrine\ODM\PHPCR\DocumentManager;
11-
use Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route;
11+
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
1212
use Doctrine\Common\Collections\ArrayCollection;
1313

1414
/**

AutoRoute/RouteMaker/RouteMaker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Doctrine\ODM\PHPCR\Document\Generic;
88
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\RouteStack;
99
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\Exception\MissingOptionException;
10-
use Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route;
10+
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
1111

1212
/**
1313
* This class will make the Route classes using

Document/AutoRoute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\Document;
44

5-
use Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route;
5+
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
66

77
/**
88
* Sub class of Route to enable automatically generated routes

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# [WIP] Symfony CMF Routing Auto Route Bundle [![Build Status](https://secure.travis-ci.org/symfony-cmf/RoutingAutoBundle.png)](http://travis-ci.org/symfony-cmf/RoutingAutoBundle)
22

3-
This bundle is a WIP which automatically creates and manages routes for configured persisted
3+
This bundle automatically creates and manages routes for configured persisted
44
document classes.
55

6+
*WARNING*: This bundle is still experimental. It works, but there may be some
7+
as-yet unknown issues. The API, however, should not change too much in the
8+
future.
9+
610
See the [official documentation](http://symfony.com/doc/master/cmf/bundles/routing-auto.html)
711

812
## Example configuration
@@ -42,7 +46,7 @@ The following is the current functional test configuration:
4246
## Restrictions:
4347

4448
* Only documents stored with PHPCR-ODM are supported.
45-
* You must have the RoutingExtraBundle installed.
49+
* You must have the RoutingBundle installed.
4650

4751
## Installation
4852

Tests/AutoRoute/PathExists/AutoIncrementPathTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public function setUp()
2323
$this->builderContext = $this->getMock('Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\BuilderContext');
2424

2525
$this->aiPath = new AutoIncrementPath($this->dm, $this->routeMaker);
26-
$this->route1 = $this->getMockBuilder('Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route')
26+
$this->route1 = $this->getMockBuilder('Symfony\Cmf\Bundle\RoutingBundle\Document\Route')
2727
->disableOriginalConstructor()
2828
->getMock();
29-
$this->route2 = $this->getMockBuilder('Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route')
29+
$this->route2 = $this->getMockBuilder('Symfony\Cmf\Bundle\RoutingBundle\Document\Route')
3030
->disableOriginalConstructor()
3131
->getMock();
3232

Tests/AutoRoute/PathProvider/ContentObjectProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setUp()
3535
->getMock();
3636

3737
$this->contentObject = new \stdClass;
38-
$this->route1 = $this->getMock('Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route');
38+
$this->route1 = $this->getMock('Symfony\Cmf\Bundle\RoutingBundle\Document\Route');
3939
$this->object = new ContentObjectTestClass($this->contentObject);
4040

4141

Tests/AutoRoute/RouteMaker/RouteMakerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class RouteMakerTest extends GenericMakerTest
66
{
7-
protected $routeClass = 'Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route';
7+
protected $routeClass = 'Symfony\Cmf\Bundle\RoutingBundle\Document\Route';
88
protected $makerClass = 'Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\RouteMaker\RouteMaker';
99

1010
public function testMake()
@@ -27,15 +27,15 @@ public function testMake()
2727
static $i = 0;
2828
$expected = array('/test', '/test/foo');
2929

30-
$this->assertInstanceOf(
31-
'Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route',
30+
$test->assertInstanceOf(
31+
'Symfony\Cmf\Bundle\RoutingBundle\Document\Route',
3232
$doc
3333
);
3434

35-
$this->assertEquals($expected[$i++], $doc->getId());
35+
$test->assertEquals($expected[$i++], $doc->getId());
3636
$defaults = $doc->getDefaults();
37-
$this->assertTrue(isset($defaults['_controller']));
38-
$this->assertEquals('foobar', $defaults['_controller']);
37+
$test->assertTrue(isset($defaults['_controller']));
38+
$test->assertEquals('foobar', $defaults['_controller']);
3939
}));
4040

4141
$this->routeMaker->make($this->routeStack);

0 commit comments

Comments
 (0)