On 03.12.2010, at 13:00, Fabien Potencier wrote:

>>> however when i inject the request service to be able to read some 
>>> parameters (for example if the user has accepted the terms of services) 
>>> then i get:
>>> Fatal error: Class 'WillNeverBeCalled' not found
>>> 
>>> apparently at this point the request service hasn't been "hacked" into the 
>>> container by the kernel yet.
>> 
>> 
>> tried to fix the issue by injecting the container instead, but still doesnt 
>> work.
>> 
>> the following hack fixes the issue:
>> 
>> diff --git a/src/Symfony/Component/HttpKernel/Kernel.php 
>> b/src/Symfony/Component/HttpKernel/Kernel.php
>> index 207a9c8..3c0aed6 100644
>> --- a/src/Symfony/Component/HttpKernel/Kernel.php
>> +++ b/src/Symfony/Component/HttpKernel/Kernel.php
>> @@ -178,6 +178,7 @@ abstract class Kernel implements HttpKernelInterface, 
>> \Serializable
>>              $this->boot();
>>          }
>> 
>> +        $this->container->set('request', $request);
>>          return $this->container->get('http_kernel')->handle($request, 
>> $type, $catch);
>>      }
>> 
> 
> This is weird as HttpKernel::handle() first line of code injects the request 
> in the container. Do you have a custom http_kernel service?


I dont think I do, this is what i have in my DIC cache:
    protected function getHttpKernelService()
    {
        return $this->services['http_kernel'] = new 
\Symfony\Component\HttpKernel\HttpKernel($this, $this->get('event_dispatcher'), 
$this->get('controller_resolver'));
    }

and this is my kernel class

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\DependencyInjection\Loader\LoaderInterface;

class MainKernel extends Kernel {}

I resynced with upstream last time on tuesday.

regards,
Lukas Kahwe Smith
[email protected]



-- 
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 developers" 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-devs?hl=en

Reply via email to