2010/8/31 Fabien Potencier <[email protected]> > On 8/31/10 8:11 AM, Dennis Benkert wrote: > >> Hi, >> >> during the last days I again had the chance to take a look at Symfony2 >> again. After some search through the mailing list and the >> documentation I have some questions that came to my mind and the >> answers may be helpful for others, too. >> >> The console script is always located in a specific application folder >> (e.g. hello/console or myApplication/console). Although I know that >> this makes perfectly sense for commands related to a specific >> application I wonder if it wouldn't be helpfull to have a console >> script placed in the base directory of your application. This may >> handle some global commands (like initiating a bundle or application). >> For me it felt a bit odd to create an application with a console >> command based in another application (like "php hello/console >> init:application ..."). So my question is: Will there be a global >> console script in the future? >> > > You only need one application per "project". The CLI will probably change a > lot (as we will probably have a .phar tool to boostrap a project > independently of having Symfony installed somewhere on your machine). But, > for now, you never need to execute the init:application command (as you > should use the sandbox to get started).
So, taking a look into the glass ball there will be a change in how to handle frontends and backends in Symfony2 and also in the defintion of application? If so, are there any information already? :) > > > As it shows to me now model related classes (like Doctrine Entities, >> API Model Classes, etc.) are now somewhat "bound" to a bundle. This >> would in fact mean that there is no global "model" namespace (I know >> we had no namespaces in symfony 1.x. I use namespace here just to make >> things easier) where model code resides but instead you will always >> relate a model to some bundle. Is this correct? >> > > Correct, everything should be in a bundle. Ok, sounds cool. One thing that just came to my mind is when you have two bundles that both define a Doctrine Entity with the same name (which may be the case with third party bundles having the same entity as one of your application bundles). In PHP I think there will be no conflicts since we have namespaces but for the tables that get created in your RDBMS correpsonding to the Entities one has to take care about table name confliects, right? (Maybe it's just too early to think about things like this or I'm just plain wrong...) > > If you're creating a third party bundle (e.g. in a namespace like >> Bundle\MyCompany\MyProductBundle) you will of course provide a >> Resources folder that would contain view files. Let's say I would copy >> this third party bundle to my new project and wanted to overwrite the >> view files to customize them for my design. How would I be able to do >> this? Can I somehow "overwrite" the view files by creating a bundle >> with the same name in my project's Application namespace? >> > > You can override the templates in the "global" views/ directory (under the > app/ directory) or by creating an application\MyCompany\MyProductBundle > bundle. It depends on what you are trying to do, but both should work. > > Fabien > > Cheers, Dennis >> >> > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
