Closed GromNaN closed 12 years ago
Hi Jerome,
It's a good idea but how to do that ? Another bundle ? I don't want to have two bundles nor to create the bridge in this bundle because it does not make sense. The Symfony2 core comes with both bridge and main features. Same thing with this bundle and this is an expected bevavior according to the bundle principle. That's why this point makes me dubious about what you want (even if I agree with you).
Feel free to explain me your mind a bit more.
Regards, William
My concern was to use propel in a silex app (but i'm not sure its a good idea). I realize that it's already possible to use the Form classes adding the bundle to my project.
The bridge should be in a new repository like any independent lib. This lib is added to a list of dependencies in the README file.
Thus, it's not absolutely necessary to split the code. It would make form features more obvious to have a seperated component.
To be discussed. Don't close this issue, I'm thinking of it :)
I think it only makes sense if the bridge part is merge into symfony/symfony. If not, it makes things more complicated for no real benefit.
Sure, but you're the only one with the symfony keys :) If you are ok to add some Propel logic in symfony/symfony, I'll work on it to create a kind of Propel bridge.
I have no problem adding a Propel bridge to the Symfony repo BUT it should be maintained.
To maintain a Propel bridge is not a problem as the Propel future will widely follow the Symfony2 future.
BTW, I can prepare a PR to add a bridge with the following parts:
DataCollector/
|-- PropelDataCollector.php
`-- Query.php
Form/
|-- ChoiceList
| `-- ModelChoiceList.php
|-- DataTransformer
| |-- ModelToIdTransformer.php
| `-- ModelsToArrayTransformer.php
|-- EventListener
| `-- MergeCollectionListener.php
`-- Type
`-- ModelType.php
Logger/
`-- PropelLogger.php
Security/
`-- User
`-- ModelUserProvider.php
Not sure to know what to add or not in this bridge. I based this list on the Doctrine bridge.
I would suggest that we first have a solid code base before migrating to a Bridge (like having the type guesser for instance).
Sure ;)
But you can give some advices to ease this future migration.
It looks good to me.
PR sent since a long time… We are waiting right now.
In Symfony2, all classes making relations between components has been moved to some "Bridge" components. It's explained here: http://groups.google.com/group/symfony-devs/browse_thread/thread/ae49ea50a3731628/c5b268d63f195a19
The PropelBundle contain a lot of interesting things to work with Symfony Form Component.
In order to use Propel with the Form component outside of the framework, it would be useful to move the
Propel\PropelBundle\Form
classes out of the bundle. Something likePropel\Bridge\Form
.