Skip to content

Commit 148d88f

Browse files
committed
created tickets for todo comments, cs fixes
1 parent 6a8d57a commit 148d88f

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

Admin/RedirectRouteAdmin.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ protected function configureFormFields(FormMapper $formMapper)
3838
{
3939
$formMapper
4040
->with('form.group_general')
41-
// TODO: show resulting url; strip /cms/routes and prepend eventual route prefix
42-
// ->add('path', 'text', array('label' => 'URL', 'attr' => array('readonly' => 'readonly')))
4341
->add('parent', 'doctrine_phpcr_odm_tree', array('choice_list' => array(), 'select_root_node' => true, 'root_node' => $this->routeRoot))
4442
->add('name', 'text')
4543
->add('routeName', 'text', array('required' => false))

Admin/RouteAdmin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ protected function configureDatagridFilters(DatagridMapper $datagridMapper)
8686
public function setRouteRoot($routeRoot)
8787
{
8888
// TODO: fix widget to show root node when root is selectable
89+
// https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/148
8990
$this->routeRoot = PathHelper::getParentPath($routeRoot);
9091
}
9192

CmfRoutingBundle.php

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

55
use Doctrine\Bundle\PHPCRBundle\DependencyInjection\Compiler\DoctrinePhpcrMappingsPass;
6-
use Symfony\Cmf\Bundle\CoreBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
76
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
87
use Symfony\Component\DependencyInjection\Definition;
98
use Symfony\Component\HttpKernel\Bundle\Bundle;

Doctrine/Orm/RouteProvider.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,14 @@ public function getRouteCollectionForRequest(Request $request)
8282

8383
$route->setDefault('_format', $matches[1]);
8484
}
85-
// SYMFONY 2.1 COMPATIBILITY: tweak route name
86-
$key = trim(preg_replace('/[^a-z0-9A-Z_.]/', '_', $key), '_');
8785
$collection->add($key, $route);
8886
}
8987
} catch (RepositoryException $e) {
90-
// TODO: how to determine whether this is a relevant exception or not?
91-
// for example, getting /my//test (note the double /) is just an invalid path
92-
// and means another router might handle this.
93-
// but if the PHPCR backend is down for example, we want to alert the user
88+
// TODO: this is not an orm exception
89+
// https://github.com/symfony-cmf/RoutingBundle/issues/142
90+
// also check if there are valid reasons for the orm manager to
91+
// throw an exception or if we should just not catch it to not hide
92+
// a severe problem.
9493
}
9594

9695
return $collection;

Doctrine/Phpcr/IdPrefixListener.php

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

33
namespace Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr;
44

5-
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route;
65
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
76

87
/**

Doctrine/Phpcr/RouteProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public function getRouteCollectionForRequest(Request $request)
5959
try {
6060
$routes = $this->getObjectManager()->findMany($this->className, $candidates);
6161
// filter for valid route objects
62-
// we can not search for a specific class as PHPCR does not know class inheritance
63-
// but optionally we could define a node type
6462
foreach ($routes as $key => $route) {
6563
if ($route instanceof SymfonyRoute) {
6664
if (preg_match('/.+\.([a-z]+)$/i', $url, $matches)) {
@@ -75,6 +73,7 @@ public function getRouteCollectionForRequest(Request $request)
7573
}
7674
} catch (RepositoryException $e) {
7775
// TODO: how to determine whether this is a relevant exception or not?
76+
// https://github.com/symfony-cmf/RoutingBundle/issues/143
7877
// for example, getting /my//test (note the double /) is just an invalid path
7978
// and means another router might handle this.
8079
// but if the PHPCR backend is down for example, we want to alert the user

0 commit comments

Comments
 (0)