Re: [symfony-users] Customize sfDoctrineGuardPlugin forms

2011-03-17 Thread Francesco Levorato
Hi there,
removing some widgets from sfGuard forms is quite common, so you are
in good company!

The approach is to unset($this['permission_list']) insisde the
configure method of the incriminated form.
To make sure the form you are editing is being called just put a
die('HERE I AM') after your edit and see if you get that message when
you refresh the browser.

If this doesn't happen, Symfony is not using your form in which case
you may try to:
1. clear the cache
2. tell us where you put it

Cheers,
Francesco

On Wed, Mar 16, 2011 at 7:11 PM, elitalon  wrote:
> Hi,
>
> I'm trying to setup an authentication and authorization schema to
> access a website backend and I need to make some modification to
> sfDoctrineGuardPlugin modules. In particular I need to remove the
> 'permissions_list' widgets from sfGuardUser and sfGuardGroup.
>
> I have tried to do it creating a custom generator.yml file for these
> modules, but it did not work. However, I can change the 'label' values
> with this generator.yml.
>
> I have also tried to override the sfGuardUserAdminForm class, but no
> results at all.
>
> I am wondering why the plugin is ignoring (partially) my custom files
> and classes and what is the correct way to do this.
>
> Thanks!
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
francesco levorato aka flevour
http://flevour.net/ - @flevour
"Now while the blood is hot you should make your way with vigour to
better things." (Seneca)

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Custom list actions with Admin generator

2011-03-17 Thread Francesco Levorato
Hi Viktoras,
could you explain better what do you want to achieve (e.g.: where you
want the links to appear) and the configurations you have tried?
Cheers,
Francesco

On Wed, Mar 16, 2011 at 4:02 PM, Viktoras  wrote:
> Probably this is easy to solve, but I can't find the solution.
> I want to have several custom list actions, lets say:
> config:
>  list:
>    actions:
>      newObject: ~
> I suppose this to link to /module/ListNewObject and
> executeListNewObject function to run, as described in Jobeet. But what
> I get instead is: /module/ListNewObject/action link and "Action
> "{modulename}/action" does not exist." error.
>
> Route is generated by Doctrine, nothing changed, module is also
> generated by admin generator.
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
francesco levorato aka flevour
http://flevour.net/ - @flevour
"Now while the blood is hot you should make your way with vigour to
better things." (Seneca)

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
I use this to inject the request in my services:



Then I can inject the request in my services.





On 15 mar, 22:41, Hany El-Kerdany  wrote:
> Hi All,
>
> I tried to abuse the service container a little, and use it to inject core
> container services (like the request) object into my controllers (that are
> implemented as services) as well. This is to avoid having to extend the
> Controller class, or implement the ContainerAware interface.
>
> However, i got this error:
> *Fatal error: Uncaught exception 'RuntimeException' with message 'Scope
> Widening Injection detected: The definition "xx.xx.xx" references the
> service "request" which belongs to a narrower scope. Generally, it is safer
> to either move "xx.xx.xx" to scope "request" or alternatively rely on the
> provider pattern by injecting the container itself, and requesting the
> service "request" each time it is needed. In rare, special cases however
> that might not be necessary, then you can set the reference to strict=false
> to get rid of this error.'*
> *
> *
> I'm a bit aware of Spring Dependency Injection Container's "Bean Scope"
> concept, where some beans have longer scope than others. I have some
> concerns though:
>
>    - The concept of "service scoping" or the "scope" configuration option
>    wasn't mentioned in the Service Container chapter in the Symfony2 book. Do
>    we have an intention to improve that?
>    - I wonder, if Symfony2 DIC makes service objects (e.g. controllers,
>    services) outlive the request, or serve multiple user requests like in the
>    java world and java containers. And is that possible in the PHP world?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-03-17 Thread Justin Fortier
I'd like to know how to do this as well.

On Mar 9, 9:33 am, "Don Pinkster"  wrote:
> I amtestingmy services (controllers) with plain PHPUnit, this all works 
> great. But now I want to test my entities and repositories.
>
> How can I specify the environment the tests are run in with PHPUnit without 
> the Symfony webtest client?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Remove header names in admin lists

2011-03-17 Thread elitalon
Hi,

I would like to remove the default word "Actions" from the header of
generated admin lists. I have searched the template it uses, and I
found that there is a _list.php with this header.

However, copying this file to the module templates directory and
overriding it raises several errors.

How is the correct way to modify/remove this header?

Thanks!

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [Symfony2]Forms performance

2011-03-17 Thread Costin
Hey,

Running a simple Zend Controller benchmark on a simple page vs a page
with a 2 fields form, the number of requests per second without the
form is 4 times larger than the one with the form (56 vs 14).
Is this the level of performance intended for forms?
The pages in question are generated in a way similar to that of the
AcmeDemo bundle, except the form also maps itself onto an Entity.

Thanks,
CB

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Propel behavior problem

2011-03-17 Thread Massimiliano Arione
You should definitely use Propel 1.5
It's back-compatible with Propel 1.4 and much much more developer friendly.

cheers
Massimiliano

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Hany El-Kerdany
Thanks Gustavo,

Where can I read about request scope and configuration attributes like scope
and synthetic, I couldn't find information in the documentation.

On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian
wrote:

> I use this to inject the request in my services:
>
> 
>
> Then I can inject the request in my services.
>
> 
>
> 
>
> On 15 mar, 22:41, Hany El-Kerdany  wrote:
> > Hi All,
> >
> > I tried to abuse the service container a little, and use it to inject
> core
> > container services (like the request) object into my controllers (that
> are
> > implemented as services) as well. This is to avoid having to extend the
> > Controller class, or implement the ContainerAware interface.
> >
> > However, i got this error:
> > *Fatal error: Uncaught exception 'RuntimeException' with message 'Scope
> > Widening Injection detected: The definition "xx.xx.xx" references the
> > service "request" which belongs to a narrower scope. Generally, it is
> safer
> > to either move "xx.xx.xx" to scope "request" or alternatively rely on the
> > provider pattern by injecting the container itself, and requesting the
> > service "request" each time it is needed. In rare, special cases however
> > that might not be necessary, then you can set the reference to
> strict=false
> > to get rid of this error.'*
> > *
> > *
> > I'm a bit aware of Spring Dependency Injection Container's "Bean Scope"
> > concept, where some beans have longer scope than others. I have some
> > concerns though:
> >
> >- The concept of "service scoping" or the "scope" configuration option
> >wasn't mentioned in the Service Container chapter in the Symfony2
> book. Do
> >we have an intention to improve that?
> >- I wonder, if Symfony2 DIC makes service objects (e.g. controllers,
> >services) outlive the request, or serve multiple user requests like in
> the
> >java world and java containers. And is that possible in the PHP world?
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Johannes Schmitt
That's because there is no documentation on these features yet; they are
very advanced, and most users won't need them, so they have no priority atm.

While the "fix" that Gustavo posted virtually disables all scope sanity
checks, it should be avoided at all cost; you'll only create problems for
yourself if you go down this road.

Kind regards,
Johannes


On Thu, Mar 17, 2011 at 3:36 PM, Hany El-Kerdany  wrote:

> Thanks Gustavo,
>
> Where can I read about request scope and configuration attributes like
> scope and synthetic, I couldn't find information in the documentation.
>
>
> On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian  > wrote:
>
>> I use this to inject the request in my services:
>>
>> 
>>
>> Then I can inject the request in my services.
>>
>> 
>>
>> 
>>
>> On 15 mar, 22:41, Hany El-Kerdany  wrote:
>> > Hi All,
>> >
>> > I tried to abuse the service container a little, and use it to inject
>> core
>> > container services (like the request) object into my controllers (that
>> are
>> > implemented as services) as well. This is to avoid having to extend the
>> > Controller class, or implement the ContainerAware interface.
>> >
>> > However, i got this error:
>> > *Fatal error: Uncaught exception 'RuntimeException' with message 'Scope
>> > Widening Injection detected: The definition "xx.xx.xx" references the
>> > service "request" which belongs to a narrower scope. Generally, it is
>> safer
>> > to either move "xx.xx.xx" to scope "request" or alternatively rely on
>> the
>> > provider pattern by injecting the container itself, and requesting the
>> > service "request" each time it is needed. In rare, special cases however
>> > that might not be necessary, then you can set the reference to
>> strict=false
>> > to get rid of this error.'*
>> > *
>> > *
>> > I'm a bit aware of Spring Dependency Injection Container's "Bean Scope"
>> > concept, where some beans have longer scope than others. I have some
>> > concerns though:
>> >
>> >- The concept of "service scoping" or the "scope" configuration
>> option
>> >wasn't mentioned in the Service Container chapter in the Symfony2
>> book. Do
>> >we have an intention to improve that?
>> >- I wonder, if Symfony2 DIC makes service objects (e.g. controllers,
>> >services) outlive the request, or serve multiple user requests like
>> in the
>> >java world and java containers. And is that possible in the PHP
>> world?
>>
>> --
>> 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 symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
Ooops, I didn't know that :P. Which would be the right way to inject the
request service on our own services? Should we use a Compiler pass?



Thanks for clarifying this. I thought this was the right solution.

Best regards.

On Thu, Mar 17, 2011 at 11:54 AM, Johannes Schmitt wrote:

> That's because there is no documentation on these features yet; they are
> very advanced, and most users won't need them, so they have no priority atm.
>
> While the "fix" that Gustavo posted virtually disables all scope sanity
> checks, it should be avoided at all cost; you'll only create problems for
> yourself if you go down this road.
>
> Kind regards,
> Johannes
>
>
> On Thu, Mar 17, 2011 at 3:36 PM, Hany El-Kerdany wrote:
>
>> Thanks Gustavo,
>>
>> Where can I read about request scope and configuration attributes like
>> scope and synthetic, I couldn't find information in the documentation.
>>
>>
>> On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian <
>> comfortablynum...@gmail.com> wrote:
>>
>>> I use this to inject the request in my services:
>>>
>>> 
>>>
>>> Then I can inject the request in my services.
>>>
>>> 
>>>
>>> 
>>>
>>> On 15 mar, 22:41, Hany El-Kerdany  wrote:
>>> > Hi All,
>>> >
>>> > I tried to abuse the service container a little, and use it to inject
>>> core
>>> > container services (like the request) object into my controllers (that
>>> are
>>> > implemented as services) as well. This is to avoid having to extend the
>>> > Controller class, or implement the ContainerAware interface.
>>> >
>>> > However, i got this error:
>>> > *Fatal error: Uncaught exception 'RuntimeException' with message 'Scope
>>> > Widening Injection detected: The definition "xx.xx.xx" references the
>>> > service "request" which belongs to a narrower scope. Generally, it is
>>> safer
>>> > to either move "xx.xx.xx" to scope "request" or alternatively rely on
>>> the
>>> > provider pattern by injecting the container itself, and requesting the
>>> > service "request" each time it is needed. In rare, special cases
>>> however
>>> > that might not be necessary, then you can set the reference to
>>> strict=false
>>> > to get rid of this error.'*
>>> > *
>>> > *
>>> > I'm a bit aware of Spring Dependency Injection Container's "Bean Scope"
>>> > concept, where some beans have longer scope than others. I have some
>>> > concerns though:
>>> >
>>> >- The concept of "service scoping" or the "scope" configuration
>>> option
>>> >wasn't mentioned in the Service Container chapter in the Symfony2
>>> book. Do
>>> >we have an intention to improve that?
>>> >- I wonder, if Symfony2 DIC makes service objects (e.g. controllers,
>>> >services) outlive the request, or serve multiple user requests like
>>> in the
>>> >java world and java containers. And is that possible in the PHP
>>> world?
>>>
>>> --
>>> 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 symfony-users@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony-users+unsubscr...@googlegroups.com
>>> 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 symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Johannes Schmitt
NP :) Unfortunately, there is no general solution, it depends. Maybe the
following thread helps you:

http://groups.google.com/group/symfony-devs/browse_thread/thread/a7207406c82ef07a/e2626c00f5cb9749

Kind regards,
Johannes


On Thu, Mar 17, 2011 at 4:01 PM, Gustavo Adrian  wrote:

> Ooops, I didn't know that :P. Which would be the right way to inject the
> request service on our own services? Should we use a Compiler pass?
>
>
>
> Thanks for clarifying this. I thought this was the right solution.
>
> Best regards.
>
> On Thu, Mar 17, 2011 at 11:54 AM, Johannes Schmitt 
> wrote:
>
>> That's because there is no documentation on these features yet; they are
>> very advanced, and most users won't need them, so they have no priority atm.
>>
>> While the "fix" that Gustavo posted virtually disables all scope sanity
>> checks, it should be avoided at all cost; you'll only create problems for
>> yourself if you go down this road.
>>
>> Kind regards,
>> Johannes
>>
>>
>> On Thu, Mar 17, 2011 at 3:36 PM, Hany El-Kerdany wrote:
>>
>>> Thanks Gustavo,
>>>
>>> Where can I read about request scope and configuration attributes like
>>> scope and synthetic, I couldn't find information in the documentation.
>>>
>>>
>>> On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian <
>>> comfortablynum...@gmail.com> wrote:
>>>
 I use this to inject the request in my services:

 

 Then I can inject the request in my services.

 

 

 On 15 mar, 22:41, Hany El-Kerdany  wrote:
 > Hi All,
 >
 > I tried to abuse the service container a little, and use it to inject
 core
 > container services (like the request) object into my controllers (that
 are
 > implemented as services) as well. This is to avoid having to extend
 the
 > Controller class, or implement the ContainerAware interface.
 >
 > However, i got this error:
 > *Fatal error: Uncaught exception 'RuntimeException' with message
 'Scope
 > Widening Injection detected: The definition "xx.xx.xx" references the
 > service "request" which belongs to a narrower scope. Generally, it is
 safer
 > to either move "xx.xx.xx" to scope "request" or alternatively rely on
 the
 > provider pattern by injecting the container itself, and requesting the
 > service "request" each time it is needed. In rare, special cases
 however
 > that might not be necessary, then you can set the reference to
 strict=false
 > to get rid of this error.'*
 > *
 > *
 > I'm a bit aware of Spring Dependency Injection Container's "Bean
 Scope"
 > concept, where some beans have longer scope than others. I have some
 > concerns though:
 >
 >- The concept of "service scoping" or the "scope" configuration
 option
 >wasn't mentioned in the Service Container chapter in the Symfony2
 book. Do
 >we have an intention to improve that?
 >- I wonder, if Symfony2 DIC makes service objects (e.g.
 controllers,
 >services) outlive the request, or serve multiple user requests like
 in the
 >java world and java containers. And is that possible in the PHP
 world?

 --
 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 symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 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 symfony-users@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony-users+unsubscr...@googlegroups.com
>>> 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 symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> 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 symfony

Re: [symfony-users] [Symfony2]Forms performance

2011-03-17 Thread Thomas Rabaix
It is not a good time to speak about performance. First the framework is not 
stable, and the Form component is being refactored.


On 17 mars 2011, at 15:14, Costin wrote:

> Hey,
> 
> Running a simple Zend Controller benchmark on a simple page vs a page
> with a 2 fields form, the number of requests per second without the
> form is 4 times larger than the one with the form (56 vs 14).
> Is this the level of performance intended for forms?
> The pages in question are generated in a way similar to that of the
> AcmeDemo bundle, except the form also maps itself onto an Entity.
> 
> Thanks,
> CB
> 
> -- 
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
Thanks a lot for your help Johannes. It seems to be a topic more advanced
than I thought, and it really depends on each use case to decide which
action to take. Is there other example of a custom scope inside the
framework besides the request service that I can see? so I can get a better
picture of other use cases.


Thanks again :)

Best regards.

On Thu, Mar 17, 2011 at 12:12 PM, Johannes Schmitt wrote:

> NP :) Unfortunately, there is no general solution, it depends. Maybe the
> following thread helps you:
>
>
> http://groups.google.com/group/symfony-devs/browse_thread/thread/a7207406c82ef07a/e2626c00f5cb9749
>
> Kind regards,
> Johannes
>
>
> On Thu, Mar 17, 2011 at 4:01 PM, Gustavo Adrian <
> comfortablynum...@gmail.com> wrote:
>
>> Ooops, I didn't know that :P. Which would be the right way to inject the
>> request service on our own services? Should we use a Compiler pass?
>>
>>
>>
>> Thanks for clarifying this. I thought this was the right solution.
>>
>> Best regards.
>>
>> On Thu, Mar 17, 2011 at 11:54 AM, Johannes Schmitt 
>> wrote:
>>
>>> That's because there is no documentation on these features yet; they are
>>> very advanced, and most users won't need them, so they have no priority atm.
>>>
>>> While the "fix" that Gustavo posted virtually disables all scope sanity
>>> checks, it should be avoided at all cost; you'll only create problems for
>>> yourself if you go down this road.
>>>
>>> Kind regards,
>>> Johannes
>>>
>>>
>>> On Thu, Mar 17, 2011 at 3:36 PM, Hany El-Kerdany wrote:
>>>
 Thanks Gustavo,

 Where can I read about request scope and configuration attributes like
 scope and synthetic, I couldn't find information in the documentation.


 On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian <
 comfortablynum...@gmail.com> wrote:

> I use this to inject the request in my services:
>
> 
>
> Then I can inject the request in my services.
>
> 
>
> 
>
> On 15 mar, 22:41, Hany El-Kerdany  wrote:
> > Hi All,
> >
> > I tried to abuse the service container a little, and use it to inject
> core
> > container services (like the request) object into my controllers
> (that are
> > implemented as services) as well. This is to avoid having to extend
> the
> > Controller class, or implement the ContainerAware interface.
> >
> > However, i got this error:
> > *Fatal error: Uncaught exception 'RuntimeException' with message
> 'Scope
> > Widening Injection detected: The definition "xx.xx.xx" references the
> > service "request" which belongs to a narrower scope. Generally, it is
> safer
> > to either move "xx.xx.xx" to scope "request" or alternatively rely on
> the
> > provider pattern by injecting the container itself, and requesting
> the
> > service "request" each time it is needed. In rare, special cases
> however
> > that might not be necessary, then you can set the reference to
> strict=false
> > to get rid of this error.'*
> > *
> > *
> > I'm a bit aware of Spring Dependency Injection Container's "Bean
> Scope"
> > concept, where some beans have longer scope than others. I have some
> > concerns though:
> >
> >- The concept of "service scoping" or the "scope" configuration
> option
> >wasn't mentioned in the Service Container chapter in the Symfony2
> book. Do
> >we have an intention to improve that?
> >- I wonder, if Symfony2 DIC makes service objects (e.g.
> controllers,
> >services) outlive the request, or serve multiple user requests
> like in the
> >java world and java containers. And is that possible in the PHP
> world?
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 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 sub

[symfony-users] Helpme config MongoDB

2011-03-17 Thread Julian Reyes Escrigas
i cant get connection i use symfony-standard PR07

autoload.php i setup namespaces

Doctrine\\MongoDB
Doctrine\\ODM\\MongoDB

in AppKernel.php

new Symfony\Bundle\DoctrineMongoDBBundle\\DoctrineMongoDBBundle()

but i get

Fatal Error: Interface 'Doctrine\Common\Persistence\ObjectManager' no found

and if i dont setup in autoload.php the namespace

Doctrine\\MongoDB

i get:
Fatal Error: Class 'Doctrine\MongoDB\Connection' not found

somebody can help me to config MongoDB






-- 
Julian Reyes Escrigas
Desarrollador PHP/MySQL
rkmax.tumblr.com
about.me/rkmax
twttier.com/rokemaster
github.com/rokemaster
Sent with Sparrow

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Jobeet day 3 load data

2011-03-17 Thread christophe thomas
I'm trying to load data from fixtures jobs.yml and categories.yml
with this command:
$ php symfony doctrine:data-load

But the tables are empty. I have got the columns and tables created,
but no data loaded.
Any ideas?

I have no error message and my files are correctly named with .yml

I have no idea ...

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] 'ProjectWithXsdExtensionInPhar' not found while running phpunit on my forked Symfony2 repository

2011-03-17 Thread Guillaume
Hi Symfony guys!

I would like to submit a patch for Symfony2.

So I followed all those steps: 
http://symfony.com/doc/2.0/contributing/code/patches.html

Before starting to develop the patch, I ran phpunit on my forked
repository.
I get this error:

Fatal error: Class 'ProjectWithXsdExtensionInPhar' not found in /Path/
To/symfony/tests/Symfony/Tests/Component/DependencyInjection/Loader/
XmlFileLoaderTest.php on line 264

I checked and ProjectWithXsdExtensionInPhar is where
XmlFileLoaderTest.php is looking for it.

Did any of you already get that kind of error? Or do you know what may
be wrong in my setup?

Thanks, keep up the great work,

Guillaume

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] SF2 PR7 Problemas ODM

2011-03-17 Thread César Hernández
Buenos dias

tengo dos semanas tratando de hacer un pequeño proyecto
utilizando ODM

luego de instalar *MongoDB*, el *Driver* de Mongo y *PHPMOADMIN* para probar
que funcionaba el servidor

he tratado de configurar sin éxito Symfony2
entre los cambios, la poca de documentación y los ejemplos incompatibles que
se encuentra en la web
no he podido hacer lo que esperaba en el tiempo que esperaba

Por ejemplo, si en el AppKernel agrego
   new Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle(),
cuando ejecuto
   php app/console list
veo el siguiente mensaje
Fatal error: Class
'Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand' not found in
/var/www/sf2-pr7-05/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/DropSchemaDoctrineODMCommand.php
on line 27


se me ocurrió que para lo que queria hacer
debía utilizar *MondonGo*

si en el AppKernel agrego
   new Mondongo\MondongoBundle\MondongoBundle(),
cuando ejecuto
   php app/console list
veo el siguiente mensaje
PHP Fatal error:  Class
'Symfony\Component\DependencyInjection\Extension\Extension' not found in
/var/www/sf2-pr7-05/src/Mondongo/MondongoBundle/DependencyInjection/MondongoExtension.php
on line 38


Alguno de ustedes sabe de algún proyecto que utilice ODM
que pueda gitClonar para entender como es el proceso de implementación de
ODM

Mucho sabré agradecer sus orientaciones al respecto
Gracias

-- 
César Hernández
Anzoátegui - Venezuela
dpce...@gmail.com

LinuxCounter: 285.345
CIV: 122.539

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] PR7 Accessing config.yml "parameters" variables

2011-03-17 Thread Lideln
Hi,

I'm trying to use Twig, and I would like to do a simple thing :
Display the parameters.title value defined in my config.yml file.

I found how to display http query parameters, but not config params
(the class GlobalVariables does not contain a "getParameters"
function).
Should I add a "getContainer" function in "GlobalVariables" so that I
can use then : "app.container.parameters.title" ?
I find it weird to modify the core framework.

Also, is there a var_dump function in Twig to debug variables ?
Because it's quite hard to debug scripts.

Thank you,

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Practical Symfony Jobeet Tutorial not working. slugify replaces view with the words 'Paris, France'

2011-03-17 Thread Tom W
Perhaps the problem is with the routing>=
This from the log.  It's still matching "default_index" 
 sfPatternRouting   Match route "default_index" (/:module) for /job with
parameters array ( 'module' => 'job', 'action' => 'index',)

My routing.yml , it breaks if I get rid of "default_index"

job_show_user:
  url: /job/:company/:location/:id/:position
  class: sfDoctrineRoute
  options: { model: JobeetJob, type: object }
  param: { module: job, action: show }
  requirements:
id: \d+
sf_method: [get]

# default rules
homepage:
  url:   /
  param: { module: job, action: index }

# generic rules

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*

On Mar 16, 11:04 pm, Matt Gibson  wrote:
> On 16 Mar 2011, at 15:28, Tom W wrote:
>
> > I have exactly the same problem.
>
> > Paris, France
> > Fatal error: Class 'Jobeet' not found in /Applications/MAMP/htdocs/
> > sfprojects/jobeet/lib/model/doctrine/JobeetJob.class.php on line 19
>
> > I've created //lib/Jobeet.class.php  OK but is that where it should
> > be ?
>
> That doesn't sound like the same problem. Yes, lib/Jobeet.class.php should be 
> found by the autoloader. What, exactly, is in your file?
>
> Matt

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How to debug 'LogicException' with Circular Reference?

2011-03-17 Thread Marc MacLeod
Hi all, I'm getting the following error:

"Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection
\Exception\CircularReferenceException' with message 'Circular
reference detected for service "doctrine.orm.default_entity_manager",
path: "cache_warmer -> assetic.asset_manager -> twig ->
security.context -> security.authentication.manager ->
security.user.provider.concrete.default_provider ->
fos_user.user_manager -> doctrine.orm.default_entity_manager ->
doctrine.dbal.default_connection ->
limelight.object.new_object_listener -> limelight.object_manager".' in
PROJECT_PATH\vendor\symfony\src\Symfony\Component\DependencyInjection
\Container.php on line 221"

Basically what I'm trying to do is register a 'ObjectManager' class as
a service (limelight.object_manager) which is passed
doctrine.orm.default_entity_manager as an argument. Then I register a
listener 'NewObjectListener' and pass limelight.object_manager as an
argument. The NewObjectListener service listens to
doctrine.dbal.default_event_listener, event: postPersist. See below:

services:
limelight.object.new_object_listener:
class: Limelight\LimelightBundle\Listener\NewObjectListener
arguments: ["@limelight.object_manager"]
tags:
- { name: doctrine.dbal.default_event_listener, event:
postPersist, method: listenToNewObject }

I'm not quite sure how to do this and avoid the circular reference
error described above? I'm probably missing something here, and would
appreciate any help. Thanks!

Marc

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Problem with Sending an email with a task

2011-03-17 Thread Philippe Mangé
Hi all,

I am having the following error:

PHP Catchable fatal error:  Argument 1 passed to
dmContext::createInstance() must be an instance of
sfApplicationConfiguration, instance of ProjectConfiguration given,
called in ...

my code looks like this
Somebody an idea ?

  protected function execute($arguments = array(), $options = array())
{
  // initialize the database connection
$databaseManager = new sfDatabaseManager($this->configuration);
$connection = $databaseManager-
>getDatabase($options['connection'] ? $options['connection'] : null)-
>getConnection();

// create a context, and load the helper
$context = dmContext::createInstance($this->configuration);
$this->configuration->loadHelpers('Partial');

// create the message
$message = $this->getMailer()->compose('*@', '*',
'Subject Line');

// generate HTML part
$context->getRequest()->setRequestFormat('html');
$html  = 'test';
$message->setBody($html, 'text/html');

// generate plain text part
$context->getRequest()->setRequestFormat('txt');
$plain = 'test';
$message->addPart($plain, 'text/plain');

// send the message
$this->getMailer()->send($message);

  }

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] REST api authentication Problem

2011-03-17 Thread Laurent Fleuriot
Hi,

I work under Symfony 1.4.6 and I develop a REST api based on json.

The access to all web services is secure and actually I use a Http
Basic Authentication.
To test authentication, I has overloaded the "signin" function of
plugin "sfDoctrineGuardPlugin" in which I make a redirect if the user
is authenticated.

My problem is that the client receives the next HTML code :
http://"/>

After some research, I have found that this code is returned by
"sfWebController".

My questions are :
 - How can I do to have not this HTML code in back?
 - Is it the right way to overlaod the "signin" function and to make a
redirect?
 - How do I implement a Http Digest Authentication or oAuth
Authentication in symfony?

Thanks for your help.

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Variable set in action empty inside view.

2011-03-17 Thread Joeline Becker
Hello,


I have something like this in my actions.class.php
public function executeIndex(sfWebRequest $request)
  {
$foo = new foo("nar");
$this->js = $this->generateIndexTable($foo->bar());
  }



Then in my indexSuccess.php view I access the variable $js from
actions.class.php as follows:
echo $js;


However this does not work. I know the function generateIndexTable()
works, because if I echo generateIndexTable($foo->bar()); inside the
actions.class.php, then it will show in the view (obviously at the
very top of indexSuccess.php).

Why is this happening? Is this some sort of bug? The
generateIndexTable() function generates a rather large table. Do you
think it is due to that?


Thanks for any help.

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] O symfony 2 tem o comando de importar esquema do banco??

2011-03-17 Thread André
Boa tarde tenho um projeto, e gostaria de saber se o Symfony 2 tem a
opção de importar esquema do banco de dados para ele igual o Symfony
1. E se tiver pode dizer qual é o comando e como faz?

Good afternoon I have a project, and I wonder if the Symfony 2 has the
option to import the database schema for it like the Symfony 1. And if
you can tell what the command does and how? thank you hug

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Error when creating models

2011-03-17 Thread Kévin
Hi,

I'm new to Symfony, and I don't even succeed in creating valid models.

I created my project - which use propel - and wrote the following
schema.yml:

propel:
  poc:
id:   ~
message:  { type: varchar(140), required: true}
author:   { type: varchar(255), required: true}
plus: { type: integer, default: 0}
minus:{ type: integer, default: 0}
created_at:   ~

Then I executed the following commands without errors:

$ php symfony propel:build --sql
$ php symfony propel:insert-sql
$ php symfony propel:build --model

But when I try to load fixtures or generate a module, I obtain this
error:

$ php symfony propel:data-load
>> propelload data from "/home/me/www/poc/data/fixtures"
PHP Fatal error:  Cannot redefine class constant BasePoc::PEER in /
home/me/www/poc/lib/model/om/BasePoc.php on line 85

Fatal error: Cannot redefine class constant BasePoc::PEER in /home/
me/www/poc/lib/model/om/BasePoc.php on line 85

I googled and recreated the project several times, but I couldn't see
my mistake.

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Practical Symfony Jobeet Tutorial not working. slugify replaces view with the words 'Paris, France'

2011-03-17 Thread Tom W
Have rebuilt it from Day 4 &5,  once I change routing.yml to include
>

job_show_user:
url: /job/:company_slug/:location_slug/:id/:position_slug

It then can't find the class in lib/Jobeet.class.php

Perplexed :(

i can ignore this and plough on but interested to know why it totally
breaks the whole framework.

On Mar 16, 11:04 pm, Matt Gibson  wrote:
> On 16 Mar 2011, at 15:28, Tom W wrote:
>
> > I have exactly the same problem.
>
> > Paris, France
> > Fatal error: Class 'Jobeet' not found in /Applications/MAMP/htdocs/
> > sfprojects/jobeet/lib/model/doctrine/JobeetJob.class.php on line 19
>
> > I've created //lib/Jobeet.class.php  OK but is that where it should
> > be ?
>
> That doesn't sound like the same problem. Yes, lib/Jobeet.class.php should be 
> found by the autoloader. What, exactly, is in your file?
>
> Matt

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Symfony 2 Doctrine Database Schema imports

2011-03-17 Thread Kelvio Matias
I'm working with Symfony 2 and possess a database already exists.
I wonder how to create classes it from existing stock.
Thanks.

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Forms and Entity Annotation Validation...

2011-03-17 Thread j_stout
Here is my paste: http://pastebin.com/9gNhD3d9

First and foremost, I love the direction S2 is going on everything.
I'm just stuck at this one point and don't understand what's going on.

I'm starting to think that Validation in Entity Annotations isn't the
way to go.  It works when I'm starting a new entity Object (ie. User)
and need all the required fields to validate properly, but when I'm
ready to validate whether a login is correct or not, or if a user
needs to update just one element of his profile (such as his a form
only with a textarea for his Bio), it seems to be grabbing ALL
validation constraints and casting errors on variables that aren't
even in the form... (refer to paste http://pastebin.com/9gNhD3d9)

What is the best practice (or going to be) for validating forms as
they come (logins / inline edits / etc)?

PS. Good job Bernhard on the Form component. What's an estimation on
when it will be finished?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] dqlLogger (symfony, doctrine)

2011-03-17 Thread M. Nour
Hello;

I'm using symfony 1.4.4 with doctrine 1.2, and I want to add a dql (or sql) 
logger for each query.

I created a sqlLogger class with a function postExec, like this:

class sqlLogger extends Doctrine_EventListener {
  public function postExec(Doctrine_Event $event)
  { 
// doLogging function
  }
}

in ProjectConfiguration.class.
php, I attached the listener like this 

public function configureDoctrine(Doctrine_Manager $manager)
{
  ...
  $manager->setListener(new sqlLogger());
}

I see that doLogging function is never called, I don't know what I'm missing.

I appreciate your help, or if there is another way doing this, it will be great.

Thank you.


  

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Helpme config MongoDB

2011-03-17 Thread César Hernández
Instalaste...
 MongoDB y el
 Driver de Mongo para PHP

Actualizaste php.ini
  para registrar el driver ?

Creaste la carpeta
  /data/db ?

2011/3/18 Julian Reyes Escrigas 

> i cant get connection i use symfony-standard PR07
>
> autoload.php i setup namespaces
>
> Doctrine\\MongoDB
> Doctrine\\ODM\\MongoDB
>
> in AppKernel.php
>
> new Symfony\Bundle\DoctrineMongoDBBundle\\DoctrineMongoDBBundle()
>
> but i get
>
> Fatal Error: Interface 'Doctrine\Common\Persistence\ObjectManager' no found
>
> and if i dont setup in autoload.php the namespace
>
> Doctrine\\MongoDB
>
> i get:
> Fatal Error: Class 'Doctrine\MongoDB\Connection' not found
>
> somebody can help me to config MongoDB
>
>
>
>
>
>
> --
> Julian Reyes Escrigas
> Desarrollador PHP/MySQL
> rkmax.tumblr.com
> about.me/rkmax
> twttier.com/rokemaster
> github.com/rokemaster
> Sent with Sparrow 
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
César Hernández
Anzoátegui - Venezuela
dpce...@gmail.com

LinuxCounter: 285.345
CIV: 122.539

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Practical Symfony Jobeet Tutorial not working. slugify replaces view with the words 'Paris, France'

2011-03-17 Thread Francesco Levorato
Forgive the stupid question, has the cache been cleared after creating
that class?
Cheers,
Francesco

On Thu, Mar 17, 2011 at 5:32 PM, Tom W  wrote:
> Have rebuilt it from Day 4 &5,  once I change routing.yml to include
>>
>
> job_show_user:
> url: /job/:company_slug/:location_slug/:id/:position_slug
>
> It then can't find the class in lib/Jobeet.class.php
>
> Perplexed :(
>
> i can ignore this and plough on but interested to know why it totally
> breaks the whole framework.
>
> On Mar 16, 11:04 pm, Matt Gibson  wrote:
>> On 16 Mar 2011, at 15:28, Tom W wrote:
>>
>> > I have exactly the same problem.
>>
>> > Paris, France
>> > Fatal error: Class 'Jobeet' not found in /Applications/MAMP/htdocs/
>> > sfprojects/jobeet/lib/model/doctrine/JobeetJob.class.php on line 19
>>
>> > I've created //lib/Jobeet.class.php  OK but is that where it should
>> > be ?
>>
>> That doesn't sound like the same problem. Yes, lib/Jobeet.class.php should 
>> be found by the autoloader. What, exactly, is in your file?
>>
>> Matt
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
francesco levorato aka flevour
http://flevour.net/ - @flevour
"Now while the blood is hot you should make your way with vigour to
better things." (Seneca)

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] PR7 Accessing config.yml "parameters" variables

2011-03-17 Thread Christophe COEVOET

Le 17/03/2011 18:01, Lideln a écrit :

Hi,

I'm trying to use Twig, and I would like to do a simple thing :
Display the parameters.title value defined in my config.yml file.

I found how to display http query parameters, but not config params
(the class GlobalVariables does not contain a "getParameters"
function).
Should I add a "getContainer" function in "GlobalVariables" so that I
can use then : "app.container.parameters.title" ?
I find it weird to modify the core framework.
Parameters are not intended to be available in the templates as most of 
them have nothing to do with the view. You can add global variables in 
the Twig config and using the parameter placeholder syntax allows to use 
parameters for this:


twig:
# ... other Twig config
globals:
  my_param: %some.dic.param%
  pi: 3.14

Also, is there a var_dump function in Twig to debug variables ?
Because it's quite hard to debug scripts.
You can activate the debug extension which provide a debug tag. {% debug 
%} will dump all variables of the context and {% debug my_var %} will 
only dump the given variable.


twig:
# ... other Twig config
extensions: [twig.extension.debug] # you can add other ones in the 
array, like twig.extension.text

Thank you,




--
Christophe | Stof

--
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] How to debug 'LogicException' with Circular Reference?

2011-03-17 Thread Christophe COEVOET

Le 17/03/2011 05:20, Marc MacLeod a écrit :

Hi all, I'm getting the following error:

"Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection
\Exception\CircularReferenceException' with message 'Circular
reference detected for service "doctrine.orm.default_entity_manager",
path: "cache_warmer ->  assetic.asset_manager ->  twig ->
security.context ->  security.authentication.manager ->
security.user.provider.concrete.default_provider ->
fos_user.user_manager ->  doctrine.orm.default_entity_manager ->
doctrine.dbal.default_connection ->
limelight.object.new_object_listener ->  limelight.object_manager".' in
PROJECT_PATH\vendor\symfony\src\Symfony\Component\DependencyInjection
\Container.php on line 221"

Basically what I'm trying to do is register a 'ObjectManager' class as
a service (limelight.object_manager) which is passed
doctrine.orm.default_entity_manager as an argument. Then I register a
listener 'NewObjectListener' and pass limelight.object_manager as an
argument. The NewObjectListener service listens to
doctrine.dbal.default_event_listener, event: postPersist. See below:

services:
 limelight.object.new_object_listener:
 class: Limelight\LimelightBundle\Listener\NewObjectListener
 arguments: ["@limelight.object_manager"]
 tags:
 - { name: doctrine.dbal.default_event_listener, event:
postPersist, method: listenToNewObject }

I'm not quite sure how to do this and avoid the circular reference
error described above? I'm probably missing something here, and would
appreciate any help. Thanks!

Marc

You don't need to inject the entity manager in your listener (which 
causes the circular reference) as the entity manager is avaible throught 
the EventArgs argument passed to the listener.


--
Christophe | Stof

--
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How to enable MongoDB logging

2011-03-17 Thread Julian Reyes Escrigas
Hi

how i can enable Query logging for Docttrine MongoDB

-- 
Julian Reyes Escrigas
Desarrollador PHP/MySQL
rkmax.tumblr.com
about.me/rkmax
twttier.com/rokemaster
github.com/rokemaster
Sent with Sparrow

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Forms and Entity Annotation Validation...

2011-03-17 Thread j_stout
Basically I just got a small understanding on a service, but still no
clue how they pertain to forms.  Also there is no documentation on
adding validation groups via Entity Annotations, so hopefully all
these things get solved one day.  So if someone can guide me on how to
do validation inside the entity and have smaller forms, that would be
extremely helpful.  I've been stuck on this all day and I'm almost
ready to give up.

On Mar 16, 4:35 pm, j_stout  wrote:
> Here is my paste:http://pastebin.com/9gNhD3d9
>
> First and foremost, I love the direction S2 is going on everything.
> I'm just stuck at this one point and don't understand what's going on.
>
> I'm starting to think that Validation in Entity Annotations isn't the
> way to go.  It works when I'm starting a new entity Object (ie. User)
> and need all the required fields to validate properly, but when I'm
> ready to validate whether a login is correct or not, or if a user
> needs to update just one element of his profile (such as his a form
> only with a textarea for his Bio), it seems to be grabbing ALL
> validation constraints and casting errors on variables that aren't
> even in the form... (refer to pastehttp://pastebin.com/9gNhD3d9)
>
> What is the best practice (or going to be) for validating forms as
> they come (logins / inline edits / etc)?
>
> PS. Good job Bernhard on the Form component. What's an estimation on
> when it will be finished?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Variable set in action empty inside view.

2011-03-17 Thread Gábor Fási
Does the web debug bar show $js as being passed to the view? What does
`var_dump($js)` echo?

On Thu, Mar 17, 2011 at 05:34, Joeline Becker
 wrote:
> Hello,
>
>
> I have something like this in my actions.class.php
> public function executeIndex(sfWebRequest $request)
>  {
>    $foo = new foo("nar");
>    $this->js = $this->generateIndexTable($foo->bar());
>  }
>
>
>
> Then in my indexSuccess.php view I access the variable $js from
> actions.class.php as follows:
> echo $js;
>
>
> However this does not work. I know the function generateIndexTable()
> works, because if I echo generateIndexTable($foo->bar()); inside the
> actions.class.php, then it will show in the view (obviously at the
> very top of indexSuccess.php).
>
> Why is this happening? Is this some sort of bug? The
> generateIndexTable() function generates a rather large table. Do you
> think it is due to that?
>
>
> Thanks for any help.
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Problem with Sending an email with a task

2011-03-17 Thread Gábor Fási
You sure you meant dmContext, and not sfContext?

2011/3/17 Philippe Mangé :
> Hi all,
>
> I am having the following error:
>
> PHP Catchable fatal error:  Argument 1 passed to
> dmContext::createInstance() must be an instance of
> sfApplicationConfiguration, instance of ProjectConfiguration given,
> called in ...
>
> my code looks like this
> Somebody an idea ?
>
>  protected function execute($arguments = array(), $options = array())
> {
>  // initialize the database connection
>    $databaseManager = new sfDatabaseManager($this->configuration);
>    $connection = $databaseManager-
>>getDatabase($options['connection'] ? $options['connection'] : null)-
>>getConnection();
>
>    // create a context, and load the helper
>    $context = dmContext::createInstance($this->configuration);
>    $this->configuration->loadHelpers('Partial');
>
>    // create the message
>    $message = $this->getMailer()->compose('*@', '*',
> 'Subject Line');
>
>    // generate HTML part
>    $context->getRequest()->setRequestFormat('html');
>    $html  = 'test';
>    $message->setBody($html, 'text/html');
>
>    // generate plain text part
>    $context->getRequest()->setRequestFormat('txt');
>    $plain = 'test';
>    $message->addPart($plain, 'text/plain');
>
>    // send the message
>    $this->getMailer()->send($message);
>
>  }
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Problem with Sending an email with a task

2011-03-17 Thread Richtermeister
You need to call the task with a specific application (either by
adding --application=whatever to the calling code, or by specifying
the default application in the respective parameter).
Without that, you get a project config, with it, you get an
application config. The reason is that many factories are defined on
the application level, so sfContext needs those to be there.

Daniel


On Mar 17, 1:57 pm, Philippe Mangé  wrote:
> Hi all,
>
> I am having the following error:
>
> PHP Catchable fatal error:  Argument 1 passed to
> dmContext::createInstance() must be an instance of
> sfApplicationConfiguration, instance of ProjectConfiguration given,
> called in ...
>
> my code looks like this
> Somebody an idea ?
>
>   protected function execute($arguments = array(), $options = array())
> {
>   // initialize the database connection
>     $databaseManager = new sfDatabaseManager($this->configuration);
>     $connection = $databaseManager-
>
> >getDatabase($options['connection'] ? $options['connection'] : null)-
> >getConnection();
>
>     // create a context, and load the helper
>     $context = dmContext::createInstance($this->configuration);
>     $this->configuration->loadHelpers('Partial');
>
>     // create the message
>     $message = $this->getMailer()->compose('*@', '*',
> 'Subject Line');
>
>     // generate HTML part
>     $context->getRequest()->setRequestFormat('html');
>     $html  = 'test';
>     $message->setBody($html, 'text/html');
>
>     // generate plain text part
>     $context->getRequest()->setRequestFormat('txt');
>     $plain = 'test';
>     $message->addPart($plain, 'text/plain');
>
>     // send the message
>     $this->getMailer()->send($message);
>
>   }

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Entity Dependancies

2011-03-17 Thread Craige
I'm wondering how a Symfony2 developer should handle Entity
dependencies

ie

One might separate their application into 3 bundles, A, B, and C. How
should one handle cross-bundle Entity dependencies?

Eg
- bundle A is an AuthBundle
- Bundle B is a BlogBundle

The BlogBundle will likely require a User Entity, which is likely to
be in AuthBundle. How should one handle this cleanly, without creating
a mess of cross-dependencies?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How do I make my fixture for a table when the primary key is also a foreign key?

2011-03-17 Thread Christopher Yee Mon
Hello,

I'm building (or trying to while learning how symfony works) a site with my
dev environment in Symfony 1.4, with MSSQL 2008 R2, PHP 5.2.17 and IIS 7 on
Windows Server 2008 R2. I designed my schema so that there's a table (Asset)
that has a one-to-many relationship to another table (VirtualComputer).
VirtualComputer's foreign key which points to the id of Asset is also it's
primary key. So my schema.yml looks like the following (edited for brevity):

AssetType:
  actAs: { Timestampable: ~ }
  columns:
type_name: { type: string(20), notnull: true, unique: true }

Asset:
  actAs: { Timestampable: ~ }
  columns:
asset_name: { type: string(255), notnull: true, unique: true }
type_id: { type: integer, notnull: true, default: Unknown }
  relations:
AssetType: { onDelete: SET DEFAULT, local: type_id, foreign: id }

VirtualComputer:
  columns:
asset_id: { type: integer, primary: true, unique: true, notnull: true }
hostname: { type: string(64) }
  relations:
Asset: { onDelete: CASCADE, local: asset_id, foreign: id }

So I tried to make a fixture for this scenario. The fixture for the first
two tables AssetType and Asset work just fine.It looks like the following:

AssetType:
  virtualcomputer:
type_name: Virtual Computer
Asset:
  virtualcomputerone:
asset_name: Virtual Computer One
AssetType: virtualcomputer

Then I tried to add the last table, VirtualComputer where the asset_id field
is both primary key and foreign key to the Asset Table. It looks like the
following

VirtualComputer:
  VirtualComputerOneComp:
Asset: virtualcomputerone
hostname: Virtual Machine One

I add that part of the fixture to the same fixture yaml file as the first
part of the fixture. I added it to the end of the file though. When I try
data-load however I get the following

c:\qaserver2>php symfony doctrine:data-load
>> doctrine  Loading data fixtures from "C:\qaserver2\data/fixtures"





  SQLSTATE[HY000]: General error: 10007 Cannot insert the value NULL into
column
 'asset_id', table 'qaserver.dbo.virtual_computer'; column does not allow
nulls.
 INSERT fails. [10007] (severity 5) []. Failing Query: "INSERT INTO
[virtual_com
puter] ([hostname], [architecture]) VALUES ('Virtual Machine One',
'x86_64')"

Why in this case is it not working? It should be supplying the id of
virtualcomputerone written earlier in the fixture as the primary key for
VirtualComputerOneComp. I'm using the same method of pointing
VirtualComputerOneComp (in VirtualComputer) to virtualcomputerone (in Asset)
that I used to point virtualcomputerone (in Asset) to virtualcomputer (in
AssetType). The only difference is that in this case, the relation is with
the child table's primary key. Is there a syntax that will make this
scenario work?

Now if I explicitly state the asset_id in the fixture for VirtualComputer
like so

VirtualComputer:
  VirtualComputerOneComp:
asset_id: 1
hostname: Virtual Machine One

I get this error instead so I know that doesn't work:

c:\qaserver2>php symfony doctrine:data-load
>> doctrine  Loading data fixtures from "C:\qaserver2\data/fixtures"







  SQLSTATE[HY000]: General error: 10007 Cannot insert explicit value for
identit
y column in table 'asset' when IDENTITY_INSERT is set to OFF. [10007]
(severity
5) []. Failing Query: "INSERT INTO [asset] ([role], [maintenance],
[infrastructu
re], [review], [type_id], [asset_name], [commments], [id], [created_at],
[update
d_at]) VALUES ('Generic VM', 0, 0, 0, '9', 'Virtual Computer One', 'First
virtua
l computer
  Test Virtual Machine





  ', 1, '2011-03-17 22:33:50', '2011-03-17 22:33:50')"

I have been following along with the Jobeet tutorial to learn this as well
as reading the gentle introduction book in bits and pieces. I didn't fine
anything in either that addressed this scenario. Is this even a good idea?
Should I just give VirtualComputer its own id separate from the foreign key?

I have posted a few questions on here so far and the community seems to be
quite helpful. Thanks again.

Christopher

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Hany El-Kerdany
Thanks Johannes,

The thread you sent is indeed very informative. Understanding scope is not
an option IMHO.

I expect that the answer to my question -as far as I understand- is to scope
my controllers in which I want to inject the request as request-scoped
services, which will not cause re-instantiation of my controller services
during the single HTTP request, unless there has been a new sub-request
(e.g. using render() in a template, or forward() in a controller), which is
likely, and I will have to be careful then.


On Thu, Mar 17, 2011 at 17:53, Gustavo Adrian
wrote:

> Thanks a lot for your help Johannes. It seems to be a topic more advanced
> than I thought, and it really depends on each use case to decide which
> action to take. Is there other example of a custom scope inside the
> framework besides the request service that I can see? so I can get a better
> picture of other use cases.
>
>
> Thanks again :)
>
> Best regards.
>
>
> On Thu, Mar 17, 2011 at 12:12 PM, Johannes Schmitt 
> wrote:
>
>> NP :) Unfortunately, there is no general solution, it depends. Maybe the
>> following thread helps you:
>>
>>
>> http://groups.google.com/group/symfony-devs/browse_thread/thread/a7207406c82ef07a/e2626c00f5cb9749
>>
>> Kind regards,
>> Johannes
>>
>>
>> On Thu, Mar 17, 2011 at 4:01 PM, Gustavo Adrian <
>> comfortablynum...@gmail.com> wrote:
>>
>>> Ooops, I didn't know that :P. Which would be the right way to inject the
>>> request service on our own services? Should we use a Compiler pass?
>>>
>>>
>>>
>>> Thanks for clarifying this. I thought this was the right solution.
>>>
>>> Best regards.
>>>
>>> On Thu, Mar 17, 2011 at 11:54 AM, Johannes Schmitt >> > wrote:
>>>
 That's because there is no documentation on these features yet; they are
 very advanced, and most users won't need them, so they have no priority 
 atm.

 While the "fix" that Gustavo posted virtually disables all scope sanity
 checks, it should be avoided at all cost; you'll only create problems for
 yourself if you go down this road.

 Kind regards,
 Johannes


 On Thu, Mar 17, 2011 at 3:36 PM, Hany El-Kerdany wrote:

> Thanks Gustavo,
>
> Where can I read about request scope and configuration attributes like
> scope and synthetic, I couldn't find information in the documentation.
>
>
> On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian <
> comfortablynum...@gmail.com> wrote:
>
>> I use this to inject the request in my services:
>>
>> 
>>
>> Then I can inject the request in my services.
>>
>> 
>>
>> 
>>
>> On 15 mar, 22:41, Hany El-Kerdany  wrote:
>> > Hi All,
>> >
>> > I tried to abuse the service container a little, and use it to
>> inject core
>> > container services (like the request) object into my controllers
>> (that are
>> > implemented as services) as well. This is to avoid having to extend
>> the
>> > Controller class, or implement the ContainerAware interface.
>> >
>> > However, i got this error:
>> > *Fatal error: Uncaught exception 'RuntimeException' with message
>> 'Scope
>> > Widening Injection detected: The definition "xx.xx.xx" references
>> the
>> > service "request" which belongs to a narrower scope. Generally, it
>> is safer
>> > to either move "xx.xx.xx" to scope "request" or alternatively rely
>> on the
>> > provider pattern by injecting the container itself, and requesting
>> the
>> > service "request" each time it is needed. In rare, special cases
>> however
>> > that might not be necessary, then you can set the reference to
>> strict=false
>> > to get rid of this error.'*
>> > *
>> > *
>> > I'm a bit aware of Spring Dependency Injection Container's "Bean
>> Scope"
>> > concept, where some beans have longer scope than others. I have some
>> > concerns though:
>> >
>> >- The concept of "service scoping" or the "scope" configuration
>> option
>> >wasn't mentioned in the Service Container chapter in the Symfony2
>> book. Do
>> >we have an intention to improve that?
>> >- I wonder, if Symfony2 DIC makes service objects (e.g.
>> controllers,
>> >services) outlive the request, or serve multiple user requests
>> like in the
>> >java world and java containers. And is that possible in the PHP
>> world?
>>
>> --
>> 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 symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.c