I'm trying to create my first service in a symfony 2 application and I get this error :
InvalidArgumentException: There is no extension able to load the
configuration for "my_app.myservice" (in
/path/to/src/MyApp/MyBundle/DependencyInjection/../Resources/config/services.yml).
Looked for namespace "my_app.myservice", found none.
It seems there's a problem in my configuration but I don't see what it is.
Here's my services.yml
services:
my_app.myservice:
class: MyApp\MyBundle\Service\MyService
And my service looks like this
<?php
namespace MyApp\MyBundle\Service;
class MyService
{
public function run()
{
echo "hello world";
}
}
Thanks for help !