Hi,
I'm playing around in the sandbox to get a feel for Symfony2 (I
already have Symfony1 experience). After trying to get the Doctrine
stuff going it ran into trouble. After enabling the doctrine dbal and
orm in the config file I inserted the following line from the docs in
my code:

$conn = $this->container->getService('database_connection');

This results in an exception:
Call to undefined method helloDevDebugProjectContainer::getService

The code that creates the exception is this:
public function __call($method, $arguments)
{
 if (!preg_match('/^get(.+)Service$/', $method, $match)) {
             throw new \BadMethodCallException(sprintf('Call to
undefined method %s::%s.', get_class($this), $method));
}

What is peculiar here is that the regular expression can never match
the getService() call. Is this an error in the documentation or should
the regexp rather be "get(.*)Service" to allow for the call in the
docs to be valid?

Regards,
  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 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

Reply via email to