JMSDiExtraBundle
JMSDiExtraBundle copied to clipboard
Trying to define 2 service with the same name for differents environnements
Hi there,
In my application, I need a service with 2 différents behaviors according to the current environnement. Here is the interface of my service.
interface FileSystemManagerInterface
{
public function getFilesystemForContext($context = null);
public function createPicture($context);
public function configurePicture(Picture $picture, $context);
}
And I have 2 implementations : first)
@Service("CENSORED.filesystem.manager", environments={"prod"})
class AmazonS3FileSystemManager implements FileSystemManagerInterface
second)
@Service("CENSORED.filesystem.manager", environments={"dev"})
class LocalFileSystemManager implements FileSystemManagerInterface
Unfortunately, in the dev environment I get the AmazonS3FileSystemManager. I think I'm missing something :o