Skip to content

Commit

Permalink
Remove default route (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Sep 6, 2021
1 parent 404c375 commit 10004a6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"doctrine/mongodb-odm": "^2.1",
"doctrine/mongodb-odm-bundle": "^4.3",
"doctrine/persistence": "^2.0",
"sonata-project/admin-bundle": "^4.0@rc",
"sonata-project/admin-bundle": "^4.0",
"sonata-project/form-extensions": "^1.7.1",
"symfony/config": "^4.4 || ^5.3",
"symfony/dependency-injection": "^4.4 || ^5.3",
Expand Down
8 changes: 0 additions & 8 deletions src/FieldDescription/FieldDescriptionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ public function __construct(ManagerRegistry $registry)

public function create(string $class, string $name, array $options = []): FieldDescriptionInterface
{
if (!isset($options['route']['name'])) {
$options['route']['name'] = 'edit';
}

if (!isset($options['route']['parameters'])) {
$options['route']['parameters'] = [];
}

[$metadata, $propertyName, $parentAssociationMappings] = $this->getParentMetadataForProperty($class, $name);

return new FieldDescription(
Expand Down
4 changes: 0 additions & 4 deletions tests/FieldDescription/FieldDescriptionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ public function testCreate(): void
{
$fieldDescriptionFactory = new FieldDescriptionFactory($this->registry);

$fieldDescription = $fieldDescriptionFactory->create(ContainerDocument::class, 'plainField');

static::assertSame('edit', $fieldDescription->getOption('route')['name']);

$fieldDescription = $fieldDescriptionFactory->create(ContainerDocument::class, 'plainField');
static::assertSame(Type::INT, $fieldDescription->getMappingType());

Expand Down

0 comments on commit 10004a6

Please sign in to comment.