KnpLabs / KnpRadBundle

Rapid Application Development for Symfony2 [UNMAINTAINED]
MIT License
291 stars 49 forks source link

Fix form loading from Type subnamespace #168

Closed PedroTroller closed 10 years ago

PedroTroller commented 10 years ago

Actually, from types are autoloaded from following namespaces:

But the FormTypeCreator don't allow to use from types from App\Form\Type

docteurklein commented 10 years ago

ship it

gquemener commented 10 years ago

What else could you have inside App\Form?

Anyway, better solution could have been to allow FormType namespace configuration, IMO.

PedroTroller commented 10 years ago

So you will have to configure the namespace before to use the rad ?

gquemener commented 10 years ago

Default value would be to App\Form, so no need to configure it as long as you don't wan't to use fancy namespace ;)

gquemener commented 10 years ago

But you haven't answered my first question, my dear @PedroTroller :white_flower:

PedroTroller commented 10 years ago
What else could you have inside App\Form?

Form extensions...

docteurklein commented 10 years ago

trois petits points.

docteurklein commented 10 years ago

but form extensions are detected if they implement the correct interfaces.

docteurklein commented 10 years ago

same for form types.

docteurklein commented 10 years ago

s they can cohabit in the same folder.

docteurklein commented 10 years ago

the only problem is the form creator wich doesnt handle sub folders, right?

gquemener commented 10 years ago

Yep that's my thought too

gquemener commented 10 years ago

BTW, really well placed "trois petits points" mister troller, I'll remember that!

docteurklein commented 10 years ago

:)

gquemener commented 10 years ago

So best solution would be to register all form types within the App\Form directory and subdirectories. That way:

What do you think @PedroTroller ?

PedroTroller commented 10 years ago

:+1: @gquemener