I wrote a very simple example, only two class AppBundle\Bar and AppBundle\Foo
<?php
namespace AppBundle;
use JMS\DiExtraBundle\Annotation\Service;
/**
* @Service("bar", autowire=true)
*/
class Bar
{
private $foo;
public function __construct(Foo $foo)
{
$this->foo = $foo;
}
public function getFoo()
{
return $this->foo;
}
}
I wrote a very simple example, only two class
AppBundle\Bar
andAppBundle\Foo
below is the compose.lock file i use