Skip to content

Commit efb7f45

Browse files
committed
Merge remote-tracking branch 'origin/master' into orm
2 parents f5dfd9f + 41fc3a1 commit efb7f45

File tree

66 files changed

+887
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+887
-600
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
phpunit.xml
22
composer.lock
3-
/vendor
4-
Tests/Functional/config/parameters.yml
5-
Tests/Functional/app.sqlite
3+
vendor
4+
Tests/Resources/app/cache
5+
Tests/Resources/app/logs

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ env:
1111
- SYMFONY_VERSION=dev-master
1212

1313
before_script:
14-
- composer self-update
1514
- composer require symfony/framework-bundle:${SYMFONY_VERSION} --prefer-source
16-
- cp ./Tests/Functional/config/parameters.yml.dist ./Tests/Functional/config/parameters.yml
17-
- php Tests/Functional/console doctrine:phpcr:init:dbal
18-
- php Tests/Functional/console doctrine:phpcr:repository:init
15+
- vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh
1916

2017
script: phpunit --coverage-text
2118

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Symfony\Cmf\Bundle\RoutingBundle\Admin\Extension;
4+
5+
use Sonata\AdminBundle\Admin\AdminExtension;
6+
use Sonata\AdminBundle\Admin\AdminInterface;
7+
use Sonata\AdminBundle\Datagrid\ListMapper;
8+
use Sonata\AdminBundle\Form\FormMapper;
9+
10+
/**
11+
* Admin extension to add routes tab to content implementing the
12+
* RouteReferrersWriteInterface.
13+
*
14+
* @author David Buchmann <[email protected]>
15+
*/
16+
class RouteReferrersExtension extends AdminExtension
17+
{
18+
public function configureFormFields(FormMapper $formMapper)
19+
{
20+
$formMapper
21+
->with('form.group_routes', array(
22+
'translation_domain' => 'CmfRoutingBundle',
23+
))
24+
->add(
25+
'routes',
26+
'sonata_type_collection',
27+
array(
28+
'by_reference' => false,
29+
),
30+
array(
31+
'edit' => 'inline',
32+
'inline' => 'table',
33+
))
34+
->end()
35+
;
36+
}
37+
}

Admin/RedirectRouteAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RedirectRouteAdmin extends Admin
1414
/**
1515
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
1616
*/
17-
protected $baseRouteName = 'cmf_routing';
17+
protected $baseRouteName = 'cmf_routing_redirectroute';
1818

1919
/**
2020
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472

Admin/RouteAdmin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RouteAdmin extends Admin
1818
/**
1919
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
2020
*/
21-
protected $baseRouteName = 'cmf_routing';
21+
protected $baseRouteName = 'cmf_routing_route';
2222

2323
/**
2424
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
@@ -71,7 +71,7 @@ protected function configureFormFields(FormMapper $formMapper)
7171
$formMapper
7272
->with('form.group_general')
7373
->add('variablePattern', 'text', array('required' => false))
74-
->add('routeContent', 'doctrine_phpcr_odm_tree', array('choice_list' => array(), 'required' => false, 'root_node' => $this->contentRoot))
74+
->add('content', 'doctrine_phpcr_odm_tree', array('choice_list' => array(), 'required' => false, 'root_node' => $this->contentRoot))
7575
->add('defaults', 'sonata_type_immutable_array', array('keys' => $this->configureFieldsForDefaults()))
7676
->end();
7777
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Changelog
33

44
* **2013-07-29**: [DependencyInjection] restructured `phpcr_provider` config into `persistence` -> `phpcr` to match other Bundles
55
* **2013-07-28**: [DependencyInjection] added `enabled` flag to `phpcr_provider` config
6-
* **2013-07-26**: [Model] Deprecated setRouteContent and getRouteContent, use setContent and getContent instead.
6+
* **2013-07-26**: [Model] Removed setRouteContent and getRouteContent, use setContent and getContent instead.
77
* **2013-07-19**: [Model] Separated database agnostic, doctrine generic and
88
PHPCR-ODM specific code to prepare for Doctrine ORM support.
99
* **2013-07-17**: [FormType] Moved TermsFormType to CoreBundle and renamed it to CheckboxUrlLableFormType

DependencyInjection/CmfRoutingExtension.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function load(array $configs, ContainerBuilder $container)
3434
}
3535

3636
/* set up the chain router */
37-
$loader->load('chain_routing.xml');
37+
$loader->load('routing-chain.xml');
3838
$container->setParameter($this->getAlias() . '.replace_symfony_router', $config['chain']['replace_symfony_router']);
3939

4040
// add the routers defined in the configuration mapping
@@ -48,7 +48,7 @@ public function load(array $configs, ContainerBuilder $container)
4848

4949
public function setupFormTypes(array $config, ContainerBuilder $container, LoaderInterface $loader)
5050
{
51-
$loader->load('form_type.xml');
51+
$loader->load('form-type.xml');
5252

5353
if (isset($config['dynamic'])) {
5454
$routeTypeTypeDefinition = $container->getDefinition('cmf_routing.route_type_form_type');
@@ -84,7 +84,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
8484
$container->setParameter($this->getAlias() . '.defined_templates_class', $controllerForTemplates);
8585
$container->setParameter($this->getAlias() . '.uri_filter_regexp', $config['uri_filter_regexp']);
8686

87-
$loader->load('dynamic_routing.xml');
87+
$loader->load('routing-dynamic.xml');
8888

8989
$hasProvider = false;
9090
$hasContentRepository = false;
@@ -144,7 +144,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
144144

145145
public function loadPhpcrProvider($config, XmlFileLoader $loader, ContainerBuilder $container)
146146
{
147-
$loader->load('provider_phpcr.xml');
147+
$loader->load('provider-phpcr.xml');
148148

149149
$container->setParameter($this->getAlias() . '.backend_type_phpcr', true);
150150

@@ -174,7 +174,7 @@ public function loadSonataPhpcrAdmin($config, XmlFileLoader $loader, ContainerBu
174174
return;
175175
}
176176

177-
$loader->load('admin_phpcr.xml');
177+
$loader->load('admin-phpcr.xml');
178178
}
179179

180180
public function loadOrmProvider($config, XmlFileLoader $loader, ContainerBuilder $container)

Doctrine/Phpcr/RedirectRoute.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr;
44

55
use Symfony\Cmf\Bundle\RoutingBundle\Model\RedirectRoute as RedirectRouteModel;
6+
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
67

78
/**
89
* {@inheritDoc}

Document/RedirectRoute.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

Document/Route.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)