Skip to content

Commit

Permalink
minor #4638 Fix/deleted useless admin url generator dependency on for…
Browse files Browse the repository at this point in the history
…m factory (Ang3)

This PR was squashed before being merged into the 3.0.x-dev branch.

Discussion
----------

Fix/deleted useless admin url generator dependency on form factory

This PR deletes a useless dependency on AdminUrlGenerator in FormFactory class.

Commits
-------

f0f78f2 Fix/deleted useless admin url generator dependency on form factory
  • Loading branch information
javiereguiluz committed Sep 7, 2021
2 parents 473e843 + f0f78f2 commit 5b288b5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vendor/*
/node_modules/
npm-debug.log
yarn-error.log
/.idea/
5 changes: 1 addition & 4 deletions src/Factory/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\CrudFormType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\FiltersFormType;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
Expand All @@ -21,12 +20,10 @@
final class FormFactory
{
private $symfonyFormFactory;
private $adminUrlGenerator;

public function __construct(FormFactoryInterface $symfonyFormFactory, AdminUrlGenerator $adminUrlGenerator)
public function __construct(FormFactoryInterface $symfonyFormFactory)
{
$this->symfonyFormFactory = $symfonyFormFactory;
$this->adminUrlGenerator = $adminUrlGenerator;
}

public function createEditFormBuilder(EntityDto $entityDto, KeyValueStore $formOptions, AdminContext $context): FormBuilderInterface
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@

->set(FormFactory::class)
->arg(0, new Reference('form.factory'))
->arg(1, new Reference(AdminUrlGenerator::class))

->set(FieldFactory::class)
->arg(0, new Reference(AdminContextProvider::class))
Expand Down

0 comments on commit 5b288b5

Please sign in to comment.